Product price prediction method and device, equipment and storage medium
By constructing a price prediction model that takes into account urban, demographic and economic factors, the problem of limited ability to predict long-term non-stationary product prices in existing technology is solved, and accurate and rapid reflection of future prices is achieved.
Patent Information
- Application Number
- CN202411068971.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2024-10-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technology makes it difficult to accurately predict long-term non-stationary product prices, making it difficult for prediction results to quickly and accurately reflect future actual economic conditions.
By generating static variable sequences, historical variable sequences and known variable sequences as input features of the price prediction model, taking into account urban factors, demographic and economic factors, and objective factors, a time-series continuous variable sequence is formed, which is used to build the price prediction model.
It achieves accurate prediction of long-term and non-stationary product prices, can quickly and accurately reflect future actual economic conditions, and improves the accuracy of forecast price sequences.
Smart Images

Figure CN118735583A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data, and in particular to a product price prediction method, device, equipment and storage medium. Background Art
[0002] In order to understand the price changes of a certain product or even all products in the market in the future, grasp the trend of price changes, so as to understand the impact of the product and provide a strong reference for social and economic management, a method of using time series prediction model to predict product prices is proposed. The model is trained with historical product price data to realize the prediction of future product prices.
[0003] However, in the economic field, changes in product prices are affected by many economic factors, and prices do not show a steady trend. The above method only predicts future prices based on historical price data, which has a lag, and the method generally builds a prediction model for stable time series prices. Therefore, the method has limited ability to predict long-term non-stationary prices, which makes it difficult for the predicted product prices to quickly and accurately reflect the actual economic situation in the future. Summary of the invention
[0004] In view of this, in order to at least solve the technical problem that traditional technologies cannot accurately predict prices in long-term non-stationary trends, the purpose of the present invention is to provide a product price prediction method, device, equipment and storage medium.
[0005] In order to achieve the above purpose, the technical solution adopted by the embodiment of the present invention is as follows: A first aspect of an embodiment of the present invention provides a product price prediction method, which is applied to predict the price of a target product in a target city in a set future time series, comprising: generating a static variable sequence for characterizing the geographical characteristics of the target city according to the city code of the target city and the geographical codes corresponding to the geographical locations of various areas in the target city related to the target product; According to the signaling data corresponding to the mobile device with positioning function in the target city, the total population of each type of population related to the target product in the target city in a set first historical time series before the future time series is obtained to obtain a population variable set; the population variable set includes the total population of each type corresponding to different time windows in the first historical time series; Acquire economic data of various types of economic factors related to the target product in the target city in the first historical time series to obtain an economic variable set; the economic variable set includes various types of economic data corresponding to different time windows in the first historical time series; Merging the population variable set and the economic variable set to obtain a historical variable sequence; Acquire a known variable sequence corresponding to the future time series; the known variable sequence includes at least one of the total number of holidays, the total number of weekends, the total number of sunny days, the total number of rainy days, the total number of cloudy days, or the season type corresponding to different time windows; The static variable sequence, the historical variable sequence and the known variable sequence are input into a pre-built price prediction model to obtain a predicted price sequence corresponding to the future time series.
[0006] A second aspect of an embodiment of the present invention provides a product price prediction device, which is used to predict the price of a target product in a target city in a set future time series, including: A static variable acquisition module is configured to: generate a static variable sequence for characterizing the geographical characteristics of the target city according to the city code of the target city and the geographical codes corresponding to the geographical locations of various areas in the target city related to the target product; The historical variable acquisition module is configured to: acquire, according to the signaling data corresponding to the mobile device with positioning function in the target city, the total population of each type of population related to the target product in the target city in a set first historical time series before the future time series, so as to obtain a population variable set; the population variable set includes the total population of each type corresponding to different time windows in the first historical time series; acquire economic data of each type of economic factors related to the target product in the target city in the first historical time series, so as to obtain an economic variable set; the economic variable set includes each type of economic data corresponding to different time windows in the first historical time series; merge the population variable set and the economic variable set to obtain a historical variable sequence; The known variable acquisition module is configured to: acquire a known variable sequence corresponding to the future time series; the known variable sequence includes at least one of the total number of holidays, the total number of weekends, the total number of sunny days, the total number of rainy days, the total number of cloudy days, or the season type corresponding to different time windows; The price prediction module is configured to: input the static variable sequence, the historical variable sequence and the known variable sequence into a pre-built price prediction model to obtain a predicted price sequence corresponding to the future time series.
[0007] According to a third aspect of an embodiment of the present invention, there is provided an electronic device, comprising a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor can execute the machine executable instructions to implement the product price prediction method provided in the first aspect above.
[0008] According to a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the product price prediction method provided in the first aspect is implemented.
[0009] The product price prediction method, device, equipment and storage medium provided by the embodiment of the present invention use static variable sequences, historical variable sequences and known variable sequences as input features of the price prediction model to predict the predicted price sequence of the target product in the future time series; wherein, firstly, since the static variable sequence is formed by the city code of the target city and the geographical code corresponding to the geographical location of each region in the target city related to the target product, the influence of the city factor and the geographical location of each region in the city related to the target product on the future price of the target product is considered; secondly, since the historical variable sequence is formed by the total population of each type of population related to the target product in the target city and the economic data of each type of economic factors in the first historical time series set between the future time series, the influence of the population situation and economic situation of the target city on the future price of the target product is considered; thirdly, since the known variable sequence is formed by at least one of the total number of holidays, the total number of weekends, the total number of sunny days, the total number of rainy days, the total number of cloudy days, or the season type corresponding to different time windows in the future time series, the influence of future objective factors on the future price of the target product is considered. Therefore, by combining the above three aspects, the price prediction model can be realized based on the geographical factors in the target city that are related to the target product and independent of time, the demographic and economic factors in historical time, and the objective factors in the future time (i.e., the known variable sequence), etc., so that the final output predicted price sequence can quickly and accurately reflect the actual economic situation in the future.
[0010] In addition, by further combining the demographic and economic factors in the historical time and each of the objective factors in the future time according to their respective corresponding time series, a time-series continuous historical variable sequence and a known variable sequence are formed, that is, in the historical variable sequence, the data in the demographic variable set represents the changes in the total population of each type over time, and the data in the economic variable set represents the changes in the economic data corresponding to each economic factor over time; similarly, the data in the known variable sequence represents the changes in each objective factor over time. In this way, since both the historical variable sequence and the known variable sequence consider the actual trends of the demographic factors, economic factors and objective factors that affect the price over time, and the data in the predicted price sequence finally output by the price prediction model represents the development trend of the price in the future; therefore, this scheme of price prediction considering the development trend can not only realize the accurate prediction of product prices in the long term, but also can accurately predict the future prices of non-stationary states, and of course, it is also suitable for accurate prediction of future prices of stationary states. Among them, since the data related to demographic influencing factors are obtained based on the signaling data of mobile devices, it can not only solve the difficulty and lag problems of obtaining data related to demographic influencing factors, but also ensure the objectivity and accuracy of the acquired data, thereby further improving the accuracy of the predicted price series obtained in the final prediction.
[0011] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0013] Figure 1 A structural block diagram of an electronic device provided by an embodiment of the present invention is shown; Figure 2 A flowchart of a product price prediction method provided by an embodiment of the present invention is shown; Figure 3 A functional module diagram of a product price prediction device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0014] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0015] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present invention.
[0016] It should be noted that relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0017] In order to at least solve the technical problem that the traditional technology cannot accurately predict the price of long-term non-stationary trends, the present invention provides a product price prediction method, which uses static variable sequences, historical variable sequences and known variable sequences as input features of a price prediction model to predict the predicted price sequence of a target product in a future time series; wherein, on the first hand, since the static variable sequence is formed by the city code of a target city and the geographical code corresponding to the geographical location of each region in the target city related to the target product, the influence of the city factor and the geographical location of each region in the city related to the target product on the future price of the target product is considered; on the second hand, since the historical variable sequence is formed by the total population of each type of population related to the target product in the target city and the economic data of each type of economic factors in the target city in a set first historical time series between the future time series, the influence of the population situation and the economic situation of the target city on the future price of the target product is considered; on the third hand, since the known variable sequence is formed by at least one of the total number of holidays, the total number of weekends, the total number of sunny days, the total number of rainy days, the total number of cloudy days, or the season type corresponding to different time windows in the future time series, the influence of future objective factors on the future price of the target product is considered. Therefore, by combining the above three aspects, the price prediction model can be realized based on the geographical factors in the target city that are related to the target product and independent of time, the demographic and economic factors in historical time, and the objective factors in the future time (i.e., the known variable sequence), etc., so that the final output predicted price sequence can quickly and accurately reflect the actual economic situation in the future.
[0018] In addition, by further combining the demographic and economic factors in the historical time and each of the objective factors in the future time according to their respective corresponding time series, a time-series continuous historical variable sequence and a known variable sequence are formed, that is, in the historical variable sequence, the data in the demographic variable set represents the changes in the total population of each type over time, and the data in the economic variable set represents the changes in the economic data corresponding to each economic factor over time; similarly, the data in the known variable sequence represents the changes in each objective factor over time. In this way, since both the historical variable sequence and the known variable sequence consider the actual trends of the demographic factors, economic factors and objective factors that affect the price over time, and the data in the predicted price sequence finally output by the price prediction model represents the development trend of the price in the future; therefore, this scheme of price prediction considering the development trend can not only realize the accurate prediction of product prices in the long term, but also can accurately predict the future prices of non-stationary states, and of course, it is also suitable for accurate prediction of future prices of stationary states. Among them, since the data related to demographic influencing factors are obtained based on the signaling data of mobile devices, it can not only solve the difficulty and lag problems of obtaining data related to demographic influencing factors, but also ensure the objectivity and accuracy of the acquired data, thereby further improving the accuracy of the predicted price series obtained in the final prediction.
[0019] The product price prediction method provided by the present invention can be applied to electronic devices. Figure 1 , is a block diagram of the structure of an electronic device. The electronic device 100 includes a memory 110, a processor 120 and a communication module 130. The memory 110, the processor 120 and the communication module 130 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines.
[0020] The memory is used to store programs or data. The memory may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc.
[0021] The processor is used to read / write data or programs stored in the memory and execute corresponding functions.
[0022] The communication module is used to establish a communication connection between the electronic device and other communication terminals through a network, and is used to send and receive data through the network.
[0023] It should be understood that Figure 1 The structure shown is only a schematic diagram of the structure of the electronic device, and the electronic device may also include Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown. Figure 1 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0024] In some embodiments, the electronic device may be configured in a retail terminal, or may be configured in a service center that establishes communication with the retail terminal, which is not limited in this embodiment of the present invention.
[0025] The following combination Figure 2 The product price prediction method provided by the embodiment of the present invention is described. Figure 2 : is a flow chart of a product price prediction method provided by an embodiment of the present invention. The product price prediction method is applied to predict the price of a target product in a target city in a set future time series. The product price prediction method includes: In step S100, a static variable sequence for characterizing the geographical characteristics of the target city is generated according to the city code of the target city and the geographical codes corresponding to the geographical locations of various areas in the target city related to the target product; In step S200, according to the signaling data corresponding to the mobile device with positioning function in the target city, the total population of each type of population related to the target product in the target city in a set first historical time series before the future time series is obtained to obtain a population variable set; the population variable set includes the total population of each type corresponding to different time windows in the first historical time series; In step S300, economic data of various types of economic factors related to the target product in the target city in the first historical time series are obtained to obtain an economic variable set; the economic variable set includes various types of economic data corresponding to different time windows in the first historical time series; In step S400, the population variable set and the economic variable set are combined to obtain a historical variable sequence; In step S500, a known variable sequence corresponding to the future time series is obtained; the known variable sequence includes at least one of the total number of holidays, the total number of weekends, the total number of sunny days, the total number of rainy days, the total number of cloudy days, or the season type corresponding to different time windows; In step S600, the static variable sequence, the historical variable sequence and the known variable sequence are input into a pre-built price prediction model to obtain a predicted price sequence corresponding to the future time series.
[0026] When it is necessary to predict the future price of some or a certain product in some or a certain city, the product price prediction method provided by the embodiment of the present invention can be executed by an electronic device to predict and output the future price of the product in the city.
[0027] In some embodiments, if there is a need to regularly predict the future price of a target product, a regular execution mode can be configured in an electronic device equipped with the product price prediction method provided by an embodiment of the present invention, so that the electronic device can regularly execute the product price prediction method provided by an embodiment of the present invention, and then regularly predict the future price of the product concerned by the user. The time period corresponding to the regular execution mode can be a quarterly cycle or a half-year cycle, but is not limited thereto, and can also be adjusted or configured according to actual needs.
[0028] In the above, some or a certain product can be understood as the target product in step S100, and some or a certain city can be understood as the target city in step S100. The target product and the target city can be input by the user according to the actual prediction demand, or they can be pre-configured according to the user demand in the development stage of the product price prediction method provided in the embodiment of the present invention. For example, the target product can be configured as a thermal coal product in the development stage.
[0029] In addition, when there are multiple configured target products and target cities, for example, assuming that there are three target products, namely product A, product B and product C, for product A, the target cities configured for it are city A, city B and city C. Based on this, it can be seen that product A has an association relationship with city A, city B and city C. When predicting the future price of product A in city A, city B and city C, product A and city A can be used as the first group of configuration parameters, product A and city B can be used as the second group of configuration parameters, and product A and city C can be used as the third group of configuration parameters, and then steps S100 to S600 can be performed in groups. It can be understood that steps S100 to S600 can be used to process based on the first group of configuration parameters to obtain the corresponding future price prediction results, and then based on the second group of configuration parameters to obtain the corresponding future price prediction results, and so on, to complete the prediction of the future price of product A in each associated city. It should be noted that in the process of completing the prediction of the future price of product A in each associated city, the execution of the prediction process can be executed in parallel or in series, and the embodiment of the present invention does not limit this. Similarly, in the process of predicting the future prices of different products in respective cities associated with them, the prediction process may be executed in parallel or in series, which is not limited in the embodiment of the present invention.
[0030] Before executing the product price prediction method provided by the embodiment of the present invention, it is necessary to pre-build a price prediction model. In order to ensure that the output results of the price prediction model can quickly and accurately reflect the actual economic situation in the future, accurately predict the product prices in the long term, and be applicable to the prediction of future prices in non-stationary states, in some embodiments, the product price prediction method provided by the embodiment of the present invention may also include a process of constructing a price prediction model, and the construction process includes the following steps: In step S010, city codes of multiple cities and geographic codes corresponding to the geographic locations of the regions in each city are obtained to obtain a static variable training sequence corresponding to each city; In step S020, according to the signaling data corresponding to the mobile devices with positioning functions in each city, the total population of each type of population in each city in the set second historical time series is obtained to obtain a population variable training set corresponding to each city; In step S030, the economic data of each type of economic factor in each city in the second historical time series is obtained to obtain a training set of economic variables corresponding to each city; In step S040, for each city, the population variable training set and the economic variable training set corresponding to the city are merged to obtain a historical variable training sequence corresponding to each city; In step S050, a known variable training sequence and a real price sequence corresponding to a third historical time series of each city are obtained; the type of known variables included in the third historical time series is the same as the type of known variables included in the future time series; the length of the second historical time series is greater than the length of the first historical time series, and the length of the third historical time series is greater than the length of the future time series; In step S060, the initial model is iteratively trained according to the static variable training sequence, historical variable training sequence, known variable training sequence and price sequence corresponding to each city until the price prediction model is obtained.
[0031] For step S010, the multiple cities are all cities where the target product is sold. For each city, the zip code corresponding to the city can be used as the city code, but it is not limited to this; in addition, each area related to the target product in each city can be understood as an area that affects the price of the target product or the supply and demand of the target product. These areas are generally areas that have a greater impact on the economic development of the city, for example, industrial areas, commercial areas, service areas, and residential areas. These areas are generally common to all types of target products. Based on this example, for each city, the geographical locations of all industrial areas, all commercial areas, all service areas, and all residential areas in the city can be obtained. The geographical location refers to the longitude and latitude position, and then according to the unified location coding rules, according to the geographical location of each area, respectively, the coding is performed to obtain the geographical code corresponding to the geographical location of each area. The conversion of the geographical location into the geographical code is mainly to simplify the data, so as to facilitate computer recognition and understanding, thereby improving the computer operation efficiency. The location coding rules can be referred to in the relevant technology. As long as the longitude and latitude positions are converted into coded data suitable for computer processing, the embodiment of the present invention does not limit this. Based on this, assuming that a city contains 2 industrial areas, 3 commercial areas, 4 service areas and 8 residential areas, the static variable training sequence corresponding to the city can be expressed as: {city code, geographic code of industrial area 1, geographic code of industrial area 2, geographic code of commercial area 1, geographic code of commercial area 2, geographic code of commercial area 3, geographic code of service area 1, geographic code of service area 2, geographic code of service area 3, geographic code of service area 4, geographic code of residential area 1, geographic code of residential area 2...geographic code of residential area 8}.
[0032] For step S020, the mobile device may be a mobile device equipped with a SIM card and activated with the SIM card, such as a mobile phone, a tablet, a portable computer, a smart watch, etc. However, in some embodiments, since all users basically carry their mobile phones when going out, in order to improve the accuracy of the obtained population variable training set, only the signaling data corresponding to the mobile phone may be selected to obtain the total population of each type of population related to the target product in each city in the second historical time series, wherein the various types of population related to the target product may be understood as the target population that will consume the target product, for example, if the target product is a tobacco and alcohol product, then the various types of population may include: male population, population that frequently goes to and from tobacco and alcohol sales places; if the target product is a thermal coal product, then the various types of population may include: working population, resident population, tourist population, high-consumption population whose total consumption meets the set requirements, and population of the city. Wherein, the total consumption meeting the set requirements may be understood as the population whose average monthly consumption exceeds the set consumption threshold, and / or, the population that frequently goes to and from bustling places is analyzed based on mobile phone signaling. The working population can be determined based on the user's location data on weekdays. For example, when a user stays in an industrial area, a commercial area, or a service area for more than a set time threshold, the user is considered to be a working population. The industrial area may refer to a circular area with the location of the industrial area as the center and a set distance as the radius, but is not limited thereto. Similarly, the commercial area and service area can also be understood based on the explanation of the industrial area, which will not be elaborated here. In some examples, the population variable training set can be recorded in a table. For example, in the row header of the table, it can be arranged in the following order: city code, total working population, total resident population, total tourist population, total consumer population, and total population of the city. Since the above data is obtained according to the second historical time series, it is assumed that in the second historical time series, the above data are counted in units of one month, and the statistical period is 24 months. If January 1, 2021 to December 31, 2022 is the statistical period, then in the column header of the table, it can be arranged in chronological order, that is, January 1, 2021 to January 30, February 1, 2021 to February 28, 2021, March 1, 2021 to March 31, 2021... November 1, 2022 to November 30, December 1, 2022 to December 31. In each cell between the row header and the column header of the table, the corresponding total population is recorded. Based on this, the different time windows mentioned above are the different times corresponding to data statistics in units of one month. For example, January 1 to January 30, 2021 is a time window, and November 1 to November 30, 2022 is another time window.
[0033] In some embodiments, in order to improve data capture efficiency and accuracy, the collection of the geographical locations of the above-mentioned regions and the collection of various types of population data can be obtained through the geohash7 network.
[0034] For step S030, the economic data of various types of economic factors related to the target product in each city may include but are not limited to: investment data, import and export data, consumption data, financial data, industrial chain data, and substitute data. The investment data may include but are not limited to: one or more of the total fixed asset investment, the total real estate investment, the total infrastructure investment, the total manufacturing investment, and the cumulative year-on-year investment; the import and export data include but are not limited to: the total output and total amount of the target product; the consumption data include but are not limited to: the total retail sales of social consumer goods and the total retail sales of Internet physical consumption; the financial data include but are not limited to: one or more of the deposit index, the bank lending rate, and the exchange rate; the industrial chain data include but are not limited to: one or more of the output of the target product and its raw materials, the inventory of the target product and its raw materials, the transportation volume of the target product and its raw materials, and the consumption of the target product and its raw materials; the substitute data include but are not limited to: one or more of the substitute products, the inventory of substitutes, the consumption of substitutes, the price of substitutes, the inventory of substitute raw materials, the output of substitute raw materials, the consumption of substitute raw materials, and the price of substitute raw materials. Similarly, taking the example of the second historical time series mentioned above as an example, each economic data should also be counted in units of one month to obtain the training set of economic variables corresponding to each city. The representation form of the economic variable training set can refer to the representation form of the population variable training set in step S020, which will not be described in detail here.
[0035] For step S040, the historical variable training sequence corresponding to each city can also be expressed in the form of a table. For example, for each city, on the basis of the table corresponding to the corresponding population variable training set, the text content of the economic data corresponding to the city can be added to the row header, and then the corresponding economic data value can be added according to the statistical time indicated by the column header. In this way, the population variable training set and the economic variable training set of the same city can be merged to obtain the corresponding historical variable training sequence.
[0036] For step S050, since the principle of price prediction is to predict the price in the future based on the historical data in the past, in order to achieve the accuracy of the price prediction model obtained by training, it is necessary to further obtain the known variable sequence and the real price sequence in the third historical time series. Among them, since it is necessary to form multiple groups of training samples based on the historical data corresponding to the second historical time series, the third historical time series contains the time overlapping with the second historical time series and the time after the second historical time series. For example, assuming that 12 months of historical data are used as a group of training samples to predict the price in the next 6 months, based on the example of the second historical time series, that is, the time period corresponding to the second historical time series is January 1, 2021 to December 31, 2022, so, assuming that a group of training samples is February 1, 2021 to February 28, 2022, then the corresponding real price series and the time corresponding to the known variable series should be: March 1, 2022 to August 31, 2022. In addition, to facilitate unified data acquisition and improve data acquisition efficiency, in some embodiments, the known variable training sequence and the actual price sequence can be merged and recorded in the above table in accordance with the relevant records above, and during the merging process, the corresponding date is added to the column header of the table according to the newly added data, and the corresponding text is added to the row header.
[0037] It should be noted that the execution order of step S020, step S030 and step S040 is not limited.
[0038] After obtaining the static variable training sequence, historical variable training sequence, known variable training sequence and price sequence corresponding to each city for training the model through steps S010 to S050, step S060 can be executed to distinguish samples by city, and the static variable training sequence, historical variable training sequence, known variable training sequence and price sequence corresponding to the same city are formed into labeled training samples, and the initial model is iteratively trained until the training error is less than the set error threshold, and the price prediction model can be obtained. The price sequence is used as a label. The training principle of the neural network model can be seen in the relevant technology, which will not be explained in detail here.
[0039] Although a high-precision price prediction model can be obtained through the above embodiments, in order to further improve the accuracy of the price prediction model, in some embodiments, the product price prediction method provided by the embodiments of the present invention also provides a solution for expanding samples, so as to train the initial model based on more samples, thereby further improving the accuracy of the price prediction model. That is, after obtaining the historical variable training sequence corresponding to each city, the above construction process may also include: In step S041, time lag processing is performed on the sub-variables in the historical variable training sequence corresponding to each city to obtain a historical variable training sequence after the sample data volume is amplified.
[0040] For step S041, the technical principle of using the time lag principle to perform sample expansion processing on the sub-variables in the historical variable training sequence can be found in the related art, which will not be described in detail here. The sub-variables are the factors that change over time in the historical variable training sequence. For example, in the example of expressing the historical variable training sequence in the form of a table, the sub-variables are the items recorded in the row header of the table.
[0041] Based on any of the above embodiments, it can be understood that regardless of whether the historical variable training sequence is subjected to sample amplification processing, in order to improve the efficiency of sample grouping, in some embodiments, the product price prediction method provided by the embodiment of the present invention further provides a solution for implementing sample data grouping using a sliding window, that is, after obtaining the historical variable training sequence, the known variable training sequence and the real price sequence corresponding to each city, the construction process may further include: In step S051, a first sliding window is used to perform sliding processing on the historical variable training sequence corresponding to each city to obtain multiple historical variable sample sequences corresponding to the historical variable training sequence; the length of the first sliding window is the same as the length of the first historical time series; In step S052, a second sliding window is used to slide the known variable training sequence and the real price sequence corresponding to each city to obtain multiple known variable sample sequences corresponding to the known variable training sequence and multiple price label sequences corresponding to the real price sequence; the length of the second sliding window is the same as the length of the future time series.
[0042] Accordingly, in the above step S060, the step of iteratively training the initial model according to the static variable training sequence, historical variable training sequence, known variable training sequence and price sequence corresponding to each city includes: In step S061, for each historical variable sample sequence corresponding to each city, the historical variable sample sequence is associated with the corresponding known variable sample sequence and price tag sequence to form a set of sample data sets, so as to obtain multiple sets of sample data sets corresponding to each city; In step S062, the initial model is iteratively trained using the static variable training sequence corresponding to each city and multiple groups of sample data sets.
[0043] Based on the previous embodiment, in some embodiments, in order to further improve the prediction accuracy of the trained price prediction model, multiple groups of sample data can be further divided to construct training sets, test sets and validation sets. For example, multiple groups of samples can be divided into training sets, test sets and validation sets in turn according to the sample group number ratio of 7:2:1.
[0044] In order to further improve the robustness of the price prediction model obtained through training, in some embodiments, the product price prediction method provided by the embodiment of the present invention further processes multiple groups of sample data, that is, in step S062, the step of iteratively training the initial model using the static variable training sequence corresponding to each city and multiple groups of sample data sets includes: In step S0621, for the multiple groups of sample data sets corresponding to each city, the input order of the multiple groups of sample data sets into the initial model is randomly disrupted; In step S0622, the initial model is iteratively trained using the static variable training sequence corresponding to each city and multiple groups of sample data sets after the input order is disrupted.
[0045] Based on the above-mentioned related embodiments, in order to further improve the richness of sample data and make the features input to the initial model richer, so as to better extract data with a closer correlation with price from multiple groups of sample data, thereby reducing the interference of invalid data and making the accuracy of the trained price prediction model more improved, in some embodiments, the product price prediction method provided by the embodiments of the present invention also provides a solution for optimizing the historical variable sample sequence, that is, before iteratively training the initial model using multiple groups of sample data sets, the construction process may also include: In step S062-1, for each sub-variable sample of different types in the historical variable sample sequence in each group of sample data sets, the variable values of the sub-variable samples corresponding to different time windows are arranged in chronological order to form a variable time series sample sequence corresponding to the sub-variable samples; for example, assuming that the sub-variable is the total number of working population in a city, and the length of the first sliding window is 1 year, the total number of working population is counted in units of one month, therefore, in a group of sample data, for a certain sub-variable, it records the values of the sub-variable corresponding to different months in a year, based on this, it can be understood that the variable time series sample sequence corresponding to a sub-variable sample is: a sequence formed by arranging the values of the sub-variable corresponding to different months in a year in chronological order.
[0046] In step S062-2, for each sub-variable sample, the variable time series sample sequence corresponding to the sub-variable sample is normalized and wavelet decomposed in turn to obtain the low-frequency signal and high-frequency signal corresponding to the sub-variable sample, and the low-frequency signal and high-frequency signal of the sub-variable sample are polar coordinate transformed and Gram matrix processed respectively to obtain the corresponding low-frequency two-dimensional sample image and high-frequency two-dimensional sample image; wherein the low-frequency signal is used to characterize the development trend of the price in the corresponding time period, and the high-frequency signal is used to characterize the volatility of the price in the corresponding time period; for the steps of polar coordinate transforming and Gram matrix processing of the low-frequency signal and high-frequency signal of the sub-variable sample respectively, the processing logic is explained by taking the low-frequency signal as an example, that is, the low-frequency signal of the sub-variable sample is first polar coordinate transformed, and then the result obtained by polar coordinate transformation is processed by Gram matrix, so as to obtain the low-frequency two-dimensional sample image. Based on the same principle, the high-frequency two-dimensional sample image can be obtained.
[0047] In step S062-3, the historical variable sample sequence in each group of sample data sets is updated to a sequence formed by corresponding low-frequency two-dimensional sample images and high-frequency two-dimensional sample images; In step S062-4, for the price tag sequence in each group of sample data sets, the price tag sequence is subjected to wavelet decomposition processing to obtain low-frequency signals and high-frequency signals corresponding to the price tag sequence, and polar coordinate transformation and Gram matrix processing are performed on the low-frequency signals and high-frequency signals corresponding to the price tag sequence, respectively, to obtain corresponding low-frequency two-dimensional sample images and high-frequency two-dimensional sample images; similarly, the low-frequency signal corresponding to the price tag sequence is used to characterize the development trend of the price in the corresponding time period, and the high-frequency signal corresponding to the price tag sequence is used to characterize the volatility and high-frequency signal of the price in the corresponding time period.
[0048] In step S062-5, the price tag sequence in each set of sample data sets is updated to a sequence formed by corresponding low-frequency two-dimensional sample images and high-frequency two-dimensional sample images; In step S062-6, for each group of updated sample data sets, the corresponding historical variable sample sequence is screened for sub-variables according to the corresponding price tag sequence to obtain the historical variable sample sequence after the second update.
[0049] For step S062-6, in some embodiments, the product price prediction method provided by the embodiment of the present invention further provides a sub-variable screening scheme to improve the accuracy of the screened sub-variables, thereby further improving the accuracy of the trained price prediction model. Based on this, in step S062-6, the step of screening the sub-variables of the corresponding historical variable sample sequence according to the corresponding price tag sequence includes: In step S062-61, for each low-frequency two-dimensional sample image and each high-frequency two-dimensional sample image in each historical variable sample sequence, a first Hamming distance between the low-frequency two-dimensional sample image and the corresponding low-frequency two-dimensional sample image in the price tag sequence is calculated, and a second Hamming distance between the high-frequency two-dimensional sample image and the corresponding high-frequency two-dimensional sample image in the price tag sequence is calculated; In step S062-62, for each historical variable sample sequence, the low-frequency two-dimensional sample images whose first Hamming distance does not meet the set first distance threshold and their corresponding high-frequency two-dimensional sample images are deleted, or the high-frequency two-dimensional sample images whose second Hamming distance does not meet the set second distance threshold and their corresponding low-frequency two-dimensional sample images are deleted to obtain the historical variable sample sequence after the second update.
[0050] Based on the previous embodiment, in the actual application of predicting product prices using a price prediction model, in order to ensure the accuracy of the prediction results, the types of each variable obtained in steps S200 and S300 are the same as the types of each variable in the historical variable sample sequence after the second update obtained after steps S062-62.
[0051] Based on any of the above embodiments, in some embodiments, the initial model may be a TFT model, which may better improve the prediction effect of the trained price prediction model.
[0052] Therefore, after the price prediction model is constructed through any of the above embodiments, the price prediction model can be called during the execution of step S600 to achieve the future price prediction of the target product in the target city. The following describes the working process involved in the above steps S100 to S600 in the product price prediction method provided by the embodiment of the present invention, taking the price of a target product in a target city as an example: First, static variable sequences, historical variable sequences and known variable sequences are obtained through steps S100 to S500. The acquisition of each sequence here can refer to the relevant records in the model training process and will not be elaborated here. It should be noted that the type of each variable in each sequence must be consistent with the type of each variable applied in the model training process to ensure the accuracy of the price prediction results.
[0053] After obtaining the static variable sequence, the historical variable sequence and the known variable sequence, step S600 can be executed to input the static variable sequence, the historical variable sequence and the known variable sequence into the price prediction model to obtain the predicted price sequence corresponding to the future time series.
[0054] For the price prediction model trained by using the historical variable sample sequence obtained by processing in steps S062-1 to S062-6, the product price prediction method provided by the embodiment of the present invention further performs adaptive adjustment on each sequence based on this, that is, before the step of inputting the static variable sequence, the historical variable sequence and the known variable sequence into the pre-built price prediction model, the product price prediction method provided by the embodiment of the present invention may further include: In step S510, for each sub-variable of different types in the historical variable sequence, the variable values of the sub-variable corresponding to different time windows are arranged in chronological order to form a variable time series sequence corresponding to the sub-variable; In step S520, for each of the sub-variables, normalization and wavelet decomposition processing are sequentially performed on the variable time series corresponding to the sub-variable to obtain a low-frequency signal and a high-frequency signal corresponding to the sub-variable; the low-frequency signal is used to characterize the development trend of the price in the first historical time series, and the high-frequency signal is used to characterize the fluctuation of the price in the first historical time series; In step S530, for each sub-variable, polar coordinate transformation and Gram matrix processing are performed on the low-frequency signal and the high-frequency signal of the sub-variable respectively, so as to obtain a low-frequency two-dimensional image corresponding to the low-frequency signal and a high-frequency two-dimensional image corresponding to the high-frequency signal; In step S540, the historical variable sequence is updated to a sequence formed by all low-frequency two-dimensional images and all high-frequency two-dimensional images.
[0055] For understanding of steps S510 to S540, please refer to the relevant records above, which will not be repeated here.
[0056] Based on the previous embodiment, in order to successfully obtain the final predicted price result, in some embodiments, step S600 is adaptively adjusted, that is, in step S600, the static variable sequence, the historical variable sequence and the known variable sequence are input into the pre-built price prediction model to obtain the predicted price sequence corresponding to the future time series, which may include: In step S610, the static variable sequence, the updated historical variable sequence and the known variable sequence are input into the price prediction model to obtain a low-frequency signal and a high-frequency signal corresponding to the future time series; In step S620, wavelet reconstruction is performed on the low-frequency signal and the high-frequency signal corresponding to the future time series to obtain a predicted price sequence corresponding to the future time series.
[0057] Based on any of the above embodiments, in some embodiments, in order to improve the accuracy of the prediction, the data of the first historical time series that is before the future time series and has a longer length than the future time series can be used for price prediction, that is, the length of the first historical time series is greater than the length of the future time series.
[0058] It is worth noting that in the embodiments of the present invention, the thresholds mentioned can be set according to actual experience or requirements, and the embodiments of the present invention do not limit this. In addition, the technical features or technical solutions in any of the above embodiments of the present invention can be combined with each other as long as there is no combination contradiction.
[0059] In order to execute the corresponding steps in the above embodiments and various possible methods, a method for implementing a product price prediction device is given below. Optionally, the product price prediction device can adopt the above Figure 1 For further information, please refer to Figure 3 , Figure 3 This is a functional module diagram of a product price prediction device provided by an embodiment of the present invention. It should be noted that the basic principle and technical effects of the product price prediction device provided by this embodiment are the same as those of the above embodiments. For the sake of brief description, for parts not mentioned in this embodiment, reference can be made to the corresponding contents in the above embodiments. The product price prediction device 300 includes: The static variable acquisition module 310 is configured to: generate a static variable sequence for characterizing the geographical characteristics of the target city according to the city code of the target city and the geographical codes corresponding to the geographical locations of the regions in the target city related to the target product; The historical variable acquisition module 320 is configured to: acquire, according to the signaling data corresponding to the mobile device with positioning function in the target city, the total population of each type of population related to the target product in the target city in a set first historical time series before the future time series, so as to obtain a population variable set; the population variable set includes the total population of each type corresponding to different time windows in the first historical time series; acquire economic data of each type of economic factors related to the target product in the target city in the first historical time series, so as to obtain an economic variable set; the economic variable set includes each type of economic data corresponding to different time windows in the first historical time series; merge the population variable set and the economic variable set to obtain a historical variable sequence; The known variable acquisition module 330 is configured to: acquire a known variable sequence corresponding to the future time series; the known variable sequence includes at least one of the total number of holidays, the total number of weekends, the total number of sunny days, the total number of rainy days, the total number of cloudy days, or the season type corresponding to different time windows; The price prediction module 340 is configured to: input the static variable sequence, the historical variable sequence and the known variable sequence into a pre-built price prediction model to obtain a predicted price sequence corresponding to the future time series.
[0060] In some embodiments, the product price prediction device 300 may further include: The historical variable update module is configured as follows: Before the price prediction module 340 inputs the static variable sequence, the historical variable sequence and the known variable sequence into the pre-built price prediction model, for each sub-variable of different types in the historical variable sequence, the variable values of the sub-variable corresponding to different time windows are arranged in chronological order to form a variable time series sequence corresponding to the sub-variable; For each of the sub-variables, normalizing and wavelet decomposition processing are sequentially performed on the variable time series corresponding to the sub-variable to obtain a low-frequency signal and a high-frequency signal corresponding to the sub-variable; the low-frequency signal is used to characterize the development trend of the price in the first historical time series, and the high-frequency signal is used to characterize the fluctuation of the price in the first historical time series; For each of the sub-variables, respectively performing polar coordinate transformation and Gram matrix processing on the low-frequency signal and the high-frequency signal of the sub-variable to obtain a low-frequency two-dimensional image corresponding to the low-frequency signal and a high-frequency two-dimensional image corresponding to the high-frequency signal; The historical variable sequence is updated to a sequence formed by all low-frequency two-dimensional images and all high-frequency two-dimensional images.
[0061] Based on the previous embodiment, the price prediction module 340 inputs the static variable sequence, the historical variable sequence and the known variable sequence into the pre-built price prediction model to obtain the predicted price sequence corresponding to the future time series, which is configured as follows: Inputting the static variable sequence, the updated historical variable sequence and the known variable sequence into the price prediction model to obtain a low-frequency signal and a high-frequency signal corresponding to the future time series; The low-frequency signal and the high-frequency signal corresponding to the future time series are reconstructed by wavelet, so as to obtain a predicted price sequence corresponding to the future time series.
[0062] In some embodiments, the length of the first historical time series is greater than the length of the second historical time series, and the length of the second historical time series is the same as the length of the future time series.
[0063] In some embodiments, the product price prediction device 300 may further include: The model building module is configured to: Obtain city codes of multiple cities and geographic codes corresponding to the geographic locations of the regions in each city to obtain a static variable training sequence corresponding to each city; According to the signaling data corresponding to the mobile devices with positioning functions in each city, the total population of each type of population in each city in the set second historical time series is obtained to obtain a population variable training set corresponding to each city; Obtaining economic data of each type of economic factor in each city in the second historical time series to obtain a training set of economic variables corresponding to each city; For each city, the population variable training set and the economic variable training set corresponding to the city are merged to obtain a historical variable training sequence corresponding to each city; Obtaining a known variable training sequence and a real price sequence corresponding to a third historical time series for each city; the type of known variables included in the third historical time series is the same as the type of known variables included in the future time series; the length of the second historical time series is greater than the length of the first historical time series, and the length of the third historical time series is greater than the length of the future time series; The initial model is iteratively trained according to the static variable training sequence, historical variable training sequence, known variable training sequence and price sequence corresponding to each city until the price prediction model is obtained.
[0064] In some embodiments, the model building module is further configured to: after obtaining the historical variable training sequence corresponding to each city, perform time lag processing on the sub-variables in the historical variable training sequence corresponding to each city to obtain the historical variable training sequence after the sample data volume is expanded.
[0065] In some embodiments, the model building module is further configured to: After obtaining the historical variable training sequence, known variable training sequence and real price sequence corresponding to each city, a first sliding window is used to perform sliding processing on the historical variable training sequence corresponding to each city to obtain multiple historical variable sample sequences corresponding to the historical variable training sequence; the length of the first sliding window is the same as the length of the first historical time series; A second sliding window is used to perform sliding processing on the known variable training sequence and the real price sequence corresponding to each city, so as to obtain a plurality of known variable sample sequences corresponding to the known variable training sequence and a plurality of price label sequences corresponding to the real price sequence; the length of the second sliding window is the same as the length of the future time series; The step of iteratively training the initial model according to the static variable training sequence, historical variable training sequence, known variable training sequence and price sequence corresponding to each city includes: For each historical variable sample sequence corresponding to each city, the historical variable sample sequence is associated with the corresponding known variable sample sequence and the price tag sequence to form a set of sample data sets, so as to obtain multiple sets of sample data sets corresponding to each city; The initial model is iteratively trained using the static variable training sequence and multiple groups of sample data sets corresponding to each city.
[0066] In some embodiments, the model building module uses the static variable training sequence corresponding to each city and multiple groups of sample data sets to iteratively train the initial model, and is configured as follows: For each of the multiple sample data sets corresponding to each city, the order in which the multiple sample data sets are input into the initial model is randomly disrupted; The initial model is iteratively trained using a static variable training sequence corresponding to each city and multiple groups of sample data sets after the input order is disrupted.
[0067] In some embodiments, the model building module is further configured to: Before iteratively training the initial model using multiple groups of sample data sets, for each sub-variable sample of different types in the historical variable sample sequence in each group of sample data sets, the variable values corresponding to different time windows of the sub-variable sample are arranged in chronological order to form a variable time series sample sequence corresponding to the sub-variable sample; For each sub-variable sample, the variable time series sample sequence corresponding to the sub-variable sample is sequentially normalized and wavelet decomposition processed to obtain a low-frequency signal and a high-frequency signal corresponding to the sub-variable sample, and the low-frequency signal and the high-frequency signal of the sub-variable sample are respectively polar coordinate transformed and Gram matrix processed to obtain a corresponding low-frequency two-dimensional sample image and high-frequency two-dimensional sample image; The historical variable sample sequence in each group of sample data sets is updated to a sequence formed by corresponding low-frequency two-dimensional sample images and high-frequency two-dimensional sample images; For the price tag sequence in each group of sample data sets, the price tag sequence is subjected to wavelet decomposition processing to obtain a low-frequency signal and a high-frequency signal corresponding to the price tag sequence, and the low-frequency signal and the high-frequency signal corresponding to the price tag sequence are subjected to polar coordinate transformation and Gram matrix processing to obtain a corresponding low-frequency two-dimensional sample image and a high-frequency two-dimensional sample image; Update the price tag sequence in each set of sample data sets to a sequence formed by the corresponding low-frequency two-dimensional sample images and high-frequency two-dimensional sample images; For each set of updated sample data sets, the corresponding historical variable sample sequence is screened for sub-variables according to the corresponding price tag sequence to obtain the historical variable sample sequence after the second update.
[0068] In some embodiments, the process of the model building module screening sub-variables for the corresponding historical variable sample sequence according to the corresponding price tag sequence is configured as follows: For each low-frequency two-dimensional sample image and each high-frequency two-dimensional sample image in each historical variable sample sequence, a first Hamming distance between the low-frequency two-dimensional sample image and the corresponding low-frequency two-dimensional sample image in the price tag sequence is calculated, and a second Hamming distance between the high-frequency two-dimensional sample image and the corresponding high-frequency two-dimensional sample image in the price tag sequence is calculated; For each historical variable sample sequence, the low-frequency two-dimensional sample images whose first Hamming distance does not meet the set first distance threshold and their corresponding high-frequency two-dimensional sample images are deleted, or the high-frequency two-dimensional sample images whose second Hamming distance does not meet the set second distance threshold and their corresponding low-frequency two-dimensional sample images are deleted to obtain the historical variable sample sequence after the second update.
[0069] In some embodiments, the type of the sub-variable in the historical variable sequence is the same as the type of the sub-variable in the historical variable sample sequence after the second update.
[0070] Optionally, the above modules can be stored in the form of software or firmware. Figure 1 The memory shown in the figure or solidified in the operating system (OS) of the electronic device, and can be Figure 1 Meanwhile, the data and program codes required for executing the above modules can be stored in the memory.
[0071] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0072] In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.
[0073] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.
[0074] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A product price prediction method, characterized in that: The method is applied to predicting the price of a target product in a target city in a set future time series, and the method includes: generating a static variable sequence for characterizing the geographical characteristics of the target city according to the city code of the target city and the geographical codes corresponding to the geographical locations of various areas in the target city related to the target product; According to the signaling data corresponding to the mobile device with positioning function in the target city, the total population of each type of population related to the target product in the target city in a set first historical time series before the future time series is obtained to obtain a population variable set; the population variable set includes the total population of each type corresponding to different time windows in the first historical time series; Acquire economic data of various types of economic factors related to the target product in the target city in the first historical time series to obtain an economic variable set; the economic variable set includes various types of economic data corresponding to different time windows in the first historical time series; Merging the population variable set and the economic variable set to obtain a historical variable sequence; Acquire a known variable sequence corresponding to the future time series; the known variable sequence includes at least one of the total number of holidays, the total number of weekends, the total number of sunny days, the total number of rainy days, the total number of cloudy days, or the season type corresponding to different time windows; The static variable sequence, the historical variable sequence and the known variable sequence are input into a pre-built price prediction model to obtain a predicted price sequence corresponding to the future time series.
2. The method according to claim 1, characterized in that Before the step of inputting the static variable sequence, the historical variable sequence and the known variable sequence into a pre-built price prediction model, the method further includes: For each sub-variable of different types in the historical variable sequence, the variable values of the sub-variable corresponding to different time windows are arranged in chronological order to form a variable time series sequence corresponding to the sub-variable; For each of the sub-variables, normalizing and wavelet decomposition processing are sequentially performed on the variable time series corresponding to the sub-variable to obtain a low-frequency signal and a high-frequency signal corresponding to the sub-variable; the low-frequency signal is used to characterize the development trend of the price in the first historical time series, and the high-frequency signal is used to characterize the fluctuation of the price in the first historical time series; For each of the sub-variables, respectively performing polar coordinate transformation and Gram matrix processing on the low-frequency signal and the high-frequency signal of the sub-variable to obtain a low-frequency two-dimensional image corresponding to the low-frequency signal and a high-frequency two-dimensional image corresponding to the high-frequency signal; The historical variable sequence is updated to a sequence formed by all low-frequency two-dimensional images and all high-frequency two-dimensional images.
3. The method according to claim 2, characterized in that The step of inputting the static variable sequence, the historical variable sequence and the known variable sequence into a pre-built price prediction model to obtain a predicted price sequence corresponding to the future time series includes: Inputting the static variable sequence, the updated historical variable sequence and the known variable sequence into the price prediction model to obtain a low-frequency signal and a high-frequency signal corresponding to the future time series; The low-frequency signal and the high-frequency signal corresponding to the future time series are reconstructed by wavelet, so as to obtain a predicted price sequence corresponding to the future time series.
4. The method according to claim 1, characterized in that: The length of the first historical time series is greater than the length of the future time series.
5. The method according to claim 1, characterized in that The method further includes a process of constructing the price prediction model, and the construction process includes: Obtain city codes of multiple cities and geographic codes corresponding to the geographic locations of the regions in each city to obtain a static variable training sequence corresponding to each city; According to the signaling data corresponding to the mobile devices with positioning functions in each city, the total population of each type of population in each city in the set second historical time series is obtained to obtain a population variable training set corresponding to each city; Obtaining economic data of each type of economic factor in each city in the second historical time series to obtain a training set of economic variables corresponding to each city; For each city, the population variable training set and the economic variable training set corresponding to the city are merged to obtain a historical variable training sequence corresponding to each city; Obtaining a known variable training sequence and a real price sequence corresponding to a third historical time series for each city; the type of known variables included in the third historical time series is the same as the type of known variables included in the future time series; the length of the second historical time series is greater than the length of the first historical time series, and the length of the third historical time series is greater than the length of the future time series; The initial model is iteratively trained according to the static variable training sequence, historical variable training sequence, known variable training sequence and price sequence corresponding to each city until the price prediction model is obtained.
6. The method according to claim 5, characterized in that After obtaining the historical variable training sequence corresponding to each city, the construction process further includes: The sub-variables in the historical variable training sequence corresponding to each city are subjected to time lag processing to obtain the historical variable training sequence after the sample data volume is expanded.
7. The method according to claim 5, characterized in that After obtaining the historical variable training sequence, known variable training sequence and real price sequence corresponding to each city, the construction process further includes: A first sliding window is used to perform sliding processing on the historical variable training sequence corresponding to each city to obtain a plurality of historical variable sample sequences corresponding to the historical variable training sequence; the length of the first sliding window is the same as the length of the first historical time series; A second sliding window is used to perform sliding processing on the known variable training sequence and the real price sequence corresponding to each city, so as to obtain a plurality of known variable sample sequences corresponding to the known variable training sequence and a plurality of price label sequences corresponding to the real price sequence; the length of the second sliding window is the same as the length of the future time series; The step of iteratively training the initial model according to the static variable training sequence, historical variable training sequence, known variable training sequence and price sequence corresponding to each city includes: For each historical variable sample sequence corresponding to each city, the historical variable sample sequence is associated with the corresponding known variable sample sequence and the price tag sequence to form a set of sample data sets, so as to obtain multiple sets of sample data sets corresponding to each city; The initial model is iteratively trained using the static variable training sequence and multiple groups of sample data sets corresponding to each city.
8. The method according to claim 7, characterized in that The step of iteratively training the initial model using the static variable training sequence and multiple groups of sample data sets corresponding to each city includes: For each of the multiple sample data sets corresponding to each city, the order in which the multiple sample data sets are input into the initial model is randomly disrupted; The initial model is iteratively trained using a static variable training sequence corresponding to each city and multiple groups of sample data sets after the input order is disrupted.
9. The method according to claim 7 or 8, characterized in that: Before iteratively training the initial model using multiple sets of sample data sets, the construction process further includes: For each sub-variable sample of different types in the historical variable sample sequence in each group of sample data sets, the variable values of the sub-variable samples corresponding to different time windows are arranged in chronological order to form a variable time series sample sequence corresponding to the sub-variable samples; For each sub-variable sample, the variable time series sample sequence corresponding to the sub-variable sample is sequentially normalized and wavelet decomposed to obtain a low-frequency signal and a high-frequency signal corresponding to the sub-variable sample, and the low-frequency signal and the high-frequency signal of the sub-variable sample are respectively polar coordinate transformed and Gram matrix processed to obtain a corresponding low-frequency two-dimensional sample image and high-frequency two-dimensional sample image; The historical variable sample sequence in each group of sample data sets is updated to a sequence formed by corresponding low-frequency two-dimensional sample images and high-frequency two-dimensional sample images; For the price tag sequence in each group of sample data sets, the price tag sequence is subjected to wavelet decomposition processing to obtain a low-frequency signal and a high-frequency signal corresponding to the price tag sequence, and the low-frequency signal and the high-frequency signal corresponding to the price tag sequence are subjected to polar coordinate transformation and Gram matrix processing to obtain a corresponding low-frequency two-dimensional sample image and a high-frequency two-dimensional sample image; Update the price tag sequence in each set of sample data sets to a sequence formed by the corresponding low-frequency two-dimensional sample images and high-frequency two-dimensional sample images; For each set of updated sample data sets, the corresponding historical variable sample sequence is screened for sub-variables according to the corresponding price tag sequence to obtain the historical variable sample sequence after the second update.
10. The method according to claim 9, characterized in that The step of screening sub-variables of the corresponding historical variable sample sequence according to the corresponding price tag sequence includes: For each low-frequency two-dimensional sample image and each high-frequency two-dimensional sample image in each historical variable sample sequence, a first Hamming distance between the low-frequency two-dimensional sample image and the corresponding low-frequency two-dimensional sample image in the price tag sequence is calculated, and a second Hamming distance between the high-frequency two-dimensional sample image and the corresponding high-frequency two-dimensional sample image in the price tag sequence is calculated; For each historical variable sample sequence, the low-frequency two-dimensional sample images whose first Hamming distance does not meet the set first distance threshold and their corresponding high-frequency two-dimensional sample images are deleted, or the high-frequency two-dimensional sample images whose second Hamming distance does not meet the set second distance threshold and their corresponding low-frequency two-dimensional sample images are deleted to obtain the historical variable sample sequence after the second update.
11. The method according to claim 10, characterized in that The type of the sub-variables in the historical variable sequence is the same as the type of the sub-variables in the historical variable sample sequence after the second update.
12. A product price prediction device, characterized in that: The device is used to predict the price of a target product in a target city in a set future time series, and comprises: A static variable acquisition module is configured to: generate a static variable sequence for characterizing the geographical characteristics of the target city according to the city code of the target city and the geographical codes corresponding to the geographical locations of various areas in the target city related to the target product; The historical variable acquisition module is configured to: acquire, according to the signaling data corresponding to the mobile device with positioning function in the target city, the total population of each type of population related to the target product in the target city in a set first historical time series before the future time series, so as to obtain a population variable set; the population variable set includes the total population of each type corresponding to different time windows in the first historical time series; acquire economic data of each type of economic factors related to the target product in the target city in the first historical time series, so as to obtain an economic variable set; the economic variable set includes each type of economic data corresponding to different time windows in the first historical time series; merge the population variable set and the economic variable set to obtain a historical variable sequence; The known variable acquisition module is configured to: acquire a known variable sequence corresponding to the future time series; the known variable sequence includes at least one of the total number of holidays, the total number of weekends, the total number of sunny days, the total number of rainy days, the total number of cloudy days, or the season type corresponding to different time windows; The price prediction module is configured to: input the static variable sequence, the historical variable sequence and the known variable sequence into a pre-built price prediction model to obtain a predicted price sequence corresponding to the future time series.
13. An electronic device, characterized in that: The invention comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor can execute the machine executable instructions to implement the method according to any one of claims 1 to 11.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.
