Transaction change curve generation method and device, storage medium and electronic equipment
By integrating and processing the transaction data of target commodities from multiple trading platforms, extracting and constructing transaction characteristics, and generating transaction change curves, the problem of intuition of transaction change display in the existing technology is solved, and efficient and accurate transaction data display and analysis are achieved.
Patent Information
- Application Number
- CN202510119690.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-05-23
AI Technical Summary
The prior art is difficult to accurately display transaction changes in target commodities, especially in the data processing and analysis of multiple trading platforms.
By obtaining the transaction data of the target product from multiple trading platforms, cleaning, converting and integrating data, extracting transaction feature vectors, and constructing transaction change curves based on these features, displaying them on the data visualization platform.
It achieves efficient and accurate display of transaction changes in target commodities, solves the problems of data processing delay and complexity, and improves the visualization and analysis capabilities of transaction data.
Smart Images

Figure CN120032010A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of data processing, and specifically, to a method and device for generating a transaction change curve, a storage medium, and an electronic device. Background Art
[0002] With the development of the Internet, various e-commerce platforms have emerged. Trading platforms need to process massive transaction data. However, since transaction data is distributed across multiple different platforms and systems, each platform may use different data formats and naming conventions, making unified data processing and analysis complicated and time-consuming. In addition, the trading market changes rapidly, requiring transaction information to be updated in real time, but the existing system may not be able to accurately reflect the latest transaction situation in a timely manner due to data processing delays or errors. Summary of the invention
[0003] The embodiments of the present application provide a method and device for generating a transaction change curve, a storage medium, and an electronic device, so as to at least solve the problem in the related art that the transaction changes of the target product cannot be accurately displayed.
[0004] According to an embodiment of the present application, a method for generating a transaction change curve is provided, comprising: obtaining N groups of first transaction data generated by a target commodity within a target time period from N first transaction data tables generated by N transaction platforms, wherein one group of the first transaction data corresponds to one of the transaction platforms, and N is a natural number greater than 1; performing a feature extraction operation on the N groups of the first transaction data to generate N groups of transaction feature data of the target commodity, wherein for each group of the first transaction data, the feature extraction operation comprises the following steps: performing a vector conversion on the first transaction data to obtain a first transaction feature vector; performing a feature extraction operation on the first transaction feature vector according to the commodity attributes and data requirements of the target commodity; Select operations to obtain a second transaction feature vector, wherein the data requirements include the nominal balance information, market revaluation information and uncovered exposure information of the target commodity; perform feature construction on the second transaction feature vector according to the vector features in the second transaction feature vector to obtain the transaction feature data, wherein the vector features include: time series features, clustering features, price dynamic features and exposure features; map N groups of the transaction feature data to the data visualization platform to generate N transaction change curves of the target commodity in the N transaction platforms within the target time period, wherein one transaction change curve is used to represent the transaction change characteristics of the target commodity on one transaction platform within the target time period.
[0005] In an exemplary embodiment, N groups of first transaction data generated by a target commodity within a target time period are obtained from N first transaction data tables generated in N transaction platforms, including: obtaining N first transaction data tables in the N transaction platforms through a preset interface; extracting the transaction data of the target commodity from the N first transaction data tables according to the commodity information of the target commodity, to obtain N second transaction data tables; performing data processing operations on the transaction data in the N second transaction data tables, and storing the processed transaction data in the target transaction data table, wherein the data processing operations sequentially include: data cleaning operations, data conversion operations, and data integration operations, the data cleaning operations include cleaning abnormal payment values included in the N second transaction data tables and abnormal fields in the N second transaction data tables, to obtain N third transaction data tables; the data conversion operations include converting the transaction data in the N third transaction data tables into structured data, to obtain N fourth transaction data tables; the data integration operations include integrating the transaction data in the N fourth transaction data tables into the target transaction data table; and screening out N groups of the first transaction data within the target time period from the target transaction table.
[0006] In an exemplary embodiment, N groups of the above-mentioned first transaction data within the above-mentioned target time period are screened out from the above-mentioned target transaction table, including: based on the transaction data in the above-mentioned target transaction data table, respectively calculating the transaction amounts of the above-mentioned target commodities in the N above-mentioned transaction platforms to obtain N groups of second transaction data, wherein the N groups of second transaction data all include the initial transaction data of the above-mentioned target commodities, the transaction data of the above-mentioned target commodities in the current time period and the transaction change status of the above-mentioned target commodities in the above-mentioned target time period; integrating the N groups of the above-mentioned second transaction data with the transaction data in the above-mentioned target transaction data table within the above-mentioned target time period to obtain N groups of the above-mentioned first transaction data.
[0007] In an exemplary embodiment, based on the commodity attributes and data requirements of the target commodity, a feature selection operation is performed on the first transaction feature vector to obtain the second transaction feature vector. The method further includes: obtaining the transaction status and historical transaction data of the target commodity on the N trading platforms; based on the transaction status and historical transaction data, counting the transaction frequency of the target commodity on each of the trading platforms; and using the transaction frequency to determine the nominal balance information, the market revaluation information and the uncovered exposure information of the target commodity to obtain the data requirements.
[0008] In an exemplary embodiment, feature construction is performed on the second transaction feature vector according to the vector features in the second transaction feature vector to obtain the transaction feature data, including: obtaining N groups of second transaction data generated on the first transaction day and N groups of third transaction data generated on the second transaction day, wherein the first transaction day is the previous trading day of the current trading day, the current trading day is the trading day on which the N groups of first transaction data are generated, and the second trading day is the last trading day of the previous year in which the N groups of first transaction data are generated; converting the N groups of second transaction data and the N groups of third transaction data into a third transaction feature vector and a fourth transaction feature vector, respectively; performing feature selection operations on the third transaction feature vector and the fourth transaction feature vector according to the commodity attributes and data requirements of the target commodity to obtain a fifth transaction feature vector and a sixth transaction feature vector; performing the feature construction on the second transaction feature vector based on the vector features in the second transaction feature vector, the vector features in the fifth transaction feature vector, and the vector features in the sixth transaction feature vector to obtain the transaction feature data.
[0009] In an exemplary embodiment, based on the vector features in the second transaction feature vector, the vector features in the fifth transaction feature vector, and the vector features in the sixth transaction feature vector, the feature construction is performed on the second transaction feature vector to obtain the transaction feature data, including: extracting a time feature vector from the fifth transaction feature vector, the sixth transaction feature vector, and the second transaction feature vector, and constructing the time series feature based on the time feature; extracting a feature vector of the transaction method of the target commodity from the fifth transaction feature vector, the sixth transaction feature vector, and the second transaction feature vector, and constructing the cluster feature based on the feature vector of the transaction method; extracting a price feature vector of the target commodity from the fifth transaction feature vector, the sixth transaction feature vector, and the second transaction feature vector, and constructing the price dynamic feature based on the price feature vector and the time feature vector; extracting an exposure feature vector from the fifth transaction feature vector, the sixth transaction feature vector, and the second transaction feature vector to obtain the exposure feature; determining the time series feature, the cluster feature, the price dynamic feature, and the exposure feature as the transaction feature data.
[0010] According to another embodiment of the present application, a device for generating a transaction change curve is provided, comprising: an acquisition module, used to acquire N groups of first transaction data generated by a target commodity within a target time period from N first transaction data tables generated by N transaction platforms, wherein one group of the above-mentioned first transaction data corresponds to one of the above-mentioned transaction platforms, and the above-mentioned N is a natural number greater than 1; an extraction module, used to perform a feature extraction operation on the N groups of the above-mentioned first transaction data to generate N groups of transaction feature data of the above-mentioned target commodity, wherein, for each group of the above-mentioned first transaction data, the above-mentioned feature extraction operation comprises the following steps: performing a vector conversion on the above-mentioned first transaction data to obtain a first transaction feature vector; performing a feature extraction operation on the above-mentioned first transaction feature vector according to the commodity attributes and data requirements of the above-mentioned target commodity; A feature selection operation is performed to obtain a second transaction feature vector, wherein the data requirements include the nominal balance information, market revaluation information and uncovered exposure information of the target commodity; feature construction is performed on the second transaction feature vector according to the vector features in the second transaction feature vector to obtain the transaction feature data, wherein the vector features include: time series features, clustering features, price dynamic features and exposure features; a generation module is used to map N groups of the transaction feature data to a data visualization platform, and generate N transaction change curves of the target commodity in the N transaction platforms within the target time period, wherein one transaction change curve is used to represent the transaction change characteristics of the target commodity on one transaction platform within the target time period.
[0011] According to another embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0012] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0013] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0014] Through this application, feature extraction operations are performed on N groups of first transaction data obtained from N first transaction data tables generated from N transaction platforms to generate N groups of transaction feature data of the target commodity, and then the N groups of transaction feature data are mapped to the data visualization platform to generate N transaction change curves of the target commodity in the N transaction platforms within the target time period. Therefore, the problem that the transaction changes of the target commodity cannot be accurately displayed in the related art can be solved, thereby achieving the effect of efficiently collecting and accurately displaying the transaction changes of the target commodity. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 It is a hardware environment schematic diagram of a method for generating a transaction change curve according to an embodiment of the present application;
[0016] Figure 2 is a flow chart of a method for generating a transaction change curve according to an embodiment of the present application;
[0017] Figure 3 is a flow chart of a method for generating a transaction change curve of a target commodity according to an embodiment of the present application;
[0018] Figure 4 It is a structural block diagram of a device for generating a transaction change curve according to an embodiment of the present application. DETAILED DESCRIPTION
[0019] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0020] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0021] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 Schematic diagram of the hardware environment of a method for generating a transaction change curve in an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0022] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as a computer program corresponding to a method for generating a transaction change curve in an embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0023] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0024] In this embodiment, a method for generating a transaction change curve is provided. Figure 2 is a flow chart of a method for generating a transaction change curve according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:
[0025] Step S202, obtaining N groups of first transaction data generated by the target commodity within a target time period from N first transaction data tables generated by N transaction platforms, wherein one group of the first transaction data corresponds to one transaction platform, and N is a natural number greater than 1;
[0026] Optionally, the method in this embodiment can be applied in the financial field to monitor the trading changes of the target commodity. For example, it can be used by compliance departments and auditing agencies to help verify whether the derivatives transactions of financial institutions comply with regulatory requirements, or large commodity trading companies or manufacturers can use the method in this embodiment to monitor the trading of target commodities on multiple platforms, optimize the supply chain, and adjust inventory strategies.
[0027] Optionally, the transaction platform in this embodiment refers to an electronic platform or system for conducting target commodity transactions, which may be an internal transaction system of a bank, third-party transaction software, or a transaction platform provided by other financial institutions.
[0028] Optionally, the first transaction data table in this embodiment is an original transaction record table generated by each transaction platform, including but not limited to: detailed information of each transaction, such as transaction time, transaction amount, transaction customer, commodity type, weight of target commodity, etc.
[0029] Optionally, the target commodity in this embodiment may be a commodity derivative, including but not limited to: precious metals, agricultural products, clothing, etc.
[0030] Step S204, performing feature extraction operation on N groups of the first transaction data to generate N groups of transaction feature data of the target commodity, wherein for each group of the first transaction data, the feature extraction operation includes the following steps: performing vector conversion on the first transaction data to obtain a first transaction feature vector; performing feature selection operation on the first transaction feature vector according to the commodity attributes and data requirements of the target commodity to obtain a second transaction feature vector, wherein the data requirements include the nominal balance information, market revaluation information and uncovered exposure information of the target commodity; performing feature construction on the second transaction feature vector according to the vector features in the second transaction feature vector to obtain the transaction feature data, wherein the vector features include: time series features, clustering features, price dynamic features and exposure features;
[0031] Optionally, the target time period in this embodiment is a specified data analysis time range used to filter and analyze transaction data, which may be a single trading day, a period of time (such as a week, a month), or a comparison period across years.
[0032] Optionally, the vector conversion in this embodiment refers to converting each feature in the transaction data into a vector for computer processing and analysis, including but not limited to generating N groups of transaction feature data using Word2Vec, TF-IDF (Term Frequency-Inverse Document Frequency), Doc2Vec, and FastText technologies.
[0033] Optionally, the nominal balance information in this embodiment refers to the transaction amount when the customer purchases the target commodity. For example, if the target commodity purchased by the customer is gold, the nominal balance information = the weight of gold purchased by the customer × the market unit price of gold when the customer purchased it.
[0034] Optionally, the market revaluation information in this embodiment refers to the amount of the target commodity purchased by the customer under the current market conditions. For example, if the target commodity purchased by the customer is gold, the uncovered exposure information = the weight of gold purchased by the customer × the market unit price of gold in the current market.
[0035] Optionally, the uncovered exposure information in this embodiment refers to the fluctuation amount of the target commodity purchased by the customer within the time period (ie), for example: if the target commodity purchased by the customer is gold, then the uncovered exposure information = market revaluation information - nominal balance information.
[0036] Step S206, mapping N groups of the above transaction feature data to the data visualization platform, generating N transaction change curves of the above target commodity in the N above transaction platforms within the above target time period, wherein one of the above transaction change curves is used to represent the transaction change characteristics of the above target commodity on one of the above transaction platforms within the above target time period.
[0037] Optionally, the transaction change curve in this embodiment can be displayed in the form of a chart in the data visualization platform to indicate the transaction change trend of the target commodity on each trading platform during the target time period, such as changes in nominal balances, market value revaluation fluctuations, and dynamics of uncovered exposures.
[0038] Through this application, feature extraction operations are performed on N groups of first transaction data obtained from N first transaction data tables generated from N transaction platforms to generate N groups of transaction feature data of the target commodity, and then the N groups of transaction feature data are mapped to the data visualization platform to generate N transaction change curves of the target commodity in the N transaction platforms within the target time period. Therefore, the problem that the transaction change display of the target commodity in the related art is not intuitive enough can be solved, thereby achieving the effect of efficiently collecting, analyzing and displaying the transaction data of the target commodity.
[0039] In an exemplary embodiment, N groups of first transaction data generated by a target commodity within a target time period are obtained from N first transaction data tables generated in N transaction platforms, including: obtaining N first transaction data tables in the N transaction platforms through a preset interface; extracting the transaction data of the target commodity from the N first transaction data tables according to the commodity information of the target commodity, to obtain N second transaction data tables; performing data processing operations on the transaction data in the N second transaction data tables, and storing the processed transaction data in the target transaction data table, wherein the data processing operations sequentially include: data cleaning operations, data conversion operations, and data integration operations, the data cleaning operations include cleaning abnormal payment values included in the N second transaction data tables and abnormal fields in the N second transaction data tables, to obtain N third transaction data tables; the data conversion operations include converting the transaction data in the N third transaction data tables into structured data, to obtain N fourth transaction data tables; the data integration operations include integrating the transaction data in the N fourth transaction data tables into the target transaction data table; and screening out N groups of the first transaction data within the target time period from the target transaction table.
[0040] Optionally, the preset interface in this embodiment is a predefined data interaction channel between the system (such as a bank, financial institution) and the trading platform, including but not limited to an API (application programming interface), a data file exchange protocol or a specific communication protocol, which is used to automatically obtain transaction data from the trading platform.
[0041] Optionally, the trading platform in this embodiment includes but is not limited to a bank's internal trading system, a third-party trading platform, or an electronic trading system of major global financial markets, such as the New York Mercantile Exchange, the London Metal Exchange, etc.
[0042] Optionally, the first transaction data table in this embodiment is the original transaction record table generated by each trading platform, including all data related to the platform transactions, such as transaction time, transaction amount, transaction type, counterparty, commodity type, nominal principal, market revaluation, etc. The first transaction data table can be divided into data tables for offline customer (which can be individuals, enterprises or institutions in the same industry) transactions and data tables for online transactions.
[0043] Optionally, the data cleaning operation in this embodiment is used to remove outliers and useless information from the second transaction data table, such as abnormal payment values (which may be abnormal transaction amounts caused by system errors or extreme market events) and abnormal fields (which may include incorrect codes or fields with inconsistent formats).
[0044] For example, the trading department of a large bank needs to conduct an in-depth analysis of the trading of gold derivatives (gold forwards on behalf of customers) within a week (target time period), involving three different trading platforms: the internal trading system, the New York Mercantile Exchange and the London Bullion Market Association. The bank obtains the trading data of gold derivatives from the internal trading system, the New York Mercantile Exchange and the London Bullion Market Association through the preset API interface to form three first trading data tables; then, based on the commodity information of gold, all transaction records related to gold derivatives are screened out from each first trading data table to obtain three second trading data tables; data cleaning operations are performed on each second trading data table to remove abnormal payment values and incorrectly filled fields to obtain three third trading data tables; the data in the three third trading data tables are converted into a unified structured format to ensure the consistency of all data fields to form three fourth trading data tables; the data in the three fourth trading data tables are integrated into a target trading data table, and then the trading data of all gold derivatives within a week are screened out from the target trading data table to form N groups of first trading data for subsequent feature extraction and generation of trading change curves.
[0045] Through the above steps, the target commodity transaction data is extracted from the first transaction data table obtained through the preset interface, and then the transaction data of the execution or data cleaning, conversion and integration operations are stored in the target transaction data table, and then the transaction data within the target time period is determined as N groups of first transaction data, thereby ensuring the integrity and accuracy of the data, removing outliers through data cleaning, standardizing the format through data conversion, and unifying the data source through data integration. The transaction data finally screened out more accurately reflects the transaction status of the target commodity within the target time period, thereby improving the reliability and efficiency of subsequent analysis.
[0046] In an exemplary embodiment, N groups of the above-mentioned first transaction data within the above-mentioned target time period are screened out from the above-mentioned target transaction table, including: based on the transaction data in the above-mentioned target transaction data table, respectively calculating the transaction amounts of the above-mentioned target commodities in the N above-mentioned transaction platforms to obtain N groups of second transaction data, wherein the N groups of second transaction data all include the initial transaction data of the above-mentioned target commodities, the transaction data of the above-mentioned target commodities in the current time period and the transaction change status of the above-mentioned target commodities in the above-mentioned target time period; integrating the N groups of the above-mentioned second transaction data with the transaction data in the above-mentioned target transaction data table within the above-mentioned target time period to obtain N groups of the above-mentioned first transaction data.
[0047] Optionally, the initial transaction data of the target commodity in this embodiment refers to the transaction information of the target commodity at the beginning of a specified time period, including transaction amount, transaction volume, etc., and is a reference point for calculating the transaction change state.
[0048] Optionally, the transaction data of the target product in the current time period in this embodiment refers to all transaction information of the target product on each trading platform within the target time period (which may be a certain trading day, week, month or specific date range), including transaction amount, transaction volume, transaction time, etc.
[0049] Optionally, the transaction change status of the target commodity within the target time period in this embodiment is the change of the transaction data of the target commodity in the current time period relative to the initial transaction data, such as the increase or decrease in transaction volume, the increase or decrease in transaction amount, and the impact of market dynamics (such as price fluctuations) on transactions.
[0050] For example, the transaction data analysis department of a multinational bank needs to monitor and analyze the trading of gold on three major global commodity trading platforms: Shanghai Gold Exchange, London Metal Exchange and Chicago Mercantile Exchange within a week (i.e. the above-mentioned target time period). The bank first obtains the first transaction data table of gold derivatives from the three platforms. These data are cleaned, converted and integrated to form a target transaction data table; then, based on the target transaction data table, the transaction amount of gold derivatives on each platform within a week is calculated, and the initial transaction data at the beginning of the week is recorded. The calculated transaction amount and its change status constitute the second transaction data, including the total transaction amount of each platform within a week, the increase or decrease compared with the initial period, the change in transaction volume, etc.; then, N groups of second transaction data are integrated with the data in the target transaction data table to obtain the comprehensive first transaction data of gold derivatives on each trading platform within a week, including detailed transaction amount, transaction volume and market dynamics information.
[0051] Through the above steps, the transaction amount of the target product on each platform is calculated, integrated and formed into the first transaction data, which can clearly show the transaction scale and change trend of the target product on each platform.
[0052] In an exemplary embodiment, based on the commodity attributes and data requirements of the target commodity, a feature selection operation is performed on the first transaction feature vector to obtain the second transaction feature vector. The method further includes: obtaining the transaction status and historical transaction data of the target commodity on the N trading platforms; based on the transaction status and historical transaction data, counting the transaction frequency of the target commodity on each of the trading platforms; and using the transaction frequency to determine the nominal balance information, the market revaluation information and the uncovered exposure information of the target commodity to obtain the data requirements.
[0053] Optionally, the transaction status in this embodiment is used to indicate the real-time status of the target commodity transaction, including but not limited to the transaction type (buy, sell, hold, close, etc.), liquidation status (liquidated, pending liquidation), counterparty and other information.
[0054] Optionally, the historical transaction data in this embodiment refers to past transaction records of the target product on various trading platforms within a certain time range, including transaction time, transaction amount, nominal balance information, price, market value revaluation information, uncovered exposure information, exposure information, etc.
[0055] Optionally, the exposure information in this embodiment can be obtained by summing up the risk exposure information of all customers, and the risk exposure information of the target customer can be calculated in the following way: Exposure information of the target product of the target customer = V m -P r *f r +C p *fap, where V m Indicates the market value revaluation information of the target commodity, P r Indicates the nominal balance information of the target product, f r Indicates the credit risk conversion coefficient corresponding to the transaction of the target commodity, C p It indicates the price of the qualified financial collateral paid by the target customer when purchasing the target product. fap indicates the discount factor of the above qualified financial collateral. The qualified financial collateral includes but is not limited to real estate.
[0056] Optionally, the transaction frequency in this embodiment refers to the number of transactions of the target product on each trading platform within a specified time period, which can be counted by different periods such as day, week, month, etc. to measure transaction activity.
[0057] Optionally, the nominal balance information in this embodiment is the price of the target commodity at the time of the initial transaction, which may be derived from a transaction data table of an offline customer or a transaction data table of various online transaction platforms.
[0058] Optionally, in this embodiment, the transaction frequency is used to obtain data demand, which can be specifically: analyzing the transaction frequency of the target product on each trading platform, and based on the information about the target product that customers inquire about when purchasing the target product, determining the attributes of the target product that customers generally pay attention to and the time when they tend to trade, to obtain the data demand for the target product.
[0059] For example, the risk management department of a large bank needs to monitor and analyze the trading of gold derivatives on multiple global commodity trading platforms (N) in real time in order to assess risk exposure and market dynamics and optimize trading strategies: the bank obtains the trading status of gold derivatives and historical trading data of the past month from trading platforms such as the Shanghai Gold Exchange, the London Metal Exchange and the New York Mercantile Exchange; based on the obtained trading status and historical data, the trading frequency of gold derivatives on each exchange is counted, and it is found that the Shanghai Gold Exchange has the highest trading frequency, followed by the London Metal Exchange, and the New York Mercantile Exchange has a relatively low trading frequency; by analyzing the trading frequency, the specific needs for the notional balance, market revaluation and uncovered exposure information of gold derivatives on each trading platform are determined; in view of the high trading frequency of the Shanghai Gold Exchange, the monitoring frequency of uncovered exposure of derivatives on this platform can be increased, while paying attention to the changes in the notional balance of the London Metal Exchange and the market revaluation data of the New York Mercantile Exchange, and adjusting the data capture and processing strategies in its risk management system to more accurately monitor the market risks of gold derivatives, and adjust the margin requirements based on the uncovered exposure information, optimize trading strategies, and reduce potential market risks.
[0060] Through the above steps, the transaction frequency of the target commodity and the data requirements are determined according to the transaction status and historical transaction data of the target commodity on N trading platforms, which can ensure that the system can more accurately meet the analysis requirements when processing data, avoid processing irrelevant data, and improve system performance.
[0061] In an exemplary embodiment, feature construction is performed on the second transaction feature vector according to the vector features in the second transaction feature vector to obtain the transaction feature data, including: obtaining N groups of second transaction data generated on the first transaction day and N groups of third transaction data generated on the second transaction day, wherein the first transaction day is the previous trading day of the current trading day, the current trading day is the trading day on which the N groups of first transaction data are generated, and the second trading day is the last trading day of the previous year in which the N groups of first transaction data are generated; converting the N groups of second transaction data and the N groups of third transaction data into a third transaction feature vector and a fourth transaction feature vector, respectively; performing feature selection operations on the third transaction feature vector and the fourth transaction feature vector according to the commodity attributes and data requirements of the target commodity to obtain a fifth transaction feature vector and a sixth transaction feature vector; performing the feature construction on the second transaction feature vector based on the vector features in the second transaction feature vector, the vector features in the fifth transaction feature vector, and the vector features in the sixth transaction feature vector to obtain the transaction feature data.
[0062] Optionally, the feature construction in this embodiment is based on selected transaction features, and generates new and more meaningful transaction features or indicators through mathematical operations, data mining or machine learning algorithms.
[0063] For example, when the target commodity is a precious metal or an option commodity, the transaction characteristic data of the target commodity may be stored in the form shown in Table 1. The target commodity of each transaction category will store the nominal balance information, market value revaluation information, uncovered exposure information, and the amount of qualified financial collateral (for example, real estate used as collateral when a customer conducts a transaction) on the current day, compared with the previous day (i.e., the data generated on the first trading day mentioned above), and compared with the end of the previous year (i.e., the third transaction data generated on the second trading day mentioned above).
[0064] Table 1:
[0065]
[0066] Through the above steps, the transaction data of the day before the current day and the end of last year are obtained, converted into transaction feature vectors and feature selection operations are performed to obtain the fifth transaction feature vector and the sixth transaction feature vector. Then, based on the vector features in the second transaction feature vector, the vector features in the fifth transaction feature vector, and the vector features in the sixth transaction feature vector, feature construction is performed on the second transaction feature vector to obtain transaction feature data. By comparing transaction data at different time points, the changing trends of transaction volume, price, etc. can be captured, which is helpful for analyzing the transaction trend of the target product.
[0067] In an exemplary embodiment, based on the vector features in the second transaction feature vector, the vector features in the fifth transaction feature vector, and the vector features in the sixth transaction feature vector, the feature construction is performed on the second transaction feature vector to obtain the transaction feature data, including: extracting a time feature vector from the fifth transaction feature vector, the sixth transaction feature vector, and the second transaction feature vector, and constructing the time series feature based on the time feature; extracting a feature vector of the transaction method of the target commodity from the fifth transaction feature vector, the sixth transaction feature vector, and the second transaction feature vector, and constructing the cluster feature based on the feature vector of the transaction method; extracting a price feature vector of the target commodity from the fifth transaction feature vector, the sixth transaction feature vector, and the second transaction feature vector, and constructing the price dynamic feature based on the price feature vector and the time feature vector; extracting an exposure feature vector from the fifth transaction feature vector, the sixth transaction feature vector, and the second transaction feature vector to obtain the exposure feature; determining the time series feature, the cluster feature, the price dynamic feature, and the exposure feature as the transaction feature data.
[0068] Optionally, the time feature vector in this embodiment is a time-related feature extracted from the fifth, sixth and second transaction feature vectors, including but not limited to transaction date, transaction time, transaction frequency, periodic changes (such as seasonal effects), etc.
[0069] Optionally, the time series features in this embodiment are based on time feature vectors. Features constructed through time series analysis technology can capture patterns in which transactions of target commodities change over time, such as trends, periodicity, seasonal effects, etc. For example, when the target commodity is clothing, the best selling time for clothing can be analyzed through time series features.
[0070] Optionally, the feature vector of the transaction method in this embodiment is features related to the transaction method extracted from the fifth, sixth and second transaction feature vectors, including but not limited to: transaction type (such as spot, forward, option), counterparty type (such as retail customers, institutional customers), transaction channel (such as online platform, offline counter), etc.
[0071] Optionally, the clustering features in this embodiment are features constructed based on transaction methods through a data clustering algorithm, which can classify similar transactions or transaction counterparties into one category and identify different transaction patterns or customer groups.
[0072] Optionally, the price feature vector in this embodiment is a feature related to the target commodity price extracted from the fifth, sixth and second transaction feature vectors, including but not limited to the commodity's buying price, selling price, price volatility, price trend, etc.
[0073] Optionally, the price dynamic features in this embodiment are based on price feature vectors and time feature vectors. Features constructed through dynamic analysis technology can reflect the dynamic characteristics of target commodity prices changing over time, such as the periodicity of price fluctuations, the stability of price trends, etc.
[0074] Optionally, the exposure feature vector in this embodiment is an exposure-related feature extracted from the fifth, sixth and second transaction feature vectors, including but not limited to risk exposure.
[0075] Through the above steps, time series, clustering, price dynamics and exposure feature data are constructed based on the time, transaction method, price, and exposure features extracted from the transaction feature vector, and the transaction data is decomposed into specific features to facilitate in-depth analysis. For example, time series features help analyze time trends, clustering features identify transaction patterns, price dynamics features reveal price fluctuations, and exposure features are used for risk management. These feature data can help analyze the transaction fluctuations of the target product more intuitively.
[0076] It should be noted that, through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0077] The above method is explained below with a specific example:
[0078] Figure 3 It is a flow chart of a method for generating a trading change curve of a target commodity according to an embodiment of the present application. The trading department of the XX system needs to monitor and analyze the trading status of the target commodity in real time, conduct commodity derivative transactions through five different electronic trading platforms (N=5), and analyze the changes in the nominal balances of the target commodities traded on each platform in the past month (target time period), market revaluation dynamics, and the status of uncovered exposures.
[0079] Step S302, obtaining first transaction data of the target product from five transaction platforms, wherein the first transaction data table generated by each platform includes information such as transaction time and transaction amount;
[0080] Step S304, performing feature extraction operation on the first transaction data of each platform to generate N groups of transaction feature data of the target commodity: performing vector conversion on the first transaction data of each platform to obtain a first transaction feature vector, and then selecting features related to the target commodity according to the commodity attributes and specific data requirements (such as nominal balance, market revaluation and uncovered exposure) to form a second transaction feature vector, and finally constructing transaction feature data according to time series, clustering, price dynamics and exposure characteristics;
[0081] Step S306, map the constructed transaction feature data to the data visualization platform of the XX system, and generate five transaction change curves representing the transaction changes of the target commodities on each trading platform: each curve reflects the change trend of the nominal balance, market value revaluation and uncovered exposure of the target commodity on each platform in the past month, and then analyze the best selling time of the target commodity based on the transaction change curve and formulate relevant promotion strategies.
[0082] Through the above steps, the trading data of target commodities can be efficiently collected, analyzed and displayed from multiple trading platforms, which can provide strong support for the trading strategy of target commodities. Through feature extraction, selection and construction, as well as professional data visualization methods, we can have a deeper understanding of market dynamics and make more appropriate decisions.
[0083] In this embodiment, a device for generating a transaction change curve is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0084] Figure 4 is a structural block diagram of a device for generating a transaction change curve according to an embodiment of the present application, such as Figure 4 As shown, the device comprises:
[0085] An acquisition module 42 is used to acquire N groups of first transaction data generated by the target commodity within a target time period from N first transaction data tables generated by N transaction platforms, wherein one group of the first transaction data corresponds to one transaction platform, and N is a natural number greater than 1;
[0086] The extraction module 44 is used to perform feature extraction operations on the N groups of the first transaction data to generate N groups of transaction feature data of the target commodity, wherein for each group of the first transaction data, the feature extraction operation includes the following steps: performing vector conversion on the first transaction data to obtain a first transaction feature vector; performing feature selection operations on the first transaction feature vector according to the commodity attributes and data requirements of the target commodity to obtain a second transaction feature vector, wherein the data requirements include the nominal balance information, market revaluation information and uncovered exposure information of the target commodity; performing feature construction on the second transaction feature vector according to the vector features in the second transaction feature vector to obtain the transaction feature data, wherein the vector features include: time series features, clustering features, price dynamic features and exposure features;
[0087] A generation module 46 is used to map N groups of the above-mentioned transaction feature data to the data visualization platform, and generate N transaction change curves of the above-mentioned target commodity in the N above-mentioned trading platforms within the above-mentioned target time period, wherein one of the above-mentioned transaction change curves is used to represent the transaction change characteristics of the above-mentioned target commodity on one of the above-mentioned trading platforms within the above-mentioned target time period.
[0088] In an exemplary embodiment, the acquisition module 42 includes: a first acquisition unit, which is used to acquire N of the above-mentioned first transaction data tables in the N above-mentioned transaction platforms through a preset interface; a first extraction unit, which is used to extract the transaction data of the above-mentioned target commodities from the N above-mentioned first transaction data tables according to the commodity information of the above-mentioned target commodities, and obtain N second transaction data tables; a first processing unit, which is used to perform data processing operations on the transaction data in the N above-mentioned second transaction data tables, and store the processed transaction data in the target transaction data table, wherein the above-mentioned data processing operations include: data cleaning operations, data conversion operations and data integration operations in sequence, and the above-mentioned data cleaning operations include cleaning abnormal payment values included in the N above-mentioned second transaction data tables and abnormal fields in the N above-mentioned second transaction data tables to obtain N third transaction data tables; the above-mentioned data conversion operations include converting the transaction data in the N above-mentioned third transaction data tables into structured data to obtain N fourth transaction data tables; the above-mentioned data integration operations include integrating the transaction data in the N above-mentioned fourth transaction data tables into the above-mentioned target transaction data table; a first screening unit, which is used to screen out N groups of the above-mentioned first transaction data within the above-mentioned target time period from the above-mentioned target transaction table.
[0089] In an exemplary embodiment, the acquisition module 42 includes: a first calculation unit, used to calculate the transaction amounts of the target commodity in the N transaction platforms based on the transaction data in the target transaction data table, and obtain N groups of second transaction data, wherein the N groups of second transaction data include the initial transaction data of the target commodity, the transaction data of the target commodity in the current time period, and the transaction change status of the target commodity in the target time period; a first integration unit, used to integrate the N groups of second transaction data with the transaction data in the target transaction data table within the target time period, and obtain N groups of first transaction data.
[0090] In an exemplary embodiment, the extraction module 44 includes: a second acquisition unit, used to acquire the transaction status and historical transaction data of the target commodity on the N trading platforms; a first statistical unit, used to count the transaction frequency of the target commodity on each of the trading platforms based on the transaction status and the historical transaction data; and a first determination unit, used to determine the nominal balance information, the market revaluation information and the uncovered exposure information of the target commodity using the transaction frequency to obtain the data requirements.
[0091] In an exemplary embodiment, the extraction module 44 includes: a third acquisition unit, used to acquire N groups of second transaction data generated on a first trading day and N groups of third transaction data generated on a second trading day, wherein the first trading day is the previous trading day of the current trading day, the current trading day is the trading day on which the N groups of first transaction data are generated, and the second trading day is the last trading day of the previous year in which the N groups of first transaction data are generated; a first conversion unit, used to convert the N groups of second transaction data and the N groups of third transaction data into a third transaction feature vector and a fourth transaction feature vector, respectively; a first selection unit, used to perform a feature selection operation on the third transaction feature vector and the fourth transaction feature vector according to the commodity attributes and data requirements of the target commodity to obtain a fifth transaction feature vector and a sixth transaction feature vector; a first construction unit, used to perform the feature construction on the second transaction feature vector based on the vector features in the second transaction feature vector, the vector features in the fifth transaction feature vector, and the vector features in the sixth transaction feature vector to obtain the transaction feature data.
[0092] In an exemplary embodiment, the extraction module 44 includes: a second extraction unit, which is used to extract a time feature vector from the fifth transaction feature vector, the sixth transaction feature vector and the second transaction feature vector, and construct the time series feature based on the time feature; a third extraction unit, which is used to extract a feature vector of the transaction method of the target commodity from the fifth transaction feature vector, the sixth transaction feature vector and the second transaction feature vector, and construct the cluster feature based on the feature vector of the transaction method; a fourth extraction unit, which is used to extract a price feature vector of the target commodity from the fifth transaction feature vector, the sixth transaction feature vector and the second transaction feature vector, and construct the price dynamic feature based on the price feature vector and the time feature vector; a fifth extraction unit, which is used to extract an exposure feature vector from the fifth transaction feature vector, the sixth transaction feature vector and the second transaction feature vector to obtain the exposure feature; a second determination unit, which is used to determine the time series feature, the cluster feature, the price dynamic feature and the exposure feature as the transaction feature data.
[0093] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0094] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0095] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0096] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0097] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0098] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0099] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0100] The embodiments of the present application also provide a computer program, which includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of any one of the above method embodiments.
[0101] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0102] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0103] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for generating a transaction change curve, characterized in that: The method comprises: Obtaining N groups of first transaction data generated by a target commodity within a target time period from N first transaction data tables generated by N transaction platforms, wherein one group of the first transaction data corresponds to one transaction platform, and N is a natural number greater than 1; Performing a feature extraction operation on N groups of the first transaction data to generate N groups of transaction feature data of the target commodity, wherein for each group of the first transaction data, the feature extraction operation includes the following steps: performing vector conversion on the first transaction data to obtain a first transaction feature vector; performing a feature selection operation on the first transaction feature vector according to the commodity attributes and data requirements of the target commodity to obtain a second transaction feature vector, wherein the data requirements include the nominal balance information, market revaluation information, and uncovered exposure information of the target commodity; performing feature construction on the second transaction feature vector according to the vector features in the second transaction feature vector to obtain the transaction feature data, wherein the vector features include: time series features, clustering features, price dynamic features, and exposure features; Map N groups of the transaction feature data to the data visualization platform to generate N transaction change curves of the target commodity in the N transaction platforms within the target time period, wherein one transaction change curve is used to represent the transaction change characteristics of the target commodity on one transaction platform within the target time period.
2. The method according to claim 1, characterized in that: Obtaining N groups of first transaction data generated by a target commodity within a target time period from N first transaction data tables generated by N transaction platforms, including: Obtaining N first transaction data tables from N transaction platforms through a preset interface; Extracting the transaction data of the target product from the N first transaction data tables according to the product information of the target product, to obtain N second transaction data tables; Performing data processing operations on the transaction data in the N second transaction data tables, and storing the processed transaction data in the target transaction data table, wherein the data processing operations sequentially include: data cleaning operations, data conversion operations, and data integration operations, wherein the data cleaning operations include cleaning abnormal payment values included in the N second transaction data tables and abnormal fields in the N second transaction data tables to obtain N third transaction data tables; the data conversion operations include converting the transaction data in the N third transaction data tables into structured data to obtain N fourth transaction data tables; the data integration operations include integrating the transaction data in the N fourth transaction data tables into the target transaction data table; N groups of the first transaction data within the target time period are screened out from the target transaction table.
3. The method according to claim 2, characterized in that Filtering out N groups of the first transaction data within the target time period from the target transaction table includes: Based on the transaction data in the target transaction data table, the transaction amounts of the target commodity in the N transaction platforms are calculated respectively to obtain N groups of second transaction data, wherein the N groups of second transaction data each include the initial transaction data of the target commodity, the transaction data of the target commodity in the current time period, and the transaction change status of the target commodity in the target time period; Integrate N groups of the second transaction data with the transaction data in the target transaction data table within the target time period to obtain N groups of the first transaction data.
4. The method according to claim 1, characterized in that According to the commodity attributes and data requirements of the target commodity, before performing a feature selection operation on the first transaction feature vector to obtain the second transaction feature vector, the method further includes: Obtaining the transaction status and historical transaction data of the target commodity on the N transaction platforms; Based on the transaction status and the historical transaction data, counting the transaction frequency of the target commodity on each of the transaction platforms; The nominal balance information, the market revaluation information and the uncovered exposure information of the target commodity are determined by using the transaction frequency to obtain the data requirement.
5. The method according to claim 1, characterized in that Performing feature construction on the second transaction feature vector according to the vector feature in the second transaction feature vector to obtain the transaction feature data includes: Obtaining N sets of second transaction data generated on a first transaction day and N sets of third transaction data generated on a second transaction day, wherein the first transaction day is the previous transaction day of the current transaction day, the current transaction day is the transaction day on which the N sets of the first transaction data are generated, and the second transaction day is the last transaction day of the previous year on which the N sets of the first transaction data are generated; Converting N groups of the second transaction data and N groups of the third transaction data into a third transaction feature vector and a fourth transaction feature vector respectively; According to the commodity attributes and data requirements of the target commodity, a feature selection operation is performed on the third transaction feature vector and the fourth transaction feature vector to obtain a fifth transaction feature vector and a sixth transaction feature vector; Based on the vector features in the second transaction feature vector, the vector features in the fifth transaction feature vector, and the vector features in the sixth transaction feature vector, the feature construction is performed on the second transaction feature vector to obtain the transaction feature data.
6. The method according to claim 5, characterized in that Based on the vector features in the second transaction feature vector, the vector features in the fifth transaction feature vector, and the vector features in the sixth transaction feature vector, performing the feature construction on the second transaction feature vector to obtain the transaction feature data includes: extracting a time feature vector from the fifth transaction feature vector, the sixth transaction feature vector, and the second transaction feature vector, and constructing the time series feature based on the time feature; extracting a feature vector of the transaction method of the target commodity from the fifth transaction feature vector, the sixth transaction feature vector, and the second transaction feature vector, and constructing the cluster feature based on the feature vector of the transaction method; extracting a price feature vector of the target commodity from the fifth transaction feature vector, the sixth transaction feature vector, and the second transaction feature vector, and constructing the price dynamic feature based on the price feature vector and the time feature vector; extracting an exposure feature vector from the fifth transaction feature vector, the sixth transaction feature vector, and the second transaction feature vector to obtain the exposure feature; The time series characteristics, the clustering characteristics, the price dynamic characteristics and the exposure characteristics are determined as the transaction characteristic data.
7. A device for generating a transaction change curve, characterized in that: include: an acquisition module, configured to acquire N groups of first transaction data generated by a target commodity within a target time period from N first transaction data tables generated by N transaction platforms, wherein one group of the first transaction data corresponds to one transaction platform, and N is a natural number greater than 1; An extraction module is used to perform a feature extraction operation on N groups of the first transaction data to generate N groups of transaction feature data of the target commodity, wherein for each group of the first transaction data, the feature extraction operation includes the following steps: performing vector conversion on the first transaction data to obtain a first transaction feature vector; performing a feature selection operation on the first transaction feature vector according to commodity attributes and data requirements of the target commodity to obtain a second transaction feature vector, wherein the data requirements include nominal balance information, market revaluation information, and uncovered exposure information of the target commodity; performing feature construction on the second transaction feature vector according to vector features in the second transaction feature vector to obtain the transaction feature data, wherein the vector features include: time series features, clustering features, price dynamic features, and exposure features; A generation module is used to map N groups of transaction feature data to a data visualization platform, and generate N transaction change curves of the target commodity in the N transaction platforms within the target time period, wherein one transaction change curve is used to represent the transaction change characteristics of the target commodity on one transaction platform within the target time period.
8. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 6 when executed by a processor.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 6 are implemented.