Transaction strategy generation method and device, and program product

By building user profiles and using target strategy models to generate personalized trading strategies, the problem of existing financial trading systems being unable to provide accurate trading strategies is solved, thereby improving trading security and user experience.

CN121120239APending Publication Date: 2025-12-12INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511234800.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-29
Publication Date
2025-12-12

AI Technical Summary

Technical Problem

Existing financial trading systems are unable to provide accurate trading strategies based on users' individual factors, resulting in insufficient relevance and effectiveness of trading strategies.

Method used

By collecting users' transaction behavior and financial information, user profiles are constructed, and personalized trading strategies, including transaction risk information and product recommendation information, are generated using a target strategy model.

Benefits of technology

It enables the provision of precise trading strategies based on the user's actual situation, improving the security and profit potential of transactions, and enhancing the scientific nature of decision-making and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121120239A_ABST
    Figure CN121120239A_ABST
Patent Text Reader

Abstract

The invention discloses a transaction strategy generation method and device and a program product, and relates to the field of artificial intelligence, and the method comprises the steps: collecting financial information from a plurality of information channels according to the target transaction information of a target user under the condition of obtaining the authorization of the target user when a transaction request of a target transaction triggered by the target user is detected, constructing a financial document set; constructing a user portrait of the target user according to the target transaction information and the financial document set, and classifying the target user according to the user portrait to obtain a target classification result; and inputting a target strategy model according to the user portrait and the target classification result, outputting transaction strategy information for the target transaction, and sending the transaction strategy information to the target user. Through the method and the device, the problem that an accurate transaction strategy cannot be provided for the user according to the actual condition of the user because the transaction is completed only according to a common transaction algorithm or a preset condition of the user when the user performs the transaction in the related technology is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of artificial intelligence, in particular to a transaction strategy generation method and device and program product. BACKGROUND

[0002] In the field of financial transactions, traditional transaction systems face multiple limitations. These systems usually provide basic transaction execution functions, such as real-time quotes, order management, and some fixed algorithmic trading and quantitative analysis tools, but have significant shortcomings in providing comprehensive and intelligent transaction services. Specifically, although existing technical solutions have covered from transaction execution to preliminary intelligent analysis, they lack personalized services, and the recommendation functions are mostly based on general algorithms, without fully considering personalized factors such as users' trading habits and risk preferences, limiting the fit and effectiveness of transaction strategies.

[0003] In related technologies, when a user performs a transaction, only common trading algorithms or the user's preset conditions are used to complete the transaction, which results in the inability to provide accurate transaction strategies to the user according to the user's actual situation. So far, no effective solution has been proposed to solve this problem. SUMMARY

[0004] The main purpose of the present application is to provide a transaction strategy generation method, device and program product to solve the problem that in related technologies, when a user performs a transaction, only common trading algorithms or the user's preset conditions are used to complete the transaction, resulting in the inability to provide accurate transaction strategies to the user according to the user's actual situation.

[0005] To achieve the above-mentioned purpose, according to one aspect of the present application, a transaction strategy generation method is provided, which comprises: when detecting a transaction request of a target transaction triggered by a target user, under the condition that the target user is authorized, collecting financial information from multiple information channels according to target transaction information of the target user to construct a financial document set; the target transaction information at least includes transaction behavior information; constructing a user portrait of the target user according to the target transaction information and the financial document set, and classifying the target user according to the user portrait to obtain a target classification result; inputting the user portrait and the target classification result into a target strategy model to output transaction strategy information for the target transaction, and sending the transaction strategy information to the target user; wherein the transaction strategy information includes transaction risk information of the target transaction and product recommendation information of the target transaction.

[0006] Further, the user portrait of the target user is constructed according to the target transaction information and the set of financial documents, and the target user is classified according to the user portrait to obtain a target classification result, including: performing data cleaning processing, data standardization processing and feature engineering processing on the target transaction information and the set of financial documents respectively to obtain processed financial information; calculating the risk tolerance level of the target user according to the processed financial information, and determining the user portrait according to the risk tolerance level; and classifying the target user based on historical transaction information and the processed financial information to obtain a user classification result.

[0007] Further, the target user is classified based on historical transaction information and the processed financial information to obtain a user classification result, including: determining a first feature vector of a historical user according to the historical transaction information, wherein the first feature vector at least includes: transaction frequency, user holding information, and tendency information of user transaction behavior; determining a second feature vector of the historical user according to questionnaire survey information of the historical user, wherein the second feature vector at least includes: user fund amplification multiple, financial product loss control point, and financial product transaction restriction information; determining a third feature vector of the historical user according to the set of financial documents; mapping the first feature vector, the second feature vector and the third feature vector to a target embedding space through a trained target encoder, and fusing vectors in the target embedding space through a trained fusion encoder to obtain a shared embedding vector of the historical user; inputting the shared embedding vector of the historical user and an embedding vector of the user portrait into a trained clustering network layer to output the user classification result.

[0008] Further, before mapping the first feature vector, the second feature vector and the third feature vector to the target embedding space through the trained target encoder, the method further includes: clustering the shared embedding vector of the historical user using a k-means clustering algorithm to obtain an initial clustering center; calculating the initial clustering center and the shared embedding vector of the historical user using a relative entropy loss function to obtain a clustering loss value; and training model parameters of the target encoder, model parameters of the fusion encoder and model parameters of the clustering network layer according to the clustering loss value to obtain the trained target encoder, the trained fusion encoder and the trained clustering network layer.

[0009] Further, the risk tolerance level of the target user is calculated according to the processed financial information, including: determining the transaction frequency, leverage ratio, maximum drawdown rate, user transaction duration and Sharpe ratio of the target user according to the transaction behavior information; wherein the maximum drawdown rate is the maximum loss percentage of the financial product involved in the target transaction within a preset time period; the Sharpe ratio is determined according to the return rate of the financial product involved in the target transaction; the weights of the maximum drawdown rate, the Sharpe ratio, the transaction frequency and the leverage ratio are determined according to the processed financial information respectively; the risk tolerance level is calculated according to the maximum drawdown rate, the weight of the maximum drawdown rate, the Sharpe ratio, the weight of the Sharpe ratio, the transaction frequency, the weight of the transaction frequency, the leverage ratio and the weight of the leverage ratio.

[0010] Further, the weights of the maximum drawdown rate, the Sharpe ratio, the transaction frequency and the leverage ratio are determined according to the processed financial information respectively, including: receiving a first score of the target user, and adjusting the weights of the maximum drawdown rate and the leverage ratio according to the first score respectively, wherein the first score is used to describe the maximum degree of asset loss that the user can bear; adjusting the weight of the Sharpe ratio according to the processed financial information; adjusting the weight of the transaction frequency according to the leverage ratio; in the case that the user transaction duration is less than or equal to a preset duration, determining the weight of the maximum drawdown rate according to the average weight of the maximum drawdown rate in the historical transaction information, and determining the weight of the Sharpe ratio according to the average weight of the Sharpe ratio in the historical transaction information.

[0011] Further, the target strategy model is a model obtained by training a preset model according to historical transaction information of a financial institution; the preset model at least includes: a feature extraction network, a multi-task output layer; the training process of the target strategy model includes the following steps: respectively standardizing the numerical data in the financial document set and the historical transaction information, and arranging them according to the time sequence information to obtain time sequence vectors; respectively embedding the classification features in the financial document set and the historical transaction information to obtain embedded vectors; extracting the time sequence feature vectors in the time sequence vectors and the embedded vectors through the feature extraction network, and inputting the time sequence feature vectors into the multi-task output layer to obtain the historical transaction evaluation information corresponding to the historical transaction information; calculating the historical transaction evaluation information and the real transaction label corresponding to the historical transaction information based on the cross-entropy loss function to obtain a target loss value; training the preset model according to the target loss value based on the early stopping training method, and verifying by time sequence cross-validation, and determining the target strategy model according to the verification result.

[0012] Further, the feature extraction network at least comprises: an input embedding layer, a long short-term memory network layer, and an attention layer, the time sequence feature vector in the time sequence vector and the embedded vector is extracted through the feature extraction network, comprising: processing the time sequence vector through the input embedding layer to obtain a time sequence embedding vector; converting the embedded vector into a dense vector through the input embedding layer, splicing the time sequence embedding vector and the dense vector to obtain a spliced vector; inputting the spliced vector into the long short-term memory network layer to output a plurality of time step feature vectors; processing the plurality of time step feature vectors through the attention layer to obtain the time sequence feature vector.

[0013] In order to achieve the above purpose, according to another aspect of the present application, a transaction strategy generation device is provided, which comprises: an acquisition unit configured to, when detecting a transaction request of a target transaction triggered by a target user, under the condition that the target user authorizes, according to target transaction information of the target user, collect financial information from a plurality of information channels to construct a financial document set; the target transaction information at least includes: transaction behavior information; a classification unit configured to construct a user portrait of the target user according to the target transaction information and the financial document set, and classify the target user according to the user portrait to obtain a target classification result; a sending unit configured to input the user portrait and the target classification result into a target strategy model, output transaction strategy information for the target transaction, and send the transaction strategy information to the target user; wherein the transaction strategy information includes: transaction risk information of the target transaction, product recommendation information of the target transaction.

[0014] Further, the classification unit comprises: a first processing subunit configured to respectively perform data cleaning processing, data standardization processing and feature engineering processing on the target transaction information and the financial document set to obtain processed financial information; a determination subunit configured to calculate a risk tolerance level of the target user according to the processed financial information, and determine the user portrait according to the risk tolerance level; a classification subunit configured to classify the target user based on historical transaction information and the processed financial information to obtain a user classification result.

[0015] Further, the classification subunit comprises: a first determination module configured to determine a first feature vector of a historical user according to the historical transaction information, wherein the first feature vector at least comprises: a transaction frequency, user position information, and user transaction behavior tendency information; a second determination module configured to determine a second feature vector of the historical user according to the historical user questionnaire information, wherein the second feature vector at least comprises: a user fund amplification multiple, a financial product loss control point, and a financial product transaction restriction information; a third determination module configured to determine a third feature vector of the historical user according to the financial document set; a fusion module configured to map the first feature vector, the second feature vector and the third feature vector to a target embedding space through a trained target encoder, and fuse vectors in the target embedding space through a trained fusion encoder to obtain a shared embedding vector of the historical user; and an output module configured to input the shared embedding vector of the historical user and the embedding vector of the user portrait into a trained clustering network layer to output the user classification result.

[0016] Further, the classification subunit further comprises: a clustering module configured to cluster the shared embedding vector of the historical user by using a k-means clustering algorithm before the first feature vector, the second feature vector and the third feature vector are mapped to the target embedding space through the trained target encoder; a first calculation module configured to calculate the initial clustering center and the shared embedding vector of the historical user by using a relative entropy loss function to obtain a clustering loss value; and a training module configured to train model parameters of the target encoder, model parameters of the fusion encoder and model parameters of the clustering network layer according to the clustering loss value to obtain the trained target encoder, the trained fusion encoder and the trained clustering network layer.

[0017] Further, the determination subunit comprises: a fourth determination module configured to determine a transaction frequency, a leverage ratio, a maximum drawdown rate, a user transaction duration and a Sharpe ratio of the target user according to the transaction behavior information; wherein the maximum drawdown rate is a maximum loss percentage of a financial product involved in the target transaction in a preset time period; and the Sharpe ratio is determined according to a return rate of the financial product involved in the target transaction; a fifth determination module configured to determine a weight of the maximum drawdown rate, a weight of the Sharpe ratio, a weight of the transaction frequency and a weight of the leverage ratio according to the processed financial information; and a second calculation module configured to calculate the risk tolerance level according to the maximum drawdown rate, the weight of the maximum drawdown rate, the Sharpe ratio, the weight of the Sharpe ratio, the transaction frequency, the weight of the transaction frequency, the leverage ratio and the weight of the leverage ratio.

[0018] Further, the fifth determining module comprises: a first adjusting sub-module, configured to receive a first score of the target user, and adjust a weight of the maximum drawdown rate and a weight of the leverage rate according to the first score, wherein the first score is used to describe a maximum degree of asset loss that can be borne by the user; a second adjusting sub-module, configured to adjust a weight of the Sharpe ratio according to the processed financial information; a third adjusting sub-module, configured to adjust a weight of the trading frequency according to the leverage rate; and a determining sub-module, configured to, in a case where the user trading duration is greater than a preset duration, determine the weight of the maximum drawdown rate according to an average weight of the maximum drawdown rate in the historical transaction information, and determine the weight of the Sharpe ratio according to an average weight of the Sharpe ratio in the historical transaction information.

[0019] Further, the target strategy model is a model obtained by training a preset model according to historical transaction information of a financial institution; the preset model at least comprises a feature extraction network and a multi-task output layer; the device further comprises: an arrangement unit, configured to perform standardization processing on numerical data in the set of financial documents and the historical transaction information respectively, and arrange the numerical data according to time sequence information to obtain time sequence vectors; a processing unit, configured to perform embedding processing on classification features in the set of financial documents and the historical transaction information respectively to obtain embedded vectors; an extraction unit, configured to extract time sequence feature vectors from the time sequence vectors and the embedded vectors by using the feature extraction network, and input the time sequence feature vectors into the multi-task output layer to obtain historical transaction evaluation information corresponding to the historical transaction information; a calculation unit, configured to calculate the historical transaction evaluation information and a real transaction label corresponding to the historical transaction information based on a cross-entropy loss function to obtain a target loss value; and a training unit, configured to train the preset model according to the target loss value based on an early stopping training manner, and verify the preset model by using time sequence cross-validation, and determine the target strategy model according to a verification result.

[0020] Further, the feature extraction network at least comprises an input embedding layer, a long short-term memory network layer and an attention layer; and the extraction unit comprises: a second processing sub-unit, configured to process the time sequence vectors by using the input embedding layer to obtain time sequence embedding vectors; a splicing sub-unit, configured to convert the embedded vectors into dense vectors by using the input embedding layer, splice the time sequence embedding vectors and the dense vectors to obtain spliced vectors; and an output sub-unit, configured to input the spliced vectors into the long short-term memory network layer to output feature vectors of multiple time steps; and a third processing sub-unit, configured to process the feature vectors of the multiple time steps by using the attention layer to obtain the time sequence feature vectors.

[0021] To achieve the above object, according to an aspect of the present application, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the generation method of any one of the transaction strategies described above, and the computer program, when executed by the processor, implements the steps of the generation method of the transaction strategies described in various embodiments of the present application.

[0022] To achieve the above object, according to an aspect of the present application, a computer readable storage medium is provided, comprising stored computer instructions, wherein the computer instructions, when executed by a processor, implement the generation method of any one of the transaction strategies described above.

[0023] To achieve the above object, according to an aspect of the present application, an electronic device is provided, comprising one or more processors and a memory, the memory being configured to store one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the generation method of any one of the transaction strategies described above.

[0024] In the embodiments of the present application, when the transaction request of the target transaction triggered by the target user is detected, the financial information is collected from multiple information channels according to the target transaction information of the target user under the condition that the target user is authorized, and a financial document set is constructed; the target transaction information at least includes transaction behavior information; the financial information at least includes questionnaire information and financial market information; a user portrait of the target user is constructed according to the target transaction information and the financial document set, and the target user is classified according to the user portrait to obtain a target classification result; the user portrait and the target classification result are input into a target strategy model, and transaction strategy information for the target transaction is output, and the transaction strategy information is sent to the target user; wherein the transaction strategy information includes transaction risk information of the target transaction and product recommendation information of the target transaction, thereby solving the technical problem that when a user performs a transaction, only a common transaction algorithm or a preset condition of the user is used to complete the transaction, and accurate transaction strategies cannot be provided to the user according to the actual situation of the user.

[0025] By integrating the behavior data in the target user transaction request and the widely collected financial information, a detailed financial document set is constructed, which can accurately depict the transaction tendency of the user. Meanwhile, by analyzing the target transaction information and the financial document set, a user portrait is constructed and classified, so that the system can generate a personalized classification result based on the user characteristics, thereby realizing accurate portrait and classification and further achieving the technical effect of optimizing the service matching degree. According to the user portrait and the classification result, the transaction strategy information output by the target strategy model includes risk assessment and product recommendation, which not only enhances the scientificity of the decision, but also improves the safety and potential income of the user in the transaction, ensures the practicability and effectiveness of the strategy, and finally realizes the technical target of improving the intelligent level of the transaction and the user experience. BRIEF DESCRIPTION OF DRAWINGS

[0026] The accompanying drawings, which form a part of the present application, are intended to provide further understanding of the present application, and the illustrative embodiments of the present application and their description serve the purpose of explaining the present application. The accompanying drawings should not be construed as an inappropriate limitation on the present application. In the drawings:

[0027] Figure 1 FIG. 1 is a hardware structure block diagram of a computer terminal (or mobile device) for implementing a method for generating a transaction strategy according to an embodiment of the present application;

[0028] Figure 2 FIG. 2 is a flowchart of an optional method for generating a transaction strategy according to an embodiment of the present application;

[0029] Figure 3 FIG. 3 is a flowchart of an optional method for generating a user transaction strategy according to an embodiment of the present application;

[0030] Figure 4 FIG. 4 is a schematic diagram of a transaction strategy generation device according to an embodiment of the present application;

[0031] Figure 5 FIG. 5 is a schematic diagram of a transaction strategy generation electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0032] It should be noted that the embodiments and features in the present application can be combined with each other without conflict. The present application will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.

[0033] It should be noted that the processing method, device, storage medium and electronic device of the present application file, and the method and device thereof can be used in the process of providing transaction strategies to customers in the field of financial technology, and improve the accuracy of the transaction strategy. The processing method, device, storage medium and electronic device of the present application file, and the method and device thereof can be used in any field other than the field of financial technology, and the application field of the processing method, device, storage medium and electronic device of the present application file, and the method and device thereof is not limited.

[0034] It should be noted that the information (including but not limited to user equipment information, user personal information, collected data, used data, generated data, processed data, etc.) and data (including but not limited to data for analysis, stored data, displayed data, collected information, used information, generated information, processed information, etc.) involved in the present application are information and data authorized by the user or authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of related data comply with relevant laws, regulations and standards of relevant countries and regions, necessary security measures are taken, and public order and good customs are not violated, and appropriate operation portals are provided for users to choose authorization or refusal. For example, interfaces are provided between the system and related users or institutions to provide appropriate operation portals for users to choose to agree or refuse automatic decision results; if the user chooses to refuse, the expert decision process is entered.

[0035] Embodiment 1

[0036] According to the embodiments of the present application, a method for generating a transaction strategy is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0037] The method embodiment provided by the embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 is a hardware structure block diagram of a computer terminal (or mobile device) for implementing the method for generating a transaction strategy provided by the embodiment 1 of the present application. As shown in Figure 1 , the computer terminal 10 (or mobile device) can include one or more (in the figure, 102a, 102 transaction strategy generation, …, 102n are used to show) processors 102 (the processor 102 can include but not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication function. In addition, it can also include a display, an input / output interface (I / O interface), a universal serial bus (US transaction strategy generation) port (which can be included as one of the ports of the US bus), a network interface, a power supply and / or a camera. Those skilled in the art can understand that Figure 1 The structure shown is only schematic, which does not limit the structure of the above-mentioned electronic device. For example, the computer terminal 10 can include more or fewer components than those shown in Figure 1 , or have a different configuration from that shown in Figure 1 .

[0038] It should be noted that the one or more processors 102 and / or other data processing circuitry described above can be generally referred to herein as "data processing circuitry". The data processing circuitry can be embodied in whole or in part as software, hardware, firmware, or any combination thereof. In addition, the data processing circuitry can be a single standalone processing module, or incorporated in whole or in part within any of the other elements of the computer terminal 10 (or mobile device). As referred to in embodiments of the present application, the data processing circuitry functions as a processor to control, for example, the selection of the variable resistance terminal path connected to the interface.

[0039] The memory 104 can be used to store software programs of application software and modules, such as program instructions / data storage means corresponding to the transaction strategy generation method in embodiments of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, i.e. implements the transaction strategy generation method described above. The memory 104 can include a high-speed random access memory, and can further 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 can further include a memory disposed remotely with respect to the processor 102, which can be connected to the computer terminal 10 through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0040] The transmission device 106 is used to receive or send data via a network. Specific examples of the network can include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (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 in a wireless manner.

[0041] The display can be, for example, a touch screen type liquid crystal display (LCD), which can enable a user to interact with the user interface of the computer terminal 10 (or mobile device).

[0042] In the above operating environment, the present application provides a transaction strategy generation method as shown in Figure 2 Figure 2 is a flowchart of an optional transaction strategy generation method according to Embodiment 1 of the present application.

[0043] ​Step S201, upon detecting a transaction request of a target transaction triggered by a target user, collecting financial information from multiple information channels according to target transaction information of the target user to construct a financial document set under the condition that the target user has authorized, wherein the target transaction information at least includes transaction behavior information, and the financial information at least includes questionnaire information and financial market information.

[0044] In this embodiment 1, upon the target user initiating a transaction request, it is first confirmed that the user has obtained authorization permission for data use. Subsequently, according to the transaction behavior details contained in the transaction request, such as transaction type, target asset, etc., relevant financial data is retrieved from multiple information channels, including questionnaire information of the user, financial market information and past transaction records, etc., to construct a comprehensive financial document library based thereon, to provide a data basis for subsequent personalized transaction assistance and risk management strategies.

[0045] Among them, the financial market information refers to real-time or historical data directly from the financial market, which reflects the current state of the financial market and can help analyze the user's transaction risk. Therefore, the financial market information used in this application focuses on data-level analysis and application, aiming to provide transaction strategies to the user. By processing these specific quantitative indicators, transaction strategies based on the current market environment are provided to the user.

[0046] Step S202, constructing a user portrait of the target user according to the target transaction information and the financial document set, and classifying the target user according to the user portrait to obtain a target classification result.

[0047] In this embodiment 1, based on the specific transaction activity data of the target user and the financial documents collected from multiple channels, detailed portrait information of the target user is constructed, including but not limited to transaction preferences, financial status, risk tolerance and other key information, forming a deep understanding of the user's transaction behavior and habits. Subsequently, data mining and machine learning techniques are used for classification analysis of the target user, and through comparison with other user portraits, its group information in the user group is identified, thereby obtaining the target classification result. This result not only reflects the individual characteristics of the user, but also reveals the transaction behavior category to which the user belongs, providing a data basis for subsequent personalized services.

[0048] Step S203, inputting the user portrait and the target classification result into a target strategy model, outputting transaction strategy information for the target transaction, and sending the transaction strategy information to the target user; wherein the transaction strategy information includes transaction risk information of the target transaction and product recommendation information of the target transaction.

[0049] In this embodiment 1, the constructed user portrait and classification results are input into the target strategy model. The model is trained to analyze user characteristics and generate transaction strategies covering risk assessment and product recommendations. The transaction risk information is based on the user's financial situation and risk tolerance, combined with market information, to provide objective risk assessment results to assist users in making trading decisions. The product recommendation information is based on the user's investment preferences and behavior patterns to filter out financial products that meet their needs, including currency pairs and derivatives. Finally, these transaction strategy information is sorted and synchronized with the target user to assist users in trading.

[0050] Optionally, in the transaction strategy generation method provided in Embodiment One of the present application, a user portrait of the target user is constructed according to the target transaction information and the financial document set, and the target user is classified according to the user portrait to obtain a target classification result, including: performing data cleaning processing, data standardization processing and feature engineering processing on the target transaction information and the financial document set respectively to obtain processed financial information; calculating the risk tolerance level of the target user according to the processed financial information, and determining the user portrait according to the risk tolerance level; classifying the target user based on historical transaction information and processed financial information to obtain a user classification result.

[0051] In this embodiment 1, in order to accurately assess user risk preference and provide transaction strategies, the received target transaction information and financial document set are first subjected to data cleaning to eliminate incomplete or abnormal records and ensure data quality. Then, data standardization processing is performed to convert values of different magnitudes to the same scale to eliminate dimensional effects and facilitate subsequent analysis. Then, feature engineering processing is applied to extract and construct features such as transaction frequency and asset allocation. This process aims to extract features from raw data that effectively reflect user behavior and market information.

[0052] Through the above preprocessing steps, structured and standardized financial information can be obtained for calculating the risk tolerance level of the target user. This level is determined based on a comprehensive evaluation of user transaction history, financial situation and market information, through statistical analysis and model prediction to quantify the user's risk tolerance. Subsequently, historical transaction information and processed financial information are combined to classify users using machine learning algorithms to identify commonalities and differences in their trading behavior and investment preferences, resulting in a user classification result. This classification process takes into account the complexity of the user portrait and market information, ensuring the personalization and real-time nature of the transaction strategy and risk control strategy.

[0053] Optionally, in the transaction strategy generation method provided in Embodiment One of the present application, the target user is classified based on the historical transaction information and the processed financial information to obtain a user classification result, including: determining a first feature vector of a historical user according to the historical transaction information, wherein the first feature vector at least includes: transaction frequency, user position information, and user transaction behavior tendency information; determining a second feature vector of the historical user according to questionnaire survey information of the historical user, wherein the second feature vector at least includes: user capital amplification multiple, financial product loss control point, and financial product transaction restriction information; determining a third feature vector of the historical user according to a financial document set; mapping the first feature vector, the second feature vector, and the third feature vector to a target embedding space through a trained target encoder, and fusing vectors in the target embedding space through a trained fusion encoder to obtain a shared embedding vector of the historical user; and inputting the shared embedding vector of the historical user and an embedding vector of a user portrait into a trained clustering network layer to output the user classification result.

[0054] In Embodiment One, in order to construct a comprehensive and accurate user portrait, first, a first feature vector is extracted based on historical transaction records covering transaction frequency, position details, and behavior preferences, etc. to quantify the transaction behavior of the user. Exemplarily, the first feature vector corresponding to the transaction behavior of N users can be expressed as wherein f i represents transaction frequency, τ i represents user position, and d i represents behavior preference when the user holds a position.

[0055] Then, the questionnaire feedback of the historical user is analyzed to quantify the risk preference information of the user, and a second feature vector is constructed including user capital amplification multiple, user closing position information, and user acceptance of asset price changes, etc. to understand the risk tolerance and transaction behavior constraints of the user. Exemplarily, the second feature vector corresponding to the risk preference information of N users can be expressed as wherein λ i represents user capital amplification multiple, also known as leverage information, s i represents user closing position information, also known as stop loss information, i.e. product price when the transaction is automatically closed, and v i represents the user's acceptance of asset price changes.

[0056] Secondly, non-financial market transaction data is extracted to form a third feature vector Exemplarily, the first feature vector corresponding to the transaction behavior of N users can be expressed as wherein m trepresents the trading optimism or trading pessimism of the text and data analysis of the financial market collected at time t t represents the market instability degree of the text and data analysis of the financial market collected at time t

[0057] Then, the first feature vector, the second feature vector and the third feature vector are mapped to a unified target embedding space by using a pre-trained target encoder to obtain target embedding vectors corresponding to the first feature vector, the second feature vector and the third feature vector, ensuring the comparability and fusion of information from different sources. By using a fusion encoder, the target embedding vectors of the first feature vector, the second feature vector and the third feature vector are further integrated, the correlation and complementarity between features are strengthened, and a shared embedding vector of the user portrait of the historical user is generated.

[0058] Exemplarily, three independent neural network encoders are used to map data of different modalities to the same embedding space, which can be represented as: a transaction encoder: a risk encoder: a trading tendency encoder: wherein d is the dimension of the shared embedding space, each encoder is a multilayer perceptron, and for user i, three target embedding vectors can be obtained: a fusion encoder is used to combine the three target embedding vectors into a shared embedding vector wherein W and b are learnable parameters,

[0059] Finally, the shared embedding vector of the historical user and the portrait embedding vector of the target user are input into the trained clustering network layer, and the user classification result is output by calculating the similarity and distance.

[0060] Through the above steps, the personalized features and market adaptability of the user are understood from multiple dimensions, the technical effects of deep construction and accurate classification of the user portrait are achieved, and a solid data foundation is laid for subsequent provision of customized trading strategies and risk control strategies.

[0061] Optionally, in the transaction strategy generation method provided in Embodiment One of the present application, before the first feature vector, the second feature vector and the third feature vector are mapped to the target embedding space by the trained target encoder, the above method further comprises: clustering the shared embedding vectors of the historical users by using a k-means clustering algorithm to obtain initial clustering centers; calculating the initial clustering centers and the shared embedding vectors of the historical users by using a relative entropy loss function to obtain a clustering loss value; and training the model parameters of the target encoder, the model parameters of the fusion encoder and the model parameters of the clustering network layer according to the clustering loss value to obtain the trained target encoder, the trained fusion encoder and the trained clustering network layer.

[0062] In Embodiment One, in order to accurately divide user categories and improve the efficiency of personalized services, first, the k-means clustering algorithm is used to process the shared embedding vectors of the historical users in the unified target embedding space, aiming to find user groups. The optimal initial clustering centers are determined by iterative calculation, representing the core features of each group. For example, the k-means algorithm is used to cluster the shared embedding vectors in the shared embedding space to obtain the initial centers μ = {μ1, …, μk}. k} where k is the number of clusters.

[0063] Subsequently, the relative entropy loss function (Kullback-Leibler Divergence Loss, or KL divergence loss function) is used to measure the distance between the initial clustering centers and the user shared vectors, and the clustering loss value in the initial state is calculated, aiming to evaluate the deviation between the current clustering result and the real distribution of the data. For example, the clustering loss function can be represented as: where Pij represents the probability of the shared embedding vector of the i-th user belonging to the clustering center of the j-th group, and qij represents the soft assignment probability learned by the model, i.e., the degree of association between the i-th user and the clustering center of the j-th group considered by the model.

[0064] Finally, based on the calculated clustering loss value, the parameters of the target encoder, the fusion encoder and the clustering network layer are continuously adjusted, and the model is refined by optimization methods such as backpropagation and gradient descent, until the clustering loss value reaches below the preset threshold, indicating that the accuracy and robustness of the model for user classification have been significantly improved. After training and optimization, the trained target encoder, the trained fusion encoder and the trained clustering network layer can more effectively and accurately identify user groups and provide targeted transaction strategies and risk control strategies for each sub-user group.

[0065] For example, the clustering network layer is trained to calculate the probability of each user i being assigned to the cluster with the highest probability: ci = argmax j q ij i.e. the maximum value of the soft assignment probability qij of the jth cluster center is calculated for the ith user, and the jth cluster center corresponding to the maximum value is the cluster c_i to which the ith user is assigned. The statistical characteristics of each cluster on the original features are analyzed according to the values to explain the business meaning of the cluster.

[0066] Through the above steps, the automation and intelligence of user classification are realized, and the technical effects of accurate clustering according to user behavior, risk preference and market information are achieved, which lays a technical foundation for further providing customized services and optimizing user experience.

[0067] Optionally, in the method for generating a transaction strategy provided in Embodiment One of the present application, the risk tolerance level of the target user is calculated according to the processed financial information, including: determining the transaction frequency, leverage ratio, maximum drawdown rate, user transaction duration and Sharpe ratio of the target user according to the transaction behavior information; wherein the maximum drawdown rate is the maximum loss percentage of the financial product involved in the target transaction within a preset time period; the Sharpe ratio is determined according to the return rate of the financial product involved in the target transaction; the weight of the maximum drawdown rate, the weight of the Sharpe ratio, the weight of the transaction frequency and the weight of the leverage ratio are determined according to the processed financial information; and the risk tolerance level is calculated according to the maximum drawdown rate, the weight of the maximum drawdown rate, the Sharpe ratio, the weight of the Sharpe ratio, the transaction frequency, the weight of the transaction frequency, the leverage ratio and the weight of the leverage ratio.

[0068] In Embodiment 1, to quantitatively evaluate the risk tolerance of the user, first, the key transaction indicators of the target user within a specific time window are calculated according to the transaction behavior data, including the transaction frequency, the leverage ratio used (i.e. the leverage information mentioned above, also referred to as the leverage ratio), the maximum loss ratio of the transaction (i.e. the maximum drawdown rate) and the Sharpe ratio. Among them, the maximum drawdown rate reflects the maximum loss ratio that the user can tolerate, the Sharpe ratio measures the cost performance of the user's investment activities, and the transaction frequency and the leverage ratio directly reflect the user's transaction activity and the degree of amplification of the use of funds. For example, for the transaction frequency, the number of transactions per day of the user can be calculated and standardized, for example, if the user trades 2 times a day, the transaction frequency can be determined as 0.8; the leverage ratio can be determined according to the ratio between the actual leverage of the user and the maximum leverage of the financial institution (or trading platform); and the maximum drawdown rate can be determined according to the maximum loss percentage of the user in the past 30 days.

[0069] Then, according to the processed financial information, the weights of the above four indicators are determined. This step aims to balance the influence of various indicators on the total risk bearing level, so that the final evaluation is more objective and comprehensive. The determination of the weight considers the dual role of user subjective risk preference and objective market information, and dynamically adjusts the importance of different indicators by analyzing the answers about risk attitude in the questionnaire and the financial market information.

[0070] Finally, the maximum drawdown rate, the Sharpe ratio, the trading frequency and the leverage ratio are combined with their corresponding weights by using the weighted average method to calculate the user's risk bearing level in the form of mathematical formula. This calculation process ensures that the risk assessment not only reflects the user's personal investment style, but also takes into account the dynamic changes of the market environment, providing a quantitative risk perspective for the next step of personalized trading strategy formulation. Exemplarily, the calculation formula of the user's risk bearing level can be as follows: risk_score = a * (maximum drawdown rate) + β * (Sharpe ratio) + γ * (trading frequency) + δ * (leverage usage rate), where a, β, γ, δ are weight coefficients, which can be dynamically calibrated through user survey questionnaire.

[0071] Through the above steps, the technical effect of accurately evaluating the user's risk bearing level is achieved, which not only provides the user with a trading strategy that fits his risk preference, but also provides data support for dynamically adjusting the risk control threshold and strategy, enhancing the intelligent service level of the platform and the trading security of the user.

[0072] Optionally, in the method for generating a trading strategy provided in Embodiment One of the present application, the weights of the maximum drawdown rate, the Sharpe ratio, the trading frequency and the leverage ratio are determined according to the processed financial information, which includes: receiving a first score of a target user, and adjusting the weights of the maximum drawdown rate and the leverage ratio according to the first score, wherein the first score is used to describe the maximum degree of asset loss that the user can bear; adjusting the weight of the Sharpe ratio according to the processed financial information; adjusting the weight of the trading frequency according to the leverage ratio; in the case that the user's trading duration is less than or equal to a preset duration, determining the weight of the maximum drawdown rate according to the average weight of the maximum drawdown rate in the historical transaction information, and determining the weight of the Sharpe ratio according to the average weight of the Sharpe ratio in the historical transaction information.

[0073] In this embodiment 1, in order to individualize the weight coefficients related to risk bearing capacity, first, the questionnaire information filled in by the user can be received to determine the maximum loss bearing score of the target user, i.e. the first score mentioned above. This score quantifies the highest loss limit that the user can tolerate in investment decision-making. Exemplarily, the maximum loss bearing score 5% filled in by the user in the questionnaire can be converted into the value 0.05.

[0074] Then, by analyzing the maximum loss bearing score, the weight of the maximum drawdown rate (i.e., the aforementioned a) and the weight of the leverage rate (i.e., the aforementioned d) can be dynamically adjusted. Specifically, for users with higher risk tolerance, the a weight is reduced, and the d weight is increased, and vice versa. For example, for a user with a maximum loss bearing score greater than 0.8, the weight a of the maximum drawdown rate corresponding to the user can be reduced by 20%, and the weight d of the leverage rate corresponding to the user can be increased by 20%. This adjustment mechanism ensures that the weights match the user's risk preference, enhancing the personalization of the recommended strategy.

[0075] Secondly, the degree of instability of the financial market is determined according to the processed financial information (e.g., calculating the volatility index and exchange rate fluctuation). Subsequently, the weight of the Sharpe ratio (b) is dynamically adjusted according to the degree of instability of the financial market. Exemplarily, when the growth rate of market volatility is greater than 30%, the weight b of the Sharpe ratio is automatically reduced, and b is multiplied by 0.8, thereby reducing the potential risk of user transactions.

[0076] Further, the user's leverage rate is also considered, based on which the weight of the transaction frequency (g) is adjusted. Exemplarily, when the user's leverage rate is greater than a preset value, the weight g of the transaction frequency is set to 0 to suppress excessively frequent transactions and prevent additional risks brought by high leverage operations to the user.

[0077] Finally, for newly registered users (i.e., the user transaction duration is less than or equal to a preset duration, which can be set to 7 days), the average weight of the maximum drawdown rate in the user's historical transaction information is calculated to determine the weight a of the maximum drawdown rate of the newly registered user, and the average weight of the Sharpe ratio in the user's historical transaction information is calculated to determine the weight b of the Sharpe ratio of the newly registered user.

[0078] Through the above steps, the technical effect of combining the weight adjustment mechanism with the individual risk tolerance of the user and market information is achieved, thereby improving the adaptability and personalization level of the trading strategy on the basis of ensuring investment safety, enhancing user experience and the accuracy of investment decisions. The design and implementation of this mechanism reflect flexibility and intelligence in dealing with complex user preferences and market dynamics, providing more reasonable investment strategies for users while effectively controlling various risks in the investment process.

[0079] Optionally, in the transaction strategy generation method provided in Embodiment One of the present application, the target strategy model is a model obtained by training a preset model according to historical transaction information of the financial institution; the preset model at least includes a feature extraction network and a multi-task output layer; the training process of the target strategy model includes the following steps: respectively performing standardization processing on numerical data in the financial document set and the historical transaction information, and arranging according to time sequence information to obtain a time series vector; respectively performing embedding processing on classification features in the financial document set and the historical transaction information to obtain embedded vectors; extracting time sequence feature vectors in the time series vector and the embedded vectors through the feature extraction network, and inputting the time sequence feature vectors into the multi-task output layer to obtain historical transaction evaluation information corresponding to the historical transaction information; calculating the historical transaction evaluation information and a real transaction label corresponding to the historical transaction information based on a cross-entropy loss function to obtain a target loss value; and training the preset model according to the target loss value based on an early stopping training method, and verifying by time series cross-validation, and determining the target strategy model according to a verification result.

[0080] In Embodiment One, in order to construct an efficient and accurate transaction evaluation model, first, the numerical data in the financial document set and the historical transaction information is subjected to standardization processing, which ensures that all numerical features are on the same scale, which is conducive to model training and prediction. Exemplarily, the mean and standard deviation of the sliding window can be used to standardize each numerical feature. Subsequently, the processed numerical features are arranged according to time sequence information to form a time series vector, which provides structured data input for the model to capture time dependence. At the same time, classification features such as currency pairs and transaction types are subjected to embedding processing to convert them into dense vector representations to enhance the model's processing capability for these features.

[0081] Secondly, the feature extraction network is applied to the time series vector and the embedded vector, aiming to capture the time sequence patterns and classification feature associations hidden in the data, and generate time sequence feature vectors. These vectors are then input into the multi-task output layer, which is analyzed and processed by the model to output evaluation results matching the historical transaction information, including transaction timing prediction, risk level evaluation, and currency pair recommendation, etc.

[0082] Exemplarily, the multi-task output layer can output the prediction results of multiple tasks: a binary classification task, predicting whether the user is suitable for trading at the current time, can output the prediction probability of the user being suitable for trading at the current time using a sigmoid function; a multi-classification task, predicting the risk level of the user's transaction, can output the prediction probability of the user's transaction risk belonging to different categories (for example, low risk, medium risk, and high risk) using softmax; a multi-label classification task, recommending currency pairs to the user, outputs the prediction probability of each currency pair using sigmoid, indicating whether to recommend (multiple currency pairs can be recommended at the same time).

[0083] Finally, the cross-entropy loss function is used to evaluate the difference between the historical transaction evaluation information output by the model and the actual transaction label, and the target loss value is calculated, which directly reflects the accuracy of the model prediction. Then, using the Adam optimizer, the initial learning rate is set to 0.001, and based on the early stopping training method, the model parameters are dynamically adjusted according to the target loss value to avoid overfitting. Then, through time series cross-validation, the generalization performance of the model on different time period data is ensured, and the effectiveness of the model is confirmed, so as to determine the final target strategy model for real-time transaction evaluation and strategy generation.

[0084] Exemplarily, the target loss function for calculating the target loss value can be represented as: target loss value = w1*L1 + w2*L2 + w3*L3, where L1 represents the loss function value calculated based on the binary cross-entropy loss function for the binary classification task, L2 represents the loss function value calculated based on the cross-entropy loss function for the multi-classification task, and L3 represents the loss function value calculated based on the multi-label cross-entropy function for the multi-label classification task.

[0085] Through the above steps, the technical effects of deep analysis of historical transaction data and optimization of model training are achieved, ensuring the accuracy and adaptability of the transaction evaluation model, so as to provide accurate transaction strategies for users.

[0086] Optionally, in the method for generating a transaction strategy provided in Embodiment One of the present application, the feature extraction network at least includes: an input embedding layer, a long short-term memory network layer, and an attention layer, and the time sequence feature vector in the time sequence vector and the embedded vector is extracted through the feature extraction network, including: processing the time sequence vector through the input embedding layer to obtain a time sequence embedding vector; converting the embedded vector into a dense vector through the input embedding layer, splicing the time sequence embedding vector and the dense vector to obtain a spliced vector; inputting the spliced vector into the long short-term memory network layer to output a plurality of time step feature vectors; and processing the plurality of time step feature vectors through the attention layer to obtain a time sequence feature vector.

[0087] In this embodiment 1, in order to deeply mine the importance of time dependence and classification features implied in the transaction data, the sorted time series numerical data is first sent to the input embedding layer (for example, a fully connected layer). Through the numerical conversion mechanism of this layer, time series embedding vectors that can reflect the internal relationship of the time series are obtained. Such processing enables the model to better understand the trend of transaction data over time.

[0088] Then, the input embedding layer is also responsible for converting classification features such as different currency pairs or transaction types into dense vector representations. This process maps discrete classification information to continuous vector space through the input embedding layer, thereby preserving the intrinsic properties of classification features and their relationships with each other. Subsequently, the time series embedding vectors and the dense vectors of classification features are spliced to generate a spliced vector that integrates time series and classification information, ensuring that the model can consider both important factors when processing.

[0089] Secondly, the spliced vector is input into one or more long short-term memory network layers, and the LSTM unique gating mechanism is used to output feature vectors at multiple time steps. LSTM can remember long-term dependencies and has much better modeling ability for sequence data than traditional convolutional neural networks (which can be referred to as RNN).

[0090] Finally, the attention layer is applied to the extracted multiple time step feature vectors to highlight the time points that play a key role in transaction decision-making by calculating the attention degree of different time steps, generating time series feature vectors. This structure allows the model to focus on the most information-intensive or most important part, improving the accuracy of transaction signal prediction.

[0091] Through the above steps, the technical solution effectively improves the deep understanding and prediction ability of historical transaction data, and achieves the technical effects of accurately identifying transaction opportunities, risk levels and currency pair recommendations in the trading scenario.

[0092] Optionally, in this embodiment 1, Figure 3 is an optional flowchart for generating a user trading strategy according to the embodiment 1 of the present application. As shown in Figure 3As shown, first, the user logs into the system and uploads or authorizes access to their transaction history data, ensuring that necessary personal information and transaction records can be obtained, laying the foundation for subsequent analysis and strategy generation. Then, multi-source information including user transaction data and real-time financial data is collected and standardized and feature extraction operations are performed. The key to this step is to transform the original data into a form suitable for model analysis, providing high-quality input for subsequent deep learning processing. Second, the collected data is used to build a personalized portrait of the user, deeply analyzing the user's trading habits, preferred currency pairs, transaction frequency, and risk tolerance. On this basis, advanced clustering algorithms are used to subdivide user groups, identify user groups with similar trading behavior and risk preferences, and achieve more detailed user classification, preparing detailed user portrait data for the next step of personalized trading strategy. Then, deep learning models are used to generate personalized trading strategies based on user portraits. These strategies cover currency pair selection, transaction timing determination, and position allocation strategies, fully considering the user's personalized needs and market dynamics, improving the intelligence level of the trading strategy. Through the system interface, the user can choose to simulate or directly execute according to their own judgment, realizing seamless connection between theoretical strategy and actual operation. Finally, according to the actual feedback of the user on the strategy and market changes, the trading strategy is dynamically optimized and risk control measures are timely adjusted to ensure the effectiveness and safety of the strategy. After the transaction is completed, a detailed transaction report is generated, which not only includes the transaction profit analysis, but also provides improved strategies based on this transaction, helping users summarize experience and optimize future decisions.

[0093] It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in an order different from that shown.

[0094] In summary, the method for generating a transaction strategy provided in the embodiments of the present application collects financial information from multiple information channels to construct a financial document set according to the target transaction information of the target user, under the condition that the target user has authorized the transaction request triggered by the target user, the target transaction information at least including transaction behavior information, and the financial information at least including questionnaire survey information and financial market information. The user portrait of the target user is constructed according to the target transaction information and the financial document set, and the target user is classified according to the user portrait to obtain a target classification result. The transaction strategy information for the target transaction is output by inputting the user portrait and the target classification result into the target strategy model, and the transaction strategy information is sent to the target user. The transaction strategy information includes transaction risk information of the target transaction and product recommendation information of the target transaction, which solves the problem in the related art that the transaction is completed only according to common transaction algorithms or preset conditions of the user when the user performs the transaction, and the accurate transaction strategy cannot be provided to the user according to the actual situation of the user.

[0095] By integrating the behavior data in the transaction request of the target user and the widely collected financial information, a detailed financial document set is constructed, which can accurately depict the transaction tendency of the user. Meanwhile, by analyzing the target transaction information and the financial document set, the user portrait is constructed and classified, so that the system can generate a personalized classification result based on the characteristics of the user, which realizes accurate portrait and classification and further achieves the technical effect of optimizing the matching degree of service. According to the user portrait and the classification result, the transaction strategy information output by the target strategy model includes risk assessment and product recommendation, which not only enhances the scientificity of decision-making, but also improves the safety and potential benefits of the user in the transaction, ensures the practicability and effectiveness of the strategy, and finally realizes the technical target of improving the intelligent level of the transaction and the user experience.

[0096] Embodiment 2

[0097] The embodiments of the present application also provide a device for generating a transaction strategy. It should be noted that the device for generating a transaction strategy provided in the embodiments of the present application can be used to execute the method for generating a transaction strategy provided in the embodiments of the present application. The device for generating a transaction strategy provided in the embodiments of the present application is introduced as follows.

[0098] According to the embodiments of the present application, a device for implementing the above-mentioned method for generating a transaction strategy is also provided, Figure 4 is a schematic diagram of the device for generating a transaction strategy provided in Embodiment 2 of the present application. As shown in the figure, Figure 4 the device includes:

[0099] Specifically, the collection unit 401 is configured to, when detecting a transaction request of a target transaction triggered by a target user, collect financial information from a plurality of information channels according to target transaction information of the target user to construct a financial document set under the condition that authorization of the target user is obtained, wherein the target transaction information at least includes transaction behavior information.

[0100] The classification unit 402 is configured to construct a user portrait of the target user according to the target transaction information and the financial document set, and classify the target user according to the user portrait to obtain a target classification result.

[0101] The sending unit 403 is configured to input the user portrait and the target classification result into a target strategy model, output transaction strategy information for the target transaction, and send the transaction strategy information to the target user, wherein the transaction strategy information includes transaction risk information of the target transaction and product recommendation information of the target transaction.

[0102] The transaction strategy generation device provided by the embodiment of the application collects financial information from a plurality of information channels according to target transaction information of a target user to construct a financial document set under the condition that authorization of the target user is obtained when detecting a transaction request of a target transaction triggered by the target user, wherein the target transaction information at least includes transaction behavior information; a user portrait of the target user is constructed according to the target transaction information and the financial document set, and the target user is classified according to the user portrait to obtain a target classification result; and the user portrait and the target classification result are input into a target strategy model, transaction strategy information for the target transaction is output, and the transaction strategy information is sent to the target user, wherein the transaction strategy information includes transaction risk information of the target transaction and product recommendation information of the target transaction, thereby solving the problem that in the related art, only a common transaction algorithm or a preset condition of a user is used to complete a transaction when the user performs the transaction, and accurate transaction strategy cannot be provided to the user according to actual conditions of the user.

[0103] By integrating behavior data in a transaction request of a target user and widely collected financial information, a detailed financial document set is constructed, which can accurately depict a transaction tendency of the user, and by analyzing target transaction information and the financial document set, a user portrait is constructed and classified, so that the system can generate a personalized classification result based on characteristics of the user, accurate portrait and classification are achieved, and a technical effect of optimizing service matching degree is further achieved. According to the user portrait and the classification result, transaction strategy information output by the target strategy model includes risk assessment and product recommendation, which not only enhances the scientificity of decision-making, but also improves the safety and potential benefits of the user in the transaction, ensures the practicability and effectiveness of the strategy, and finally achieves the technical target of improving the intelligent level of the transaction and the user experience.

[0104] Optionally, in the transaction strategy generation apparatus provided in Embodiment Two of the present application, the classification unit 402 comprises: a first processing subunit, configured to perform data cleaning processing, data standardization processing and feature engineering processing on the target transaction information and the set of financial documents respectively to obtain processed financial information; a determination subunit, configured to calculate the risk tolerance level of the target user according to the processed financial information, and determine the user portrait according to the risk tolerance level; and a classification subunit, configured to classify the target user based on the historical transaction information and the processed financial information to obtain a user classification result.

[0105] Optionally, in the transaction strategy generation apparatus provided in Embodiment Two of the present application, the classification subunit comprises: a first determination module, configured to determine a first feature vector of a historical user according to the historical transaction information, wherein the first feature vector at least comprises: transaction frequency, user holding information, and tendency information of user transaction behavior; a second determination module, configured to determine a second feature vector of the historical user according to questionnaire survey information of the historical user, wherein the second feature vector at least comprises: user fund amplification multiple, financial product loss control point, and financial product transaction restriction information; a third determination module, configured to determine a third feature vector of the historical user according to the set of financial documents; a fusion module, configured to map the first feature vector, the second feature vector and the third feature vector to a target embedding space through the trained target encoder, and fuse the vectors in the target embedding space through the trained fusion encoder to obtain a shared embedding vector of the historical user; and an output module, configured to input the shared embedding vector of the historical user and the embedding vector of the user portrait into the trained clustering network layer to output the user classification result.

[0106] Optionally, in the transaction strategy generation apparatus provided in Embodiment Two of the present application, the classification subunit further comprises: a clustering module, configured to cluster the shared embedding vector of the historical user by using a k-means clustering algorithm before the first feature vector, the second feature vector and the third feature vector are mapped to the target embedding space through the trained target encoder, to obtain an initial clustering center; a first calculation module, configured to calculate the initial clustering center and the shared embedding vector of the historical user by using a relative entropy loss function to obtain a clustering loss value; and a training module, configured to train the model parameters of the target encoder, the model parameters of the fusion encoder and the model parameters of the clustering network layer according to the clustering loss value to obtain the trained target encoder, the trained fusion encoder and the trained clustering network layer.

[0107] Optionally, in the transaction strategy generation apparatus provided in Embodiment Two of the present application, the determining subunit comprises: a fourth determining module, configured to determine, according to the transaction behavior information, a transaction frequency, a leverage ratio, a maximum drawdown rate, a user transaction duration and a Sharpe ratio of the target user; the maximum drawdown rate is a maximum loss percentage of the financial product involved in the target transaction within a preset time period; the Sharpe ratio is determined according to the return rate of the financial product involved in the target transaction; a fifth determining module, configured to determine, according to the processed financial information, a weight of the maximum drawdown rate, a weight of the Sharpe ratio, a weight of the transaction frequency and a weight of the leverage ratio; and a second calculating module, configured to calculate the risk tolerance level according to the maximum drawdown rate, the weight of the maximum drawdown rate, the Sharpe ratio, the weight of the Sharpe ratio, the transaction frequency, the weight of the transaction frequency, the leverage ratio and the weight of the leverage ratio.

[0108] Optionally, in the transaction strategy generation apparatus provided in Embodiment Two of the present application, the fifth determining module comprises: a first adjusting sub-module, configured to receive a first score of the target user, and adjust the weight of the maximum drawdown rate and the weight of the leverage ratio according to the first score, wherein the first score is used to describe the maximum degree of asset loss that the user can bear; a second adjusting sub-module, configured to adjust the weight of the Sharpe ratio according to the processed financial information; a third adjusting sub-module, configured to adjust the weight of the transaction frequency according to the leverage ratio; and a determining sub-module, configured to, in a case where the user transaction duration is greater than a preset duration, determine the weight of the maximum drawdown rate according to an average weight of the maximum drawdown rate in the historical transaction information, and determine the weight of the Sharpe ratio according to an average weight of the Sharpe ratio in the historical transaction information.

[0109] Optionally, in the transaction strategy generation apparatus provided in Embodiment Two of the present application, the target strategy model is a model obtained by training a preset model according to historical transaction information of the financial institution; the preset model at least comprises a feature extraction network and a multi-task output layer; the apparatus further comprises: an arrangement unit, configured to perform standardization processing on numerical data in the financial document set and the historical transaction information, and arrange the numerical data according to time sequence information to obtain a time sequence vector; a processing unit, configured to perform embedding processing on classification features in the financial document set and the historical transaction information to obtain embedded vectors; an extracting unit, configured to extract a time sequence feature vector from the time sequence vector and the embedded vectors by using the feature extraction network, and input the time sequence feature vector into the multi-task output layer to obtain historical transaction evaluation information corresponding to the historical transaction information; a calculating unit, configured to calculate the historical transaction evaluation information and a real transaction label corresponding to the historical transaction information based on a cross-entropy loss function to obtain a target loss value; and a training unit, configured to train the preset model according to the target loss value based on an early stopping training manner, and verify the preset model by using time sequence cross-validation, and determine the target strategy model according to a verification result.

[0110] Optionally, in the transaction strategy generation apparatus provided in Embodiment Two of the present application, the feature extraction network comprises at least: an input embedding layer, a long short-term memory network layer, and an attention layer; and the extraction unit comprises: a second processing subunit, configured to process the time series vector through the input embedding layer to obtain a time series embedding vector; a splicing subunit, configured to convert the embedding vector into a dense vector through the input embedding layer, splice the time series embedding vector and the dense vector, and obtain a spliced vector; an output subunit, configured to input the spliced vector into the long short-term memory network layer to output a plurality of time step feature vectors; and a third processing subunit, configured to process the plurality of time step feature vectors through the attention layer to obtain a time series feature vector.

[0111] It should be noted that the collection unit 401, the classification unit 402, and the sending unit 403 correspond to steps S201 to S203 in Embodiment One, and the two modules have the same instances and application scenarios as the corresponding steps, but are not limited to the content disclosed in Embodiment One. It should be noted that the above modules or units can be hardware components or software components stored in the memory (for example, the memory 104) and processed by one or more processors (for example, the processors 102a, 102b, …, 102n), and the above modules can also be run in the computer terminal 10 provided in Embodiment One as part of the device.

[0112] Embodiment Three

[0113] Embodiments of the present application can provide an electronic device, Figure 5 is a schematic diagram of the transaction strategy generation electronic device provided in Embodiment Three of the present application. As shown in the figure, Figure 5 the electronic device can include one or more (only one is shown in the figure) processors 502, a memory 504, a storage controller, and a peripheral interface, wherein the peripheral interface is connected with a radio frequency module, an audio module, and a display. Figure 5

[0114] The memory can be used to store software programs and modules, such as program instructions / modules corresponding to the methods and devices in the embodiments of the present application. The processor executes various functions and data processing by running the software programs and modules stored in the memory, that is, implements the above-mentioned methods. The memory can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory can further include a memory remotely arranged with respect to the processor, and the remote memory can be connected to the terminal through 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 a combination thereof. ​

[0115] The processor can call information and application programs stored in the memory through the transmission device to perform the following steps: when detecting a transaction request of a target transaction triggered by a target user, obtaining authorization of the target user, collecting financial information from multiple information channels according to target transaction information of the target user, and constructing a financial document set; the target transaction information at least includes: transaction behavior information; constructing a user portrait of the target user according to the target transaction information and the financial document set, and classifying the target user according to the user portrait to obtain a target classification result; inputting the user portrait and the target classification result into a target strategy model to output transaction strategy information for the target transaction, and sending the transaction strategy information to the target user; wherein the transaction strategy information includes: transaction risk information of the target transaction, product recommendation information of the target transaction.

[0116] The processor can call information and application programs stored in the memory through the transmission device to perform the following steps: constructing a user portrait of the target user according to the target transaction information and the financial document set, and classifying the target user according to the user portrait to obtain a target classification result, including: respectively performing data cleaning processing, data standardization processing and feature engineering processing on the target transaction information and the financial document set to obtain processed financial information; calculating the risk bearing level of the target user according to the processed financial information, and determining the user portrait according to the risk bearing level; classifying the target user based on historical transaction information and processed financial information to obtain a user classification result.

[0117] The processor can call information and application programs stored in the memory through the transmission device to perform the following steps: classifying the target user based on historical transaction information and processed financial information to obtain a user classification result, including: determining a first feature vector of a historical user according to historical transaction information, wherein the first feature vector at least includes: transaction frequency, user holding information, and user transaction behavior tendency information; determining a second feature vector of the historical user according to questionnaire survey information of the historical user, wherein the second feature vector at least includes: user fund amplification multiple, financial product loss control point, and financial product transaction restriction information; determining a third feature vector of the historical user according to the financial document set; mapping the first feature vector, the second feature vector and the third feature vector to a target embedding space through a trained target encoder, and fusing the vectors in the target embedding space through a trained fusion encoder to obtain a shared embedding vector of the historical user; inputting the shared embedding vector of the historical user and the embedding vector of the user portrait into a trained clustering network layer to output the user classification result.

[0118] The processor can call information and application programs stored in the memory through the transmission device to perform the following steps: before mapping the first feature vector, the second feature vector and the third feature vector to the target embedding space by the trained target encoder, the above-mentioned method further comprises: clustering the shared embedding vectors of the historical users by using a k-means clustering algorithm to obtain initial cluster centers; calculating the initial cluster centers and the shared embedding vectors of the historical users by using a relative entropy loss function to obtain a clustering loss value; training the model parameters of the target encoder, the model parameters of the fusion encoder and the model parameters of the clustering network layer according to the clustering loss value to obtain the trained target encoder, the trained fusion encoder and the trained clustering network layer.

[0119] The processor can call information and application programs stored in the memory through the transmission device to perform the following steps: calculating the risk tolerance level of the target user according to the processed financial information, comprising: determining the transaction frequency, leverage ratio, maximum drawdown ratio, user transaction duration and Sharpe ratio of the target user according to the transaction behavior information; wherein the maximum drawdown ratio is the maximum loss percentage of the target transaction involving financial products within a preset time period; the Sharpe ratio is determined according to the return rate of the target transaction involving financial products; determining the weight of the maximum drawdown ratio, the weight of the Sharpe ratio, the weight of the transaction frequency and the weight of the leverage ratio according to the processed financial information; calculating the risk tolerance level according to the maximum drawdown ratio, the weight of the maximum drawdown ratio, the Sharpe ratio, the weight of the Sharpe ratio, the transaction frequency, the weight of the transaction frequency, the leverage ratio and the weight of the leverage ratio.

[0120] The processor can call information and application programs stored in the memory through the transmission device to perform the following steps: determining the weight of the maximum drawdown ratio, the weight of the Sharpe ratio, the weight of the transaction frequency and the weight of the leverage ratio according to the processed financial information, comprising: receiving the first score of the target user, and adjusting the weight of the maximum drawdown ratio and the weight of the leverage ratio according to the first score, wherein the first score is used to describe the maximum degree of asset loss that the user can bear; adjusting the weight of the Sharpe ratio according to the processed financial information; adjusting the weight of the transaction frequency according to the leverage ratio; in the case that the user transaction duration is less than or equal to the preset duration, determining the weight of the maximum drawdown ratio according to the average weight of the maximum drawdown ratio in the historical transaction information, and determining the weight of the Sharpe ratio according to the average weight of the Sharpe ratio in the historical transaction information.

[0121] The processor can call information and application programs stored in the memory through the transmission device to perform the following steps: the target strategy model is a model obtained by training a preset model according to historical transaction information of the financial institution; the preset model at least includes: a feature extraction network, a multi-task output layer; the training process of the target strategy model includes the following steps: respectively standardizing the numerical data in the financial document set and the historical transaction information, and arranging according to the time sequence information to obtain a time sequence vector; respectively embedding the classification features in the financial document set and the historical transaction information to obtain an embedded vector; extracting a time sequence feature vector in the time sequence vector and the embedded vector through the feature extraction network, and inputting the time sequence feature vector into the multi-task output layer to obtain historical transaction evaluation information corresponding to the historical transaction information; calculating the historical transaction evaluation information and the real transaction label corresponding to the historical transaction information based on the cross-entropy loss function to obtain a target loss value; training the preset model according to the target loss value based on the early stopping training method, and verifying by time sequence cross-validation, and determining the target strategy model according to the verification result.

[0122] The processor can call information and application programs stored in the memory through the transmission device to perform the following steps: the feature extraction network at least includes: an input embedding layer, a long short-term memory network layer, and an attention layer; the time sequence feature vector in the time sequence vector and the embedded vector is extracted through the feature extraction network, including: processing the time sequence vector through the input embedding layer to obtain a time sequence embedding vector; converting the embedded vector into a dense vector through the input embedding layer, splicing the time sequence embedding vector and the dense vector to obtain a spliced vector; inputting the spliced vector into the long short-term memory network layer to output a plurality of time step feature vectors; processing the plurality of time step feature vectors through the attention layer to obtain the time sequence feature vector.

[0123] By detecting the transaction request of the target transaction triggered by the target user, collecting financial information from multiple information channels to construct a financial document set under the condition of obtaining authorization of the target user according to the target transaction information of the target user, and constructing a user portrait of the target user according to the target transaction information and the financial document set, and classifying the target user according to the user portrait to obtain a target classification result, and inputting the user portrait and the target classification result into the target strategy model to output transaction strategy information for the target transaction, and sending the transaction strategy information to the target user, the transaction strategy information includes transaction risk information of the target transaction and product recommendation information of the target transaction, thereby solving the technical problem that only the common transaction algorithm or the preset condition of the user is used to complete the transaction when the user performs the transaction, and accurate transaction strategy cannot be provided to the user according to the actual situation of the user.

[0124] By integrating the behavior data in the target user transaction request and the widely collected financial information, a detailed financial document set is constructed, which can accurately depict the transaction tendency of the user. Meanwhile, by analyzing the target transaction information and the financial document set, a user portrait is constructed and classified, so that the system can generate a personalized classification result based on the user characteristics, realize accurate portrait and classification, and further achieve the technical effect of optimizing the service matching degree. According to the user portrait and the classification result, the transaction strategy information output by the target strategy model includes risk assessment and product recommendation, which not only enhances the scientificity of decision-making, but also improves the safety and potential income of the user in the transaction, ensures the practicality and effectiveness of the strategy, and finally realizes the technical target of improving the intelligent level of the transaction and the user experience.

[0125] Those skilled in the art can understand that Figure 5 The structure shown is only schematic, and the electronic device can also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, and a mobile Internet device (MID), a PAD, etc. Figure 5 It does not limit the structure of the above-mentioned electronic device. For example, the electronic device can include more or fewer components (such as a network interface, a display device, etc.) than Figure 5 shown, or have a different configuration than Figure 5 shown.

[0126] Those skilled in the art can understand that all or part of the steps in the above-mentioned embodiments can be completed by programs instructing the related hardware of the terminal device, and the programs can be stored in a computer readable storage medium, which can include a flash disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0127] Embodiment 4

[0128] The embodiments of the present application also provide a storage medium. Optionally, in the present embodiment, the above-mentioned storage medium can be used to save the program code executed by the transaction strategy generation method provided in Embodiment 1.

[0129] Optionally, in the present embodiment, the above-mentioned storage medium can be located in any one of the computer terminals in the computer terminal group in the computer network, or in any one of the mobile terminals in the mobile terminal group.

[0130] The present application also provides a computer program product adapted to execute the steps of the transaction strategy generation method when executed on a data processing device.

[0131] The above-mentioned sequence numbers of the embodiments of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.

[0132] In the above-mentioned embodiments of the present application, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the relevant description of other embodiments.

[0133] In the several embodiments provided by the present application, it should be understood that the disclosed technology can be implemented in other ways. Of course, the embodiment described above is only a schematic, for example, the division of units is only a logical function division, and there can be another division manner in actual implementation, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, unit or module, and can be electrical or other forms.

[0134] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

[0135] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The above integrated unit can be realized in the form of hardware or in the form of software functional unit.

[0136] The integrated unit, if realized in the form of software functional unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part of the prior art that makes a contribution or the whole or part of the technical solutions can be embodied in the form of software product, which is stored in a storage medium and includes a plurality of instructions for making a computer device (which can be a personal computer, a server or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and various program code storage media.

[0137] The above merely describes the preferred embodiments of the present application, and it should be pointed out that, for those skilled in the art, some improvements and refinements can be made without departing from the principles of the present application, and these improvements and refinements should also be considered as the protection scope of the present application.

Claims

1. A method for generating a trading strategy, characterized in that, include: Upon detecting a transaction request triggered by a target user, and with the authorization of the target user, financial information is collected from multiple information channels based on the target user's target transaction information to construct a set of financial documents. The target transaction information includes at least: transaction behavior information; A user profile of the target user is constructed based on the target transaction information and the financial document set, and the target user is classified based on the user profile to obtain the target classification result; Based on the user profile and the target classification result, the target strategy model is input, outputs transaction strategy information for the target transaction, and sends the transaction strategy information to the target user; wherein, the transaction strategy information includes: transaction risk information of the target transaction and product recommendation information of the target transaction.

2. The method according to claim 1, characterized in that, Based on the target transaction information and the financial document set, a user profile of the target user is constructed, and the target user is classified according to the user profile to obtain the target classification result, including: The target transaction information and the financial document set are respectively subjected to data cleaning, data standardization and feature engineering to obtain the processed financial information. The risk tolerance level of the target user is calculated based on the processed financial information, and the user profile is determined based on the risk tolerance level. Based on historical transaction information and the processed financial information, the target users are classified to obtain user classification results.

3. The method according to claim 2, characterized in that, Based on historical transaction information and the processed financial information, the target users are classified, and the user classification results include: A first feature vector of a historical user is determined based on the historical transaction information, wherein the first feature vector includes at least: transaction frequency, user position information, and user transaction behavior tendency information; The second feature vector of the historical user is determined based on the questionnaire survey information of the historical user, wherein the second feature vector includes at least: the user's fund leverage ratio, the financial product loss control point, and the financial product transaction restriction information; The third feature vector of the historical user is determined based on the set of financial documents. The first feature vector, the second feature vector, and the third feature vector are mapped to the target embedding space by the trained target encoder, and the vectors in the target embedding space are fused by the trained fusion encoder to obtain the shared embedding vector of the historical user. The shared embedding vectors of the historical users and the embedding vectors of the user profiles are input into the trained clustering network layer to output the user classification results.

4. The method according to claim 3, characterized in that, Before mapping the first feature vector, the second feature vector, and the third feature vector to the target embedding space using the trained target encoder, the method further includes: The k-means clustering algorithm is used to cluster the shared embedding vectors of the historical users to obtain initial cluster centers; The clustering loss value is obtained by calculating the shared embedding vectors of the initial cluster centers and the historical users using the relative entropy loss function; The model parameters of the target encoder, the model parameters of the fusion encoder, and the model parameters of the clustering network layer are trained based on the clustering loss value to obtain the trained target encoder, the trained fusion encoder, and the trained clustering network layer.

5. The method according to claim 2, characterized in that, Calculating the target user's risk tolerance level based on the processed financial information includes: Based on the transaction behavior information, the target user's trading frequency, leverage ratio, maximum drawdown rate, trading duration, and Sharpe ratio are determined; wherein, the maximum drawdown rate is the maximum percentage loss of the financial products involved in the target transaction within a preset time period; and the Sharpe ratio is determined based on the rate of return of the financial products involved in the target transaction. The weights of the maximum drawdown rate, the Sharpe ratio, the trading frequency, and the leverage ratio are determined based on the processed financial information. The risk tolerance level is calculated based on the maximum drawdown rate, the weight of the maximum drawdown rate, the Sharpe ratio, the weight of the Sharpe ratio, the trading frequency, the weight of the trading frequency, the leverage ratio, and the weight of the leverage ratio.

6. The method according to claim 5, characterized in that, Based on the processed financial information, the weights for the maximum drawdown rate, the Sharpe ratio, the trading frequency, and the leverage ratio are determined, including: The system receives a first rating from the target user and adjusts the weights of the maximum drawdown rate and the leverage ratio based on the first rating, wherein the first rating describes the maximum level of asset loss that the user can tolerate. The weights of the Sharpe ratio are adjusted based on the processed financial information. The weighting of the trading frequency is adjusted based on the leverage ratio; If the user's transaction duration is less than or equal to a preset duration, the weight of the maximum drawdown rate is determined based on the average weight of the maximum drawdown rate in the historical transaction information, and the weight of the Sharpe ratio is determined based on the average weight of the Sharpe ratio in the historical transaction information.

7. The method according to claim 1, characterized in that, The target strategy model is a model trained on a preset model based on historical transaction information from financial institutions; the preset model includes at least: a feature extraction network and a multi-task output layer; the training process of the target strategy model includes the following steps: The numerical data in the financial document set and the historical transaction information are standardized and arranged according to time sequence information to obtain a time series vector. The classification features in the financial document set and the historical transaction information are respectively embedded to obtain embedded vectors; The feature extraction network extracts the temporal feature vector from the time series vector and the embedded vector, and inputs the temporal feature vector into the multi-task output layer to obtain the historical transaction evaluation information corresponding to the historical transaction information. The target loss value is obtained by calculating the historical transaction evaluation information and the real transaction labels corresponding to the historical transaction information based on the cross-entropy loss function. The training method based on early stopping is used to train the preset model according to the target loss value, and time series cross-validation is used for validation. The target policy model is determined based on the validation results.

8. The method according to claim 7, characterized in that, The feature extraction network includes at least an input embedding layer, a long short-term memory network layer, and an attention layer. The feature extraction network extracts temporal feature vectors from the time series vector and the embedded vector, including: The time series vector is processed by the input embedding layer to obtain a time series embedding vector; The embedded vector is converted into a dense vector through the input embedding layer, and the temporal embedded vector and the dense vector are concatenated to obtain the concatenated vector. The concatenated vector is input into the long short-term memory network layer, and feature vectors with multiple time steps are output. The attention layer processes the feature vectors of the multiple time steps to obtain the temporal feature vector.

9. A device for generating a trading strategy, characterized in that, include: The data collection unit is used to collect financial information from multiple information channels and construct a financial document set based on the target user's target transaction information when a transaction request for a target transaction triggered by a target user is detected, provided that the target user has authorized the collection. The target transaction information includes at least: transaction behavior information; The classification unit is used to construct a user profile of the target user based on the target transaction information and the financial document set, and to classify the target user based on the user profile to obtain the target classification result; The sending unit is configured to input the user profile and the target classification result into the target strategy model, output transaction strategy information for the target transaction, and send the transaction strategy information to the target user; wherein, the transaction strategy information includes: transaction risk information of the target transaction and product recommendation information of the target transaction.

10. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the steps of the method for generating the trading strategy according to any one of claims 1 to 8.