Short-term price prediction method, device and electronic equipment based on spot trading
By grading and aggregating the supply and demand related data of spot transactions, the amount of data interaction is reduced, the efficiency of spot transaction price prediction is improved, and the problem of low data interaction efficiency in the existing technology is solved.
Patent Information
- Application Number
- CN202311023956.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-15
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2043-08-15
AI Technical Summary
In the existing spot transaction prediction scheme, the amount of data interacted by the parties is large, resulting in low efficiency of data interaction between the server and the participants, making it difficult to effectively conduct short-term price predictions.
By obtaining the data division rules of spot transactions, grading supply and demand related data, and summarizing the divided statistical indicators to determine supply and demand relationship information, input them into the short-term price prediction model to reduce the amount of data interaction.
It effectively reduces the amount of data interaction between participants and the server, and improves the efficiency and accuracy of spot transaction price prediction.
Smart Images

Figure CN117010936B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a short-term price prediction method, device and electronic equipment based on spot transactions. Background Art
[0002] The price changes of spot transactions are closely related to supply and demand relationships, policies, etc.
[0003] The existing spot trading prediction solution is that all parties upload all data in plain text to the server. The server analyzes the supply and demand relationship through data from multiple parties, and makes a comprehensive judgment based on policy, form and other data, and then predicts the short-term price fluctuations of spot transactions.
[0004] However, if all data is uploaded, the amount of data exchanged between the parties will be large. Summary of the invention
[0005] The present invention provides a short-term price prediction method, device and electronic equipment based on spot transactions to reduce the amount of data exchanged between parties.
[0006] In order to solve the above-mentioned technical problems, the present invention is achieved as follows:
[0007] In a first aspect, the present application provides a short-term price prediction method based on spot transactions, which is applied to a server, and the method includes: obtaining data division rules for spot transactions, the data division rules including grading conditions for supply and demand related data, the grading conditions including transaction volume grading conditions, and the supply and demand related data including the quantity of goods provided by the goods provider and the quantity of goods demanded by the goods demander; issuing the data division rules to each participant, and each participant divides the local supply and demand related data into data levels according to the data division rules, and counts the data quantity of the divided supply and demand related data to obtain statistical indicators corresponding to each level of supply and demand related data; receiving statistical indicators corresponding to each level uploaded by each participant, and summarizing the statistical indicators of the same level to determine the summary data of the supply and demand related data at each level; determining the supply and demand relationship information of the spot transaction based on the summary data of the supply and demand related data at each level, so as to input the supply and demand relationship information into the short-term price prediction model, determine the target prediction result, and feed back the target prediction result to the price demander.
[0008] Furthermore, the data division rules include a first data division rule corresponding to the product provider and a second data division rule corresponding to the product demander; the data division rules are sent to each participant, including: based on the first identification information of the participant, sending the first data division rule to the product provider; based on the second identification information of the participant, sending the second data division rule to the product provider.
[0009] Furthermore, the supply and demand related data include the quantity of goods provided by the goods provider, and the goods provider is used to perform the following steps based on the first data classification rule: according to the first data classification rule, obtain the transaction volume classification conditions, and the transaction volume classification conditions are used to classify the quantity of goods provided into levels less than or equal to the quantity of goods provided; according to the transaction volume classification conditions, classify the quantity of goods provided, and count the data quantity of the divided quantity of goods provided.
[0010] Furthermore, the supply and demand related data include the demand for goods by the demander of the goods, and the demander of the goods is used to perform the following steps based on the second data classification rule: according to the second data classification rule, obtain the transaction volume classification condition, and the transaction volume classification condition is used to classify the demand for goods into a level greater than or equal to the demand for goods; according to the transaction volume classification condition, classify the demand for goods, and count the data quantity of the divided demand for goods.
[0011] Furthermore, the statistical indicators of the same level are aggregated to determine the aggregated data of the supply and demand related data at each level, including: sending first conversion data for replacing the supply and demand related data at each level to the participants, the first conversion data sent to each participant being the same; obtaining the first conversion data corresponding to the statistical indicators uploaded by the participants; and aggregating the statistical indicators of the same first conversion data to determine the aggregated data of the supply and demand related data at each level.
[0012] Furthermore, the statistical indicators of the same level are aggregated to determine the aggregated data of supply and demand related data at each level, including: sending second conversion data to the participants to replace the supply and demand related data at each level, the second conversion data sent to each participant is different, and the server stores the association relationship between the second conversion data of each participant; obtaining the second conversion data corresponding to the statistical indicators uploaded by the participants; and aggregating the statistical indicators of the same level based on the association relationship between the second conversion data and the second conversion data of each participant to determine the aggregated data of the supply and demand related data at each level.
[0013] Furthermore, the supply and demand relationship information of spot transactions is determined based on the summary data of supply and demand related data at each level, including: determining the total demand for goods and the total supply of goods corresponding to the summary data based on the standard data and summary data of supply and demand related data at each level; determining the supply and demand relationship information of spot transactions based on the total demand for goods and the total supply of goods.
[0014] Furthermore, the sending of the second conversion data to the participants for replacing the supply and demand related data at each level includes: obtaining the participant information of each participant, and determining the number of participation of the participant based on the participant information; generating a target serial number according to the number of participation of the participant and a randomly generated random number, so as to query the target second conversion data from the information table of the second conversion data according to the target serial number, and sending the target second conversion data to the participants.
[0015] Further, the data partitioning rule also includes the step of generating data partitioning rules: generating initial data partitioning rules and prior probabilities corresponding to data at each level, and issuing the initial data partitioning rules and prior probabilities to each participant, each participant performs Gaussian distribution index analysis of data at each level according to the initial data partitioning rules, and obtains Gaussian distribution related indicators, wherein the Gaussian distribution related indicators include mean and variance; receiving Gaussian distribution related indicators of data at each level uploaded by each participant, and performing comprehensive analysis of indicators at the same level to determine the comprehensive analysis results; fine-tuning the initial data partitioning rules and prior probabilities according to the comprehensive analysis results, and updating them, and issuing the adjusted initial data partitioning rules and adjusted prior probabilities to each participant, so that each participant performs analysis according to the adjusted initial data partitioning rules to feedback updated Gaussian distribution related indicators for the next iteration; determining the final data partitioning rules according to the comprehensive analysis results of multiple iterations;
[0016] Among them, the comprehensive analysis results are determined according to the following formula:
[0017]
[0018] Among them, E is the comprehensive analysis result, P is the total number of participants; N p is the total number of samples of the pth participant; K is the number of levels, F k is the Gaussian distribution corresponding to the kth level; ω k is the prior probability of the kth Gaussian distribution; when E is the maximum value, the corresponding data partition rule is the final data partition rule.
[0019] In the second aspect, the present application provides a short-term price prediction device based on spot transactions, the device comprising: a division rule acquisition module, used to obtain data division rules for spot transactions, the data division rules including grading conditions for supply and demand related data, the grading conditions including transaction volume grading conditions, the supply and demand related data including the quantity of goods provided by the goods provider and the quantity of goods demanded by the goods demander; a division rule sending module, used to send data division rules to each participant, each participant divides the local supply and demand related data into data levels according to the data division rules, and counts the data quantity of the divided supply and demand related data to obtain statistical indicators corresponding to each level of supply and demand related data; a summary data acquisition module, used to receive statistical indicators corresponding to each level uploaded by each participant, and summarize the statistical indicators of the same level to determine the summary data of the supply and demand related data at each level; a supply and demand relationship analysis module, used to determine the supply and demand relationship information of spot transactions based on the summary data of the supply and demand related data at each level, so as to input the supply and demand relationship information into the short-term price prediction model, determine the target prediction result, and feed back the target prediction result to the price demander.
[0020] In a third aspect, the present application provides an electronic device comprising: a memory and at least one processor; the memory is used to store computer-executable instructions; the at least one processor is used to execute the computer-executable instructions stored in the memory, so that the at least one processor executes the method described in the first aspect.
[0021] The present application provides a short-term price prediction method based on spot transactions, which is applied to a server, and the method includes: obtaining data division rules for spot transactions, the data division rules including classification conditions for supply and demand related data, the classification conditions including transaction volume classification conditions, and the supply and demand related data including the quantity of goods provided by the goods provider and the quantity of goods demanded by the goods demander; issuing the data division rules to each participant, and each participant divides the local supply and demand related data into data levels according to the data division rules, and counts the data quantity of the divided supply and demand related data to obtain statistical indicators corresponding to the supply and demand related data at each level; receiving the statistical indicators corresponding to each level uploaded by each participant, and summarizing the statistical indicators of the same level to determine the summary data of the supply and demand related data at each level; determining the supply and demand relationship information of the spot transaction based on the summary data of the supply and demand related data at each level, so as to input the supply and demand relationship information into the short-term price prediction model, determine the target prediction result, and feed back the target prediction result to the price demander.
[0022] The scheme of the present application can be applied to a server, which is used to determine the supply and demand relationship information based on the supply and demand related data of multiple participants, and combine policy information, form information corresponding to spot transactions and other information to predict the short-term price of spot transactions, thereby generating prediction results and feeding back to the price demander. It should be noted that the prediction results in the scheme of the present application are information for reference by the price demander, and do not represent the real conclusion. Among them, the participants can be the goods provider and the goods demander. Some existing schemes are that the server summarizes all the data of multiple participants and then analyzes them. However, with such a scheme, the amount of data exchanged between the server and the participants is large. In this scheme, the server can obtain the data division rules corresponding to the spot transaction and send them to each participant, wherein the data division rules include the classification conditions of the supply and demand related data, the classification conditions include the transaction volume classification conditions, and the supply and demand related data include the goods supply quantity of the goods provider and the goods demand quantity of the goods demander. After each participant obtains the data division rules, it divides the local supply and demand related data into data levels, and counts the data quantity of the divided supply and demand related data to obtain the corresponding statistical indicators, and uploads them to the server. After receiving the statistical indicators, the server summarizes the statistical indicators of multiple participants to form summary data. Since the participants include product providers and product demanders, the statistical indicators contain indicators corresponding to the supply quantity and the demand quantity of the products, and the corresponding summary data contains information on the total amount of the corresponding supply quantity and the total amount of the demand for the products (the total amount of the supply quantity and the total amount of the demand for the products can be determined after restoration according to the standard data corresponding to each level). Afterwards, the server analyzes the supply and demand relationship based on the summary data to obtain the supply and demand relationship information, so as to input the supply and demand relationship information into the short-term price forecasting model, determine the target forecast result, and feedback the target forecast result to the price demander. In addition, the server can also offset the total amount of goods provided and the total amount of goods demanded based on the statistical indicators of the same level, thereby determining the remaining transaction volume at that level, and offset the total amount of goods provided and the total amount of goods demanded across levels (there are conversion rules between each data level), thereby obtaining the remaining amount of goods provided or the remaining amount of goods demanded, and then determining the supply and demand relationship information. In this solution, the participants can classify the local supply and demand related data according to the data classification rules, and then upload the statistical indicators of each level to the server. The server performs supply and demand analysis based on the statistical indicators, reducing the amount of data exchanged between the participants and the server, and making it more convenient to perform price predictions for spot transactions. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0024] Figure 1 It is a flowchart of a short-term price prediction method based on spot trading according to an embodiment of the present application;
[0025] Figure 2 This is a schematic diagram of the steps of a short-term price prediction method based on spot trading according to an embodiment of the present application;
[0026] Figure 3 It is a structural diagram of a short-term price prediction device based on spot trading according to an embodiment of the present application. DETAILED DESCRIPTION
[0027] The following will be combined with the 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 part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0028] The solution of this application can be applied to the short-term price prediction scenario of spot transactions. The price changes of spot transactions are closely related to supply and demand relationships, policies, etc. Figure 1 As shown, the server in this application is used to determine the supply and demand relationship information based on the supply and demand related data of multiple participants, and combine policy information, form information corresponding to spot transactions and other information to predict the short-term price of spot transactions, thereby generating prediction results and feeding back to the price demander. Some existing solutions are that the server summarizes all the data of multiple participants and then analyzes them. However, with such a solution, the amount of data exchanged between the server and the participants is large. In this solution, the server can obtain the data division rules corresponding to the spot transaction and send them to each participant. After each participant obtains the data division rules, it divides the local supply and demand related data at the data level, and counts the data quantity of the divided supply and demand related data to obtain the corresponding statistical indicators, and uploads them to the server. After receiving the statistical indicators, the server summarizes the statistical indicators of multiple participants to form summary data. Afterwards, the server analyzes the supply and demand relationship based on the summary data to obtain the supply and demand relationship information, so as to input the supply and demand relationship information, policy information and other information into the short-term price prediction model, determine the prediction results, and feed back the prediction results to the price demander. It should be noted that the prediction results in the scheme of this application are information for reference by price demanders and do not represent real conclusions. In addition, this application can determine whether the prices of each participant are the same by matching the hash value of the price of the data of each participant, so as to divide the data with the same price into the same set for analysis.
[0029] Specifically, the participants may be product providers and product demanders. In this solution, the server may obtain the data division rules corresponding to the spot transaction and issue them to each participant, wherein the data division rules include the classification conditions of the supply and demand related data, the classification conditions include the transaction volume classification conditions, and the supply and demand related data include the product supply quantity of the product provider and the product demand quantity of the product demander. After each participant obtains the data division rules, it divides the local supply and demand related data into data levels, and counts the data quantity of the divided supply and demand related data to obtain the corresponding statistical indicators, and uploads them to the server. After receiving the statistical indicators, the server summarizes the statistical indicators of multiple participants to form summary data. Since the participants include product providers and product demanders, the statistical indicators include indicators corresponding to the product supply quantity and the product demand quantity, and the corresponding summary data contains the total amount of product supply and the total amount of product demand. Afterwards, the server conducts supply and demand relationship analysis based on the summary data to obtain supply and demand relationship information, so as to input supply and demand relationship information, policy information and other information into the short-term price forecasting model, determine the target forecast result, and feed back the target forecast result to the price demander. In addition, the server can also offset the total amount of goods provided and the total amount of goods demanded based on the statistical indicators of the same level, so as to determine the remaining transaction volume at that level, and offset the total amount of goods provided and the total amount of goods demanded across levels (there are conversion rules between each data level), so as to obtain the remaining amount of goods provided or the remaining amount of goods demanded, and then determine the supply and demand relationship information. In this scheme, the participants can classify the local supply and demand related data according to the data division rules, and upload the statistical indicators of each level to the server. The server conducts supply and demand analysis based on the statistical indicators, which reduces the amount of data exchanged between the participants and the server, and can more conveniently predict the price of spot transactions.
[0030] Specifically, this application provides a short-term price prediction method based on spot transactions, which can be applied to servers, such as Figure 2 As shown, the method includes:
[0031] Step 202: Acquire data classification rules for spot transactions, wherein the data classification rules include classification conditions for supply and demand related data, the classification conditions include transaction volume classification conditions, and the supply and demand related data include the quantity of goods provided by the goods provider and the quantity of goods demanded by the goods demander.
[0032] Step 204: Issue data partitioning rules to each participant. Each participant divides the local supply and demand related data into data levels according to the data partitioning rules, and counts the amount of data of the divided supply and demand related data to obtain statistical indicators corresponding to each level of supply and demand related data.
[0033] Step 206: Receive statistical indicators corresponding to each level uploaded by each participant, and summarize the statistical indicators of the same level to determine the summary data of supply and demand related data at each level.
[0034] Step 208: Determine the supply and demand relationship information of spot transactions based on the summary data of supply and demand related data at each level, input the supply and demand relationship information into the short-term price forecasting model, determine the target forecast result, and feed back the target forecast result to the price demander.
[0035] The scheme of the present application can be applied to a server, which is used to determine the supply and demand relationship information based on the supply and demand related data of multiple participants, and combine policy information, form information corresponding to spot transactions and other information to predict the short-term price of spot transactions, thereby generating prediction results and feeding back to the price demander. It should be noted that the prediction results in the scheme of the present application are information for reference by the price demander, and do not represent the real conclusion. Among them, the participants can be the goods provider and the goods demander. Some existing schemes are that the server summarizes all the data of multiple participants and then analyzes them. However, with such a scheme, the amount of data exchanged between the server and the participants is large. In this scheme, the server can obtain the data division rules corresponding to the spot transaction and send them to each participant, wherein the data division rules include the classification conditions of the supply and demand related data, the classification conditions include the transaction volume classification conditions, and the supply and demand related data include the goods supply quantity of the goods provider and the goods demand quantity of the goods demander. After each participant obtains the data division rules, the local supply and demand related data is divided into data levels, and the data quantity of the divided supply and demand related data is counted to obtain the corresponding statistical indicators, and uploaded to the server. After receiving the statistical indicators, the server summarizes the statistical indicators of multiple participants to form summary data. Since the participants include the goods provider and the goods demander, the statistical indicators contain indicators corresponding to the goods supply quantity and the goods demand quantity, and the corresponding summary data contains the total amount of goods supply and the total amount of goods demand. After that, the server analyzes the supply and demand relationship based on the summary data to obtain the supply and demand relationship information, so as to input the supply and demand relationship information into the short-term price prediction model, determine the target prediction result, and feedback the target prediction result to the price demander. In addition, the server can also offset the total amount of goods supply and the total amount of goods demand based on the statistical indicators of the same level, so as to determine the remaining transaction volume at this level, and offset the total amount of goods supply and the total amount of goods demand across levels (there are conversion rules between each data level), so as to obtain the remaining amount of goods supply or the remaining amount of goods demand, and then determine the supply and demand relationship information. In this solution, participants can classify local supply and demand related data according to data classification rules, and then upload statistical indicators of each level to the server. The server conducts supply and demand analysis based on the statistical indicators, reducing the amount of data exchanged between participants and the server, and making it easier to make price predictions for spot transactions.
[0036] In the scheme of the present application, different data partitioning rules can be provided for product providers and product demanders. Specifically, as an optional embodiment, the data partitioning rules include a first data partitioning rule corresponding to the product provider and a second data partitioning rule corresponding to the product demander; the sending of data partitioning rules to each participant includes: sending the first data partitioning rule to the product provider based on the first identification information of the participant; sending the second data partitioning rule to the product provider based on the second identification information of the participant. In the process of interacting with the server, each participant can carry identification information representing its own identity, such as the first identification information and the second identification information. The server can determine the identity of the participant based on the first identification information and the second identification information, and then send the corresponding data partitioning rules to the participant.
[0037] Among them, for the first data division rule sent to the product provider, the data division rule is used to adjust the product supply quantity to a level less than or equal to the product supply quantity. Specifically, as an optional embodiment, the supply and demand related data includes the product supply quantity of the product provider, and the product provider is used to perform the following steps according to the first data division rule: according to the first data division rule, obtain the transaction volume classification condition, and the transaction volume classification condition is used to classify the product supply quantity into a level less than or equal to the product supply quantity; according to the transaction volume classification condition, classify the product supply quantity, and count the data quantity of the divided product supply quantity. For example, the product supply quantity of the product provider may be 1031; then according to the first data division rule (such as the data interval corresponding to the data level of 1000 is 1000-1050), the product supply quantity can be divided into a level of 1000, and 1000 is the standard data.
[0038] Among them, for the second data division rule sent to the product demander, the data division rule is used to adjust the product demand to a level greater than or equal to the product demand. Specifically, as an optional embodiment, the supply and demand related data includes the product demand of the product demander, and the product demander is used to perform the following steps according to the second data division rule: according to the second data division rule, obtain the transaction volume classification condition, and the transaction volume classification condition is used to classify the product demand to a level greater than or equal to the product demand; according to the transaction volume classification condition, classify the product demand, and count the data quantity of the divided product demand. For example, the product supply of the product provider may be 986; then according to the first data division rule (such as the data interval corresponding to the data level of 1000 is 950-1000), the product supply can be divided into a level of 1000, and 1000 is the standard data. In the embodiment of the present application, the supply of goods can be divided into smaller levels, and the demand for goods can be divided into higher levels, so that the server can judge whether the supply of goods is greater than the demand for goods based on the statistical indicators of each level.
[0039] In an embodiment of the present application, each data level can correspond to a Gaussian distribution (or normal distribution), and the representative data of the data level can be the data corresponding to the symmetry axis of the Gaussian distribution. The interval on the left side of the symmetry axis (the endpoint is determined based on the symmetry axis of another Gaussian distribution) is the second data division rule, and the interval on the right side of the symmetry axis is the first data division rule. Specifically, as an optional embodiment, the data partitioning rule also includes the step of generating data partitioning rules: generating initial data partitioning rules and prior probabilities corresponding to data at each level, and issuing the initial data partitioning rules and prior probabilities to each participant, each participant performs an index analysis of the Gaussian distribution of data at each level according to the initial data partitioning rules, and obtains Gaussian distribution related indicators, wherein the Gaussian distribution related indicators include mean and variance; receiving Gaussian distribution related indicators of data at each level uploaded by each participant, and performing comprehensive analysis of indicators at the same level to determine the comprehensive analysis results; fine-tuning the initial data partitioning rules and prior probabilities according to the comprehensive analysis results, and updating them, and issuing the adjusted initial data partitioning rules and adjusted prior probabilities to each participant, so that each participant performs analysis according to the adjusted initial data partitioning rules to feedback updated Gaussian distribution related indicators for the next iteration; determining the final data partitioning rules based on the comprehensive analysis results of multiple iterations; wherein the prior probability represents the probability that the data belongs to each Gaussian distribution, and the prior probability can be set manually or automatically generated according to relevant indicators.
[0040] Among them, the comprehensive analysis results are determined according to the following formula:
[0041]
[0042] Among them, E is the comprehensive analysis result, P is the total number of participants; N p is the total number of samples of the pth participant; K is the number of levels, F k is the Gaussian distribution corresponding to the kth level; ω k is the prior probability of the kth Gaussian distribution; when E is the maximum value, the corresponding data partition rule is the final data partition rule.
[0043] After obtaining the statistical indicators of multiple participants, the server can summarize the statistical indicators and restore them to determine the summary data. Specifically, as an optional embodiment, the statistical indicators of the same level are summarized to determine the summary data of the supply and demand related data at each level, including: sending the first conversion data used to replace the supply and demand related data at each level to the participants, and the first conversion data sent to each participant is the same; obtaining the first conversion data corresponding to the statistical indicators uploaded by the participants; summarizing the statistical indicators of the same first conversion data to determine the summary data of the supply and demand related data at each level. The first conversion data is data that will not leak the original data, for example, it can be a hash value of the sum of the representative data of the data level and the random number. The server can send the first conversion data corresponding to each level to multiple participants. The participants feedback the first conversion data (representative data level) and the statistical indicators corresponding to the first conversion data, and the statistical indicators can be uploaded in a public key encrypted manner. After receiving the encrypted statistical indicators, the server can decrypt them with the private key corresponding to the public key, so as to obtain the first conversion data and the statistical indicators corresponding to the first conversion data. After that, the server can summarize the statistical indicators with the same first conversion data to obtain the summary data. The server may also determine representative data (or standard data) corresponding to the first conversion data to perform data restoration and determine the total amount of goods demanded or the total amount of goods provided.
[0044] In addition, in addition to sending the same first conversion data to each participant, the server can also send different second conversion data to different participants to prevent the data of a certain participant from being obtained and cracked by the data of other participants. Specifically, as an optional embodiment, the statistical indicators of the same level are summarized to determine the summary data of the supply and demand related data at each level, including: sending the second conversion data used to replace the supply and demand related data at each level to the participants, the second conversion data sent to each participant is different, and the server saves the association relationship between the second conversion data of each participant; obtaining the second conversion data corresponding to the statistical indicators uploaded by the participants; based on the association relationship between the second conversion data and the second conversion data of each participant, the statistical indicators of the same level are summarized to determine the summary data of the supply and demand related data at each level. The server can save the association relationship between the second conversion data sent to different participants, so as to summarize the statistical indicators based on the association relationship to determine the summary data.
[0045] After determining the summary data, data restoration can be performed according to the standard data (or representative data) of each level to determine the total demand and total supply of goods corresponding to the summary data. Specifically, as an optional embodiment, the supply and demand relationship information of spot transactions is determined based on the summary data of supply and demand related data at each level, including: determining the total demand and total supply of goods corresponding to the summary data based on the standard data and summary data of supply and demand related data at each level; determining the supply and demand relationship information of spot transactions based on the total demand and total supply of goods. Supply and demand relationship information can be determined based on the total demand and total supply of goods, so that the supply and demand relationship information and policy information can be input into the prediction model to perform short-term price prediction. The prediction model can be a pre-trained model.
[0046] In addition, the second conversion data sent to the same participant is different each time to avoid data leakage. Specifically, as an optional embodiment, the second conversion data sent to the participants to replace the supply and demand related data at each level includes: obtaining the participant information of each participant, and determining the number of participation of the participant based on the participant information; generating a target serial number according to the number of participation of the participant and a randomly generated random number, so as to query the target second conversion data from the information table of the second conversion data according to the target serial number, and then send the target second conversion data to the participant. The server can generate a target serial number based on the number of participation and the random number, and query the target second conversion data from the information table of the second conversion data according to the target serial number to send it to the participant. The second conversion data obtained by the participant each time is different, which reduces the risk of data leakage of other participants.
[0047] On the basis of the above embodiments, the present application also provides a short-term price prediction device based on spot transactions, such as Figure 3 As shown, the device comprises:
[0048] The classification rule acquisition module 302 is used to obtain the data classification rules for spot transactions, wherein the data classification rules include classification conditions for supply and demand related data, wherein the classification conditions include transaction volume classification conditions, and the supply and demand related data include the quantity of goods provided by the goods provider and the quantity of goods demanded by the goods demander.
[0049] The division rule sending module 304 is used to send data division rules to each participant. Each participant divides the local supply and demand related data into data levels according to the data division rules, and counts the data quantity of the divided supply and demand related data to obtain statistical indicators corresponding to each level of supply and demand related data.
[0050] The summary data acquisition module 306 is used to receive statistical indicators corresponding to each level uploaded by each participant, and summarize the statistical indicators of the same level to determine the summary data of supply and demand related data at each level.
[0051] The supply and demand relationship analysis module 308 is used to determine the supply and demand relationship information of spot transactions based on the summary data of supply and demand related data at all levels, so as to input the supply and demand relationship information into the short-term price prediction model, determine the target prediction result, and feed back the target prediction result to the price demander.
[0052] The implementation of the embodiment of the present application is similar to the implementation of the above method embodiment. The specific implementation can refer to the specific implementation of the above method embodiment, which will not be repeated here.
[0053] The scheme of the present application can be applied to a server, which is used to determine the supply and demand relationship information based on the supply and demand related data of multiple participants, and combine policy information, form information corresponding to spot transactions and other information to predict the short-term price of spot transactions, thereby generating prediction results and feeding back to the price demander. It should be noted that the prediction results in the scheme of the present application are information for reference by the price demander, and do not represent the real conclusion. Among them, the participants can be the goods provider and the goods demander. Some existing schemes are that the server summarizes all the data of multiple participants and then analyzes them. However, with such a scheme, the amount of data exchanged between the server and the participants is large. In this scheme, the server can obtain the data division rules corresponding to the spot transaction and send them to each participant, wherein the data division rules include the classification conditions of the supply and demand related data, the classification conditions include the transaction volume classification conditions, and the supply and demand related data include the goods supply quantity of the goods provider and the goods demand quantity of the goods demander. After each participant obtains the data division rules, it divides the local supply and demand related data into data levels, and counts the data quantity of the divided supply and demand related data to obtain the corresponding statistical indicators, and uploads them to the server. After receiving the statistical indicators, the server summarizes the statistical indicators of multiple participants to form summary data. Since the participants include product providers and product demanders, the statistical indicators contain indicators corresponding to the supply quantity and the demand quantity of the products, and the corresponding summary data contains information on the total amount of the corresponding supply quantity and the total amount of the demand for the products (the total amount of the supply quantity and the total amount of the demand for the products can be determined after restoration according to the standard data corresponding to each level). Afterwards, the server analyzes the supply and demand relationship based on the summary data to obtain the supply and demand relationship information, so as to input the supply and demand relationship information into the short-term price forecasting model, determine the target forecast result, and feedback the target forecast result to the price demander. In addition, the server can also offset the total amount of goods provided and the total amount of goods demanded based on the statistical indicators of the same level, thereby determining the remaining transaction volume at that level, and offset the total amount of goods provided and the total amount of goods demanded across levels (there are conversion rules between each data level), thereby obtaining the remaining amount of goods provided or the remaining amount of goods demanded, and then determining the supply and demand relationship information. In this solution, the participants can classify the local supply and demand related data according to the data classification rules, and then upload the statistical indicators of each level to the server. The server performs supply and demand analysis based on the statistical indicators, reducing the amount of data exchanged between the participants and the server, and making it more convenient to perform price predictions for spot transactions.
[0054] Based on the above embodiments, the present application also provides an electronic device, comprising: a memory and at least one processor; the memory is used to store computer execution instructions; the at least one processor is used to execute the computer execution instructions stored in the memory, so that the at least one processor executes the method described in the above embodiments.
[0055] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned data processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0056] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0057] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0058] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0059] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0060] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0061] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0062] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. According to the definition in this article, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0063] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity 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, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0064] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0065] The above are only embodiments of the present invention and are 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 substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.
Claims
1. A short-term price prediction method based on spot trading, characterized in that: Applied to a server, the method comprises: Acquire data classification rules for spot transactions, wherein the data classification rules include classification conditions for supply and demand related data, the classification conditions include transaction volume classification conditions, and the supply and demand related data include the quantity of goods provided by the goods provider and the quantity of goods demanded by the goods demander; The data division rules are issued to each participant, and each participant divides the local supply and demand related data into data levels according to the data division rules, and counts the data quantity of the divided supply and demand related data to obtain the statistical indicators corresponding to the supply and demand related data at each level; Receive statistical indicators corresponding to each level uploaded by each participant, and aggregate statistical indicators of the same level to determine aggregate data of supply and demand related data at each level; Based on the summary data of supply and demand related data at all levels, the supply and demand relationship information of spot transactions is determined, so as to input the supply and demand relationship information into the short-term price forecasting model, determine the target forecast result, and feed back the target forecast result to the price demander; The statistical indicators of the same level are aggregated to determine the aggregated data of supply and demand related data at each level, including: Sending second conversion data for replacing the supply and demand related data at each level to the participants, the second conversion data sent to each participant is different, and the server stores the association relationship between the second conversion data of each participant; Obtaining second conversion data corresponding to the statistical indicator uploaded by the participant; According to the association relationship between the second conversion data and the second conversion data of each participant, the statistical indicators of the same level are aggregated to determine the aggregated data of the supply and demand related data of each level; The supply and demand relationship information of spot transactions is determined based on the summary data of supply and demand related data at various levels, including: Based on the standard data and summary data of supply and demand related data at each level, determine the total demand for goods and the total supply of goods corresponding to the summary data; Determine the supply and demand relationship information of spot transactions based on the total demand for goods and the total supply of goods; The sending of the second conversion data for replacing the supply and demand related data at each level to the participants includes: Obtaining the participant information of each participant, and determining the number of participations of the participant based on the participant information; Generate a target serial number according to the number of participations of the participant and the randomly generated random number, query the target second conversion data from the information table of the second conversion data according to the target serial number, and issue the target second conversion data to the participant; The data partitioning rules are sent to each participant, including: Based on the first identification information of the participant, issuing the first data classification rule to the product provider; Based on the second identification information of the participant, the second data classification rule is issued to the product provider.
2. The method according to claim 1, characterized in that The data division rules include a first data division rule corresponding to a product provider and a second data division rule corresponding to a product demander.
3. The method according to claim 2, characterized in that The supply and demand related data includes the quantity of goods provided by the goods provider, and the goods provider is used to perform the following steps according to the first data division rule: According to the first data classification rule, a transaction volume classification condition is obtained, wherein the transaction volume classification condition is used to classify the quantity of goods provided into a level that is less than or equal to the quantity of goods provided; According to the transaction volume classification conditions, the supply of goods is graded, and the data quantity of the divided supply of goods is counted.
4. The method according to claim 3, characterized in that The supply and demand related data includes the demand quantity of goods by the goods demander, and the goods demander is used to perform the following steps according to the second data division rule: According to the second data classification rule, a transaction volume classification condition is obtained, wherein the transaction volume classification condition is used to classify the demand for goods into levels greater than or equal to the demand for goods; According to the transaction volume classification conditions, the demand for goods is graded, and the data quantity of the divided demand for goods is counted.
5. The method according to claim 1, characterized in that The statistical indicators of the same level are aggregated to determine the aggregated data of supply and demand related data at each level, including: Sending first conversion data for replacing supply and demand related data at each level to the participants, the first conversion data sent to each participant being the same; Obtaining first conversion data corresponding to the statistical indicator uploaded by the participant; The statistical indicators of the same first conversion data are aggregated to determine the aggregated data of the supply and demand related data at each level.
6. The method according to claim 4, characterized in that The data partitioning rule also includes the step of generating the data partitioning rule: Generate an initial data partitioning rule and a priori probabilities corresponding to each level of data, and issue the initial data partitioning rule and the priori probabilities to each participant. Each participant performs an indicator analysis of the Gaussian distribution of each level of data based on the initial data partitioning rule to obtain Gaussian distribution related indicators, including mean and variance; Receive Gaussian distribution related indicators of each level of data uploaded by each participant, and conduct comprehensive analysis of indicators at the same level to determine the comprehensive analysis results; Based on the comprehensive analysis results, the initial data partitioning rules and prior probabilities are fine-tuned and updated, and the adjusted initial data partitioning rules and adjusted prior probabilities are sent to each participant, so that each participant can analyze according to the adjusted initial data partitioning rules to feedback updated Gaussian distribution related indicators for the next iteration; Determine the final data partitioning rules based on the comprehensive analysis results of multiple iterations; Among them, the comprehensive analysis results are determined according to the following formula: Among them, E is the comprehensive analysis result, and P is the total number of participants; is the total number of samples of the pth participant; K is the number of levels, is the Gaussian distribution corresponding to the kth level; is the prior probability of the kth Gaussian distribution; when E is the maximum value, the corresponding data partition rule is the final data partition rule.
7. A short-term price prediction device based on spot trading, characterized in that: The device comprises: A partitioning rule acquisition module, used to acquire data partitioning rules for spot transactions, wherein the data partitioning rules include classification conditions for supply and demand related data, wherein the classification conditions include transaction volume classification conditions, and the supply and demand related data include the quantity of goods provided by the goods provider and the quantity of goods demanded by the goods demander; The division rule delivery module is used to deliver the data division rules to each participant. Each participant divides the local supply and demand related data into data levels according to the data division rules, and counts the data quantity of the divided supply and demand related data to obtain the statistical indicators corresponding to the supply and demand related data at each level. The data partitioning rules are sent to each participant, including: Based on the first identification information of the participant, issuing the first data classification rule to the product provider; According to the second identification information of the participant, the second data division rule is issued to the product provider; The summary data acquisition module is used to receive the statistical indicators of the corresponding levels uploaded by each participant, and summarize the statistical indicators of the same level to determine the summary data of the supply and demand related data of each level; The statistical indicators of the same level are aggregated to determine the aggregated data of supply and demand related data at each level, including: Sending second conversion data for replacing the supply and demand related data at each level to the participants, the second conversion data sent to each participant is different, and the server stores the association relationship between the second conversion data of each participant; Obtaining second conversion data corresponding to the statistical indicator uploaded by the participant; According to the association relationship between the second conversion data and the second conversion data of each participant, the statistical indicators of the same level are aggregated to determine the aggregated data of the supply and demand related data of each level; The sending of the second conversion data for replacing the supply and demand related data at each level to the participants includes: Obtaining the participant information of each participant, and determining the number of participations of the participant based on the participant information; Generate a target serial number according to the number of participations of the participant and the randomly generated random number, query the target second conversion data from the information table of the second conversion data according to the target serial number, and issue the target second conversion data to the participant; The supply and demand relationship analysis module is used to determine the supply and demand relationship information of spot transactions based on the summary data of supply and demand related data at all levels, so as to input the supply and demand relationship information into the short-term price prediction model, determine the target prediction result, and feed back the target prediction result to the price demander; The supply and demand relationship information of spot transactions is determined based on the summary data of supply and demand related data at various levels, including: Based on the standard data and summary data of supply and demand related data at each level, determine the total demand for goods and the total supply of goods corresponding to the summary data; Determine the supply and demand relationship information for spot transactions based on the total demand for goods and the total supply of goods.
