CN113590659A - Data classification processing-based stock selection control method, device and system - Google Patents

Data classification processing-based stock selection control method, device and system Download PDF

Info

Publication number
CN113590659A
CN113590659A CN202110832388.1A CN202110832388A CN113590659A CN 113590659 A CN113590659 A CN 113590659A CN 202110832388 A CN202110832388 A CN 202110832388A CN 113590659 A CN113590659 A CN 113590659A
Authority
CN
China
Prior art keywords
stock
data
result set
calculation
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110832388.1A
Other languages
Chinese (zh)
Other versions
CN113590659B (en
Inventor
王元浩
周荣圣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Huizheng Financial Consulting Co ltd
Original Assignee
Shanghai Huizheng Financial Consulting Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Huizheng Financial Consulting Co ltd filed Critical Shanghai Huizheng Financial Consulting Co ltd
Priority to CN202110832388.1A priority Critical patent/CN113590659B/en
Publication of CN113590659A publication Critical patent/CN113590659A/en
Application granted granted Critical
Publication of CN113590659B publication Critical patent/CN113590659B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/285Clustering or classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application discloses a stock selection control method, device and system based on data classification processing, wherein the method comprises the following steps: acquiring a stock selection request; extracting a plurality of strategy factors from the stock selection request, and splitting the stock selection request into a static data stock selection request and a calculation data stock selection request based on the strategy requirements of each strategy factor; acquiring a static data stock result set based on the static data stock selecting request, and acquiring a calculation data stock result set based on the calculation data stock selecting request; and merging the static data stock result set and the calculation data stock result set to form an output stock result set, and returning the output stock result set to the request terminal for sending the stock selection request. In the application, the stock selection data is divided into the static data stock result set and the calculation data stock result set for classified storage and scheduling, and the calculation data stock result set is divided into the primary storage and the secondary storage, so that the processing speed and the processing precision of the stock selection request are effectively improved, and more objective and high-accuracy stocks can be recommended for users.

Description

Data classification processing-based stock selection control method, device and system
Technical Field
The application relates to the field of finance, in particular to the technical field of stock data analysis, and specifically relates to a stock selection control method, device and system based on data classification processing.
Background
With the rapid development of market economy in China, more and more investors aim at stocks, and the stock investment becomes an important way in personal financing. Stocks can be circulated and transferred in the market, and the stocks have the characteristics of high risk and high return, so that tens of millions of investors are involved from the generation day, and the investors pay attention to the fluctuation and development trend of the stock price all the time, which is always a hot problem in the research of the economic field.
The large income and small risk are the targets pursued by security investors. Two types of investment analysis methods, basic analysis methods and technical analysis methods, are commonly used to achieve this goal. The basic analysis method analyzes the basic factors influencing the supply and demand relationship of the stock market, determines the real value of the stock, judges the trend of the stock market and provides the basis for investors to select the stock. The technical analysis is a method for analyzing completely according to the stock market quotation change, and it can judge the future change trend of the whole stock market or individual stock price by analyzing the historical data, and discuss the possible turn of investment behavior in the stock market, and provide the investor with the signal for buying and selling stocks.
In the actual stock investment process, a user usually decides which stock ticket to buy according to subjective judgment or recent stock consultation, or the user is subjectively recommended to buy which stock ticket to buy by an investment manager according to some related information of the benchmark stock, however, the uncertainty of the stock selection based on human experience is large. Therefore, how to recommend stocks to users more quickly and accurately becomes a technical problem which needs to be solved urgently.
Disclosure of Invention
In view of the above-mentioned shortcomings of the prior art, the present application aims to provide a stock selection control method, device and system based on data classification processing, which is used for recommending stocks for users more quickly and accurately.
In order to achieve the above and other related objects, the present application provides a stock selection control method based on data classification processing, including: acquiring a stock selection request; extracting a plurality of strategy factors from the stock selection request, and dividing the stock selection request into a static data stock selection request and a calculation data stock selection request based on the strategy requirements of each strategy factor; acquiring a static data stock result set from a static data storage area based on the static data stock selecting request, and acquiring a calculation data stock result set from a calculation data storage area based on the calculation data stock selecting request; and merging the static data stock result set and the calculation data stock result set to form an output stock result set, and returning the output stock result set to the request terminal for sending the stock selection request.
In an embodiment of the present invention, the calculation data storage area includes a first-level data cache area for caching the current-day calculation data stock result set and a second-level data cache area for caching the multiple-day calculation data stock result set.
In an embodiment of the present invention, the stock selection request is a user stock selection request; and acquiring the calculation data stock result set from the first-level data cache area after acquiring the calculation data stock result set from the calculation data storage area based on the calculation data stock selecting request.
In an embodiment of the present invention, when the computed data stock result set does not exist in the primary data cache region, the computed data stock result set is obtained from the secondary data cache region.
In an embodiment of the present invention, when the computed data stock result set does not exist in the secondary data cache, the computed data stock result set is obtained from a data computing server that generates the computed data stock result set.
In an embodiment of the present invention, the stock selecting request is a return test stock selecting request; and when the stock selection request is a return test stock selection request, splitting the return test stock selection request into a plurality of single-day stock selection requests according to days.
In an embodiment of the present invention, when the stock selecting request is a backlog stock selecting request, a calculation data stock result set is obtained from a calculation data storage area based on the calculation data stock selecting request, and a calculation data stock result set is obtained from a two-level data cache area for caching the calculation data stock result set on the current day.
In an embodiment of the present invention, when the computed data stock result set does not exist in the secondary data cache, the computed data stock result set is obtained from a data computing server that generates the computed data stock result set.
In an embodiment of the present invention, the static data storage area is distributed in a plurality of static data servers that are longitudinally extended; the computing data storage area is distributed to a plurality of data processing servers which are expanded horizontally and a plurality of data computing servers which are expanded horizontally.
To achieve the above and other related objects, the present application further provides a stock selection control apparatus based on data classification processing, including: the request acquisition module is used for acquiring a stock selection request; the request splitting processing module is used for extracting a plurality of strategy factors from the stock selecting request and splitting the stock selecting request into a static data stock selecting request and a calculation data stock selecting request based on the strategy requirements of each strategy factor; the static data acquisition module is used for acquiring a static data stock result set from a static data storage area based on the static data stock selection request; the calculation data acquisition module is used for acquiring a calculation data stock result set from a calculation data storage area based on the calculation data stock selection request; and the data set processing and outputting module is used for merging the static data stock result set and the calculation data stock result set to form an output stock result set and returning the output stock result set to the request terminal for sending the stock selecting request.
In an embodiment of the present invention, the calculation data storage area includes a first-level data cache area for caching the current-day calculation data stock result set and a second-level data cache area for caching the multiple-day calculation data stock result set.
In an embodiment of the present invention, the stock selection request is a user stock selection request; acquiring a calculation data stock result set from the first-level data cache area after acquiring the calculation data stock result set from a calculation data storage area based on the calculation data stock selecting request; or the stock selecting request is a backtesting stock selecting request, the backtesting stock selecting request is divided into a plurality of single-day stock selecting requests according to day when the stock selecting request is the backtesting stock selecting request, a calculation data stock result set is obtained from a calculation data storage area based on the calculation data stock selecting request when the stock selecting request is the backtesting stock selecting request, and a calculation data stock result set is obtained from a secondary data cache area for caching the calculation data stock result set on the same day.
In an embodiment of the present invention, when the computed data stock result set does not exist in the first-level data cache region, the computed data stock result set is obtained from the second-level data cache region; and when the calculation data stock result set does not exist in the secondary data cache region, acquiring the calculation data stock result set from a data calculation server generating the calculation data stock result set.
In order to achieve the above and other related objects, the present application further provides a stock selection control system based on data classification processing, including at least one data processing server, at least one static data server and at least one data calculation server; a static data storage area for storing static data stock result sets is distributed on the at least one static data server, and a calculation data storage area for storing calculation data stock result sets is distributed on the at least one data processing server and the at least one data calculation server; the data calculation server generates the calculation data stock result set; the data processing server runs the stock selection control method based on the data classification processing.
As described above, the stock selection control method, apparatus and system based on data classification processing according to the present application have the following beneficial effects:
in the application, the stock selection data is divided into the static data stock result set and the calculation data stock result set for classified storage and scheduling, and the calculation data stock result set is divided into the primary storage and the secondary storage, so that the processing speed and the processing precision of the stock selection request are effectively improved, and more objective and high-accuracy stocks can be recommended for users.
Drawings
Fig. 1 is a schematic overall flow chart of a stock selection control method based on data classification processing in the embodiment of the present application.
Fig. 2 is a schematic diagram illustrating data acquisition based on a user stock selection request in the stock selection control method based on data classification processing according to the embodiment of the present application.
Fig. 3 is a schematic diagram illustrating data acquisition based on a backlog stock selection request in the stock selection control method based on data classification processing according to the embodiment of the present application.
Fig. 4 is a schematic flow chart illustrating a process of outputting a stock result set based on a user stock selection request in the data classification processing-based stock selection control method in the embodiment of the present application.
Fig. 5 is a schematic flow chart illustrating a process of outputting a stock result set based on a backtest stock selection request in the data classification processing-based stock selection control method in the embodiment of the present application.
Fig. 6 is a schematic block diagram of a stock selection control device based on data classification processing in the embodiment of the present application.
Fig. 7 is a schematic diagram of a stock selection control system based on data classification processing in the embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application is provided by way of specific examples, and other advantages and effects of the present application will be readily apparent to those skilled in the art from the disclosure herein. The present application is capable of other and different embodiments and of being practiced or being carried out in various ways, and it is capable of other various modifications and changes without departing from the spirit of the present application. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present invention, and the drawings only show the components related to the present invention rather than the number, shape and size of the components in practical implementation, and the type, amount and ratio of the components in practical implementation may be changed arbitrarily, and the layout of the components may be complicated.
The embodiment aims to provide a stock selection control method, device and system based on data classification processing, and the method, device and system are used for recommending more objective and high-accuracy stocks for users.
The principles and implementations of the stock selection control method, apparatus and system based on data classification processing according to the present embodiment will be described in detail below, so that those skilled in the art can understand the stock selection control method, apparatus and system based on data classification processing according to the present embodiment without creative work.
Example 1
Fig. 1 is a schematic overall flow chart of the stock selection control method based on data classification processing in this embodiment. As shown in fig. 1, the present embodiment provides a stock selection control method based on data classification processing, which includes the following steps:
step S100, obtaining a stock selection request;
step S200, extracting a plurality of strategy factors from the stock selection request, and dividing the stock selection request into a static data stock selection request and a calculation data stock selection request based on the strategy requirements of each strategy factor;
step S300, acquiring a static data stock result set from a static data storage area based on the static data stock selecting request, and acquiring a calculation data stock result set from a calculation data storage area based on the calculation data stock selecting request;
and S400, merging the static data stock result set and the calculation data stock result set to form an output stock result set, and returning the output stock result set to the request terminal for sending the stock selection request.
The following describes steps S100 to S400 in the stock selection control method based on the data sorting process according to the present embodiment in detail.
And step S100, acquiring a stock selection request.
In this embodiment, the stock selection request may be a user stock selection request from a user terminal, or a return test stock selection request from a return test platform.
In this embodiment, before the user generates the user stock selection request through the user terminal, a user stock selection parameter configuration is further provided, wherein in the user stock selection parameter configuration, data on the current day is preferably selected, and a plurality of selectable stock selection configuration parameters are preset, so that the user is restricted from the user stock selection parameter configuration while being guided by the parameter configuration, and the user can acquire stock data meeting the selection rule as soon as possible.
In this embodiment, at least one retest model is provided in the retest platform, and the retest model performs historical retest on the stock data according to at least one configurable retest policy to obtain a retest result. When generating a stock selection request, the backtesting platform may optionally adjust various stock selection configuration parameters, and generate batch (e.g., hundreds) stock selection requests in one backtesting request.
In this embodiment, when the stock selection request is a user stock selection request from a user terminal, step S200 is directly continuously executed, and when the stock selection request is a backtesting stock selection request from a backtesting platform, the backtesting stock selection request is split into stock selection requests for multiple single days on a daily basis, and step S200 is continuously executed for the stock selection request for each single day.
Step S200, extracting a plurality of strategy factors from the stock selection request, and dividing the stock selection request into a static data stock selection request and a calculation data stock selection request based on the strategy requirements of each strategy factor.
The method for extracting various strategy factors from the stock selection request comprises the following steps:
and extracting a stock selection range, stock selection conditions and a stock selection type from the stock selection request to form a corresponding policy factor, and then determining whether the corresponding policy factor is static data or dynamic data required by the corresponding policy factor based on a field corresponding to the stock selection type.
Step S300, obtaining a static data stock result set from a static data storage area based on the static data stock selecting request, and obtaining a calculation data stock result set from a calculation data storage area based on the calculation data stock selecting request.
In this embodiment, the static data storage area is distributed over a plurality of static data servers (datasvr) extending vertically; the compute data store is distributed across a plurality of data processing servers (centersvr) that are spread horizontally and a plurality of data compute servers (calcsvr) that are spread horizontally.
In this embodiment, the data processing server (centersvr) sends the stock selection request to different servers (static data server and calcsvr) according to different policy factor requirements of one stock selection request,
the data processing server (centersvr) has no state, the data cache is a first-level cache, reading in advance is not needed, after a user accesses, all result sets of the current day can be reserved in the service memory, and the current-day selective data for the user are all current-day, so that the selective access performance of the user is improved.
Wherein, the data processing server (centersvr) can be expanded in parallel, thereby improving concurrency and increasing service availability.
In this embodiment, the static data server (datasvr) caches static data, facilitating fast querying. When the total amount of data is increased to the hard load of the memory of a stand-alone static data server (datasvr), longitudinal segmentation is adopted, and the data is segmented into different services according to different types of data, and then the static data server (datasvr) can be derived into financial services, financial and financial services and the like. When the user size is increased to be hard to bear by a static data server (datasvr) single machine, the horizontal extension is carried out, and the service concurrency and availability are improved.
In this embodiment, preferably, the static data server (datasvr) first adopts vertical expansion and then performs horizontal expansion. Because there is a need to select factors, such as requesting 5-20% of the market value of a stock, it becomes very difficult to compute the request if the market value factor is split across multiple different static data servers (datasvr), the basic policy of the design is to keep as few as possible a single static factor from being distributed among the different static data servers (datasvr).
In this embodiment, the data calculation server (calcsvr) calculates corresponding derived data according to different algorithm indexes by using basic data such as K lines, that is, generates a calculation data stock result set according to the stored calculation data,
the data computation server (calcsvr) has no state, but needs to cache the basic K-line data at startup for computing other derivative data. For example, data of a day K level or more of 2 years has a small data volume, a fast reading speed, which is read when a service is started, and data of a minute K is large and used relatively little, which is loaded when a user requests in order not to affect the service restart time, and then cached in the memory.
Wherein, the data computation server (calcsvr) can be expanded in parallel, thereby improving concurrency and increasing service availability.
In this embodiment, the stock selection data is divided into static data and calculation data.
The static data refers to numerical data which can be directly acquired generally and does not cause great change of results due to different external input parameters. Such as whether a certain stock is certified or deeply certified, whether it is a stock of st, capital structure and revenue, etc., these values are usually fixed for the stock, and in most cases, the results can be easily described by a simple int or float type, so that it is convenient to estimate the data occupation space of the stock.
In this embodiment, the static data includes, but is not limited to, stock base information, financial information, and financial information. Wherein the stock base information includes but is not limited to trading exchange (e.g., up, down, cross), stock said block (e.g., concept, region, industry), stock status (e.g., stop, stock, trade days, time to market), etc.; the financial information includes, but is not limited to, valuations, performance scores, capital structure, per-stock metrics, liquidity, and the like; the financial information includes but is not limited to business income, business expenditure, profit and profit, assets, liabilities, and the number of days for releasing the financial newspaper.
The calculation data refers to data obtained by obtaining different calculation data result sets according to different external input parameters by using a certain specific algorithm. The calculation data is characterized in that the amount of basic data forming the result is usually not too large, but the result set calculated according to different external input parameters is very large and is not suitable for uniform static storage. For example, calculating the data ma (30) means averaging the data of the previous 30 days, and the data ma (30) of the previous year is usually needed when the data is measured back, so that the average value of each day of the previous year needs to be calculated. If only one ma (30) is stored, the real result set is not large, but when in use, various parameters such as ma (1-200) and the like can be introduced, so that if the result sets corresponding to all the mas need to be stored, the data size becomes very large and uncontrollable.
In this embodiment, the calculation data includes, but is not limited to, market conditions, technical indicators, K-line patterns, and the like. Wherein, the market base includes but is not limited to stock price, accumulated hand-off rate, stock price amplitude, volume of trade, amount of rise and fall, etc.; the technical indicators include, but are not limited to, ma, ema, macd, etc.
In this embodiment, a static data stock result set is formed based on static data, a calculation data stock result set is formed based on calculation data, the static data stock result set is obtained from the static data storage area based on the static data stock election request, and the calculation data stock result set is obtained from the calculation data storage area based on the calculation data stock election request.
Specifically, in this embodiment, the static data storage area stores a static data stock result set, and the calculation data storage area includes a first-level data cache area for caching the current-day calculation data stock result set and a second-level data cache area for caching the multiple-day calculation data stock result set.
In this embodiment, the primary data cache region is a memory, and the secondary data cache region is a Redis database.
That is, in this embodiment, the calculation data is stored hierarchically: the current-day computed data stock result set is stored in the memory, and the multi-day computed data stock result set is stored in the Redis database so as to be scheduled by different stock selection main bodies and improve the scheduling speed.
Fig. 2 is a schematic diagram illustrating data acquisition based on a user stock selection request in the stock selection control method based on data classification processing in this embodiment. In this embodiment, as shown in fig. 2, when the stock selection request is a user stock selection request, a calculation data stock result set is obtained from a calculation data storage area based on the calculation data stock selection request, the calculation data stock result set is obtained from the primary data cache area (memory), when the calculation data stock result set does not exist in the primary data cache area (memory), the calculation data stock result set is obtained from the secondary data cache area (Redis database), and when the calculation data stock result set does not exist in the secondary data cache area, the calculation data stock result set is obtained from a data calculation server that generates the calculation data stock result set. That is, when the stock selecting request is a user stock selecting request, only the data of the current day is accessed, and the access speed of the data is further improved by using the first-level cache.
Fig. 3 is a schematic diagram illustrating data acquisition based on a backtesting stock selection request in the stock selection control method based on data classification processing in this embodiment. As shown in fig. 3, in this embodiment, when the stock selection request is a return test stock selection request, the return test stock selection request is first split into a plurality of single-day stock selection requests by day. Then, aiming at each single-day stock selecting request, acquiring a calculation data stock result set from a calculation data storage area based on the calculation data stock selecting request, acquiring the calculation data stock result set from a secondary data cache area (Redis database) for caching the calculation data stock result set on the current day, and acquiring the calculation data stock result set from a data calculation server for generating the calculation data stock result set when the calculation data stock result set does not exist in the secondary data cache area (Redis database). That is, when the stock selecting request is a backward test stock selecting request, the number of users in the primary data cache region (memory) is not accessed, but the data in the secondary data cache region (Redis database) is directly accessed, so that the access speed of the user stock selecting request is not affected.
And S400, merging the static data stock result set and the calculation data stock result set to form an output stock result set, and returning the output stock result set to the request terminal for sending the stock selection request.
In this embodiment, the static data stock result sets are respectively obtained from the static data storage area, the calculation data stock result sets are obtained from the calculation data storage area, then the static data stock result sets and the calculation data stock result sets are combined and processed to form output stock result sets, and the output stock result sets are returned to the request terminal sending the stock selection request, where the request terminal is a user terminal or a return test platform.
Fig. 4 is a schematic flow chart illustrating the output of a stock result set based on a user stock selection request in the data classification processing-based stock selection control method in this embodiment.
As shown in fig. 4, a user initiates a stock selection request, a load balancer searches for an available data processing server, where the load balancer may search for an available data processing server in a random selection manner or a polling selection manner, and the data processing server splits the stock selection request, that is, splits the stock selection request into a static data stock selection request and a computed data stock selection request. Obtaining a static data stock result set from a static data store based on the static data stock selection request, and obtaining a calculation data stock result set from a calculation data storage area based on the calculation data stock election request, wherein, when acquiring the result set of the calculation data stock from the calculation data storage area based on the calculation data stock selecting request, acquiring the result set of the calculation data stock from the first level data cache area (memory), when the calculation data stock result set does not exist in the primary data cache region (memory), acquiring the calculation data stock result set from the secondary data cache region (Redis database), and when the calculation data stock result set does not exist in the secondary data cache region, acquiring the calculation data stock result set from a data calculation server generating the calculation data stock result set. That is, when the stock selecting request is a user stock selecting request, only the data of the current day is accessed, and the access speed of the data is further improved by using the first-level cache. And then combining the static data stock result set and the calculated data stock result set to form an output stock result set, and returning the output stock result set to the user terminal sending the stock selecting request.
Fig. 5 is a schematic flow chart illustrating the output of a stock result set based on a backtesting stock selection request in the data classification processing-based stock selection control method in this embodiment.
As shown in fig. 5, the backtesting platform initiates a stock selection request, the load balancer searches for available data processing servers, wherein the load balancer may search for available data processing servers by using, but not limited to, a random selection manner or a polling selection manner, when the stock selection request is a backtesting stock selection request from the backtesting platform, the data processing server divides the backtesting stock selection request into a plurality of single-day stock selection requests by day, then for each single-day stock selection request, obtains a computed data stock result set from a computed data storage area based on the computed data stock selection request, obtains a computed data stock result set from a two-level data cache (Redis database) storing the computed data stock result set on the same day, and when no computed data stock result set exists in the two-level data cache (Redis database), the computed data stock result set is obtained from a data computation server that generates the computed data stock result set. That is, when the stock selecting request is a backward test stock selecting request, the number of users in the primary data cache region (memory) is not accessed, but the data in the secondary data cache region (Redis database) is directly accessed, so that the access speed of the user stock selecting request is not affected. And then merging the static data stock result set and the calculation data stock result set to form an output stock result set, and returning the output stock result set to a backtesting platform which sends the stock selection request.
Example 2
As shown in fig. 6, the present embodiment provides a stock selection control device based on data sorting process, which includes: the device comprises a request acquisition module, a request splitting processing module, a static data acquisition module, a calculation data acquisition module and a data set processing output module.
In this embodiment, the request obtaining module is configured to obtain the stock selecting request.
In this embodiment, the request splitting processing module is configured to extract a plurality of policy factors from the stock selection request, split the stock selection request into a static data stock selection request and calculate a data stock selection request based on policy requirements of each policy factor.
In this embodiment, the static data obtaining module is configured to obtain a static data stock result set from a static data storage area based on the static data stock selection request.
In this embodiment, the calculation data obtaining module is configured to obtain a calculation data stock result set from a calculation data storage area based on the calculation data stock selection request.
In this embodiment, the data set processing and outputting module is configured to merge the static data stock result set and the calculation data stock result set to form an output stock result set, and return the output stock result set to the request terminal that sent the stock selection request.
In this embodiment, the calculation data storage area includes a first-level data cache area for caching the current-day calculation data stock result set and a second-level data cache area for caching the multiple-day calculation data stock result set.
In this embodiment, the stock selection request is a user stock selection request; obtaining a calculation data stock result set from the first-level data cache area after obtaining the calculation data stock result set from a calculation data storage area based on the calculation data stock selecting request; or the stock selecting request is a backtesting stock selecting request, the backtesting stock selecting request is divided into a plurality of single-day stock selecting requests according to day when the stock selecting request is the backtesting stock selecting request, a calculation data stock result set is obtained from a calculation data storage area based on the calculation data stock selecting request when the stock selecting request is the backtesting stock selecting request, and a calculation data stock result set is obtained from a secondary data cache area for caching the calculation data stock result set on the same day.
In this embodiment, when the computed data stock result set does not exist in the first-level data cache region, the computed data stock result set is obtained from the second-level data cache region; and when the calculation data stock result set does not exist in the secondary data cache region, acquiring the calculation data stock result set from a data calculation server generating the calculation data stock result set.
Technical features of specific implementation of the stock selection control device based on data classification processing in this embodiment are substantially the same as those of the stock selection control method based on data classification processing in the foregoing embodiment, and common technical contents among the embodiments are not repeated.
Example 3
As shown in fig. 7, the present embodiment provides a data classification process-based stock selection control system, which includes at least one data processing server, at least one static data server and at least one data calculation server; a static data storage area for storing static data stock result sets is distributed on the at least one static data server, and a calculation data storage area for storing calculation data stock result sets is distributed on the at least one data processing server and the at least one data calculation server; the data computation server generates the computed data stock result set.
In this embodiment, the static data storage area is distributed over a plurality of static data servers (datasvr) extending vertically; the compute data store is distributed across a plurality of data processing servers (centersvr) that are spread horizontally and a plurality of data compute servers (calcsvr) that are spread horizontally.
In this embodiment, the data processing server (centersvr) sends the stock selection request to different servers (static data server and calcsvr) according to different policy factor requirements of one stock selection request,
the data processing server (centersvr) has no state, the data cache is a first-level cache, reading in advance is not needed, after a user accesses, all result sets of the current day can be reserved in the service memory, and the current-day selective data for the user are all current-day, so that the selective access performance of the user is improved.
Wherein, the data processing server (centersvr) can be expanded in parallel, thereby improving concurrency and increasing service availability.
In this embodiment, the static data server (datasvr) caches static data, facilitating fast querying. When the total amount of data is increased to the hard load of the memory of a stand-alone static data server (datasvr), longitudinal segmentation is adopted, and the data is segmented into different services according to different types of data, and then the static data server (datasvr) can be derived into financial services, financial and financial services and the like. When the user size is increased to be hard to bear by a static data server (datasvr) single machine, the horizontal extension is carried out, and the service concurrency and availability are improved.
In this embodiment, preferably, the static data server (datasvr) first adopts vertical expansion and then performs horizontal expansion. Because there is a need to select factors, such as requesting 5-20% of the market value of a stock, it becomes very difficult to compute the request if the market value factor is split across multiple different static data servers (datasvr), the basic policy of the design is to keep as few as possible a single static factor from being distributed among the different static data servers (datasvr).
In this embodiment, the data calculation server (calcsvr) calculates corresponding derived data according to different algorithm indexes by using basic data such as K lines, that is, generates a calculation data stock result set according to the stored calculation data,
the data computation server (calcsvr) has no state, but needs to cache the basic K-line data at startup for computing other derivative data. For example, data of a day K level or more of 2 years has a small data volume, a fast reading speed, which is read when a service is started, and data of a minute K is large and used relatively little, which is loaded when a user requests in order not to affect the service restart time, and then cached in the memory.
Wherein, the data computation server (calcsvr) can be expanded in parallel, thereby improving concurrency and increasing service availability.
The data processing server runs the stock selection control method based on the data classification processing as described in embodiment 1.
The stock selection control method based on data classification processing is described in detail in embodiment 1, and is not described herein again.
In summary, in the application, the stock selection data is divided into the static data stock result set and the calculation data stock result set for classified storage and scheduling, and the calculation data stock result set is divided into the primary storage and the secondary storage, so that the processing speed and the processing precision of the stock selection request are effectively improved, and more objective and high-accuracy stocks can be recommended for the user. Therefore, the stock selection control method, device and system based on data classification processing have higher innovativeness compared with the prior art.
The above embodiments are merely illustrative of the principles and utilities of the present application and are not intended to limit the application. Any person skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present application. Accordingly, it is intended that all equivalent modifications or changes which may be accomplished by those skilled in the art without departing from the spirit and scope of the present disclosure be covered by the claims which follow.

Claims (14)

1. A stock selection control method based on data classification processing is characterized in that: the method comprises the following steps:
acquiring a stock selection request;
extracting a plurality of strategy factors from the stock selection request, and dividing the stock selection request into a static data stock selection request and a calculation data stock selection request based on the strategy requirements of each strategy factor;
acquiring a static data stock result set from a static data storage area based on the static data stock selecting request, and acquiring a calculation data stock result set from a calculation data storage area based on the calculation data stock selecting request;
and merging the static data stock result set and the calculation data stock result set to form an output stock result set, and returning the output stock result set to the request terminal for sending the stock selection request.
2. The stock selection control method based on data classification processing according to claim 1, characterized in that: the calculation data storage area comprises a first-level data cache area for caching the current-day calculation data stock result set and a second-level data cache area for caching the multi-day calculation data stock result set.
3. The stock selection control method based on data classification processing according to claim 2, characterized in that: the stock selecting request is a user stock selecting request; and acquiring the calculation data stock result set from the first-level data cache region after acquiring the calculation data stock result set from the calculation data storage region based on the calculation data stock selecting request.
4. The stock selection control method based on data classification processing according to claim 3, characterized in that: and when the calculation data stock result set does not exist in the first-level data cache region, acquiring the calculation data stock result set from the second-level data cache region.
5. The stock selection control method based on data classification processing according to claim 4, characterized in that: and when the calculation data stock result set does not exist in the secondary data cache region, acquiring the calculation data stock result set from a data calculation server generating the calculation data stock result set.
6. The stock selection control method based on data classification processing according to claim 2, characterized in that: the stock selecting request is a return test stock selecting request; and when the stock selection request is a return test stock selection request, splitting the return test stock selection request into a plurality of single-day stock selection requests according to days.
7. The stock selection control method based on data classification processing according to claim 6, characterized in that: and when the stock selecting request is a return survey stock selecting request, acquiring a calculation data stock result set from a calculation data storage area based on the calculation data stock selecting request, and acquiring the calculation data stock result set from a secondary data cache area of the calculation data stock result set on the cache current day.
8. The stock selection control method based on data classification processing according to claim 7, characterized in that: and when the calculation data stock result set does not exist in the secondary data cache region, acquiring the calculation data stock result set from a data calculation server generating the calculation data stock result set.
9. The stock selection control method based on data classification processing according to claim 5 or 8, characterized in that: the static data storage area is distributed in a plurality of static data servers which are longitudinally expanded; the computing data storage area is distributed to a plurality of data processing servers which are horizontally expanded and a plurality of data computing servers which are horizontally expanded.
10. A stock selecting control device based on data classification processing is characterized in that: the method comprises the following steps:
the request acquisition module is used for acquiring a stock selection request;
the request splitting processing module is used for extracting a plurality of strategy factors from the stock selecting request and splitting the stock selecting request into a static data stock selecting request and a calculation data stock selecting request based on the strategy requirements of each strategy factor;
the static data acquisition module is used for acquiring a static data stock result set from a static data storage area based on the static data stock selection request;
the calculation data acquisition module is used for acquiring a calculation data stock result set from a calculation data storage area based on the calculation data stock selection request;
and the data set processing and outputting module is used for merging the static data stock result set and the calculation data stock result set to form an output stock result set and returning the output stock result set to the request terminal for sending the stock selecting request.
11. The stock-selection control device based on data classification processing according to claim 10, characterized in that: the calculation data storage area comprises a first-level data cache area for caching the current-day calculation data stock result set and a second-level data cache area for caching the multi-day calculation data stock result set.
12. The stock-selection control device based on data classification processing according to claim 11, characterized in that:
the stock selecting request is a user stock selecting request; acquiring a calculation data stock result set from the first-level data cache region after acquiring the calculation data stock result set from a calculation data storage region based on the calculation data stock selecting request; or
The method comprises the steps that a stock selecting request is a backmeasurement stock selecting request, when the stock selecting request is the backmeasurement stock selecting request, the backmeasurement stock selecting request is divided into a plurality of single-day stock selecting requests according to day, when the stock selecting request is the backmeasurement stock selecting request, a calculation data stock result set is obtained from a calculation data storage area based on the calculation data stock selecting request, and a calculation data stock result set is obtained from a secondary data cache area for caching the calculation data stock result set on the same day.
13. The stock-selection control device based on data classification processing according to claim 12, characterized in that: when the calculation data stock result set does not exist in the first-level data cache region, acquiring the calculation data stock result set from the second-level data cache region; and when the calculation data stock result set does not exist in the secondary data cache region, acquiring the calculation data stock result set from a data calculation server generating the calculation data stock result set.
14. A stock selection control system based on data classification processing is characterized in that: the system comprises at least one data processing server, at least one static data server and at least one data calculation server;
a static data storage area for storing static data stock result sets is distributed on the at least one static data server, and a calculation data storage area for storing calculation data stock result sets is distributed on the at least one data processing server and the at least one data calculation server; the data calculation server generates the calculation data stock result set;
the data processing server executes the stock selection control method based on the data classification processing according to any one of claims 1 to 9.
CN202110832388.1A 2021-07-22 2021-07-22 Stock selection control method, device and system based on data classification processing Active CN113590659B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110832388.1A CN113590659B (en) 2021-07-22 2021-07-22 Stock selection control method, device and system based on data classification processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110832388.1A CN113590659B (en) 2021-07-22 2021-07-22 Stock selection control method, device and system based on data classification processing

Publications (2)

Publication Number Publication Date
CN113590659A true CN113590659A (en) 2021-11-02
CN113590659B CN113590659B (en) 2023-12-05

Family

ID=78249139

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110832388.1A Active CN113590659B (en) 2021-07-22 2021-07-22 Stock selection control method, device and system based on data classification processing

Country Status (1)

Country Link
CN (1) CN113590659B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117745432A (en) * 2024-02-19 2024-03-22 上海大智慧信息科技有限公司 Quantitative back-testing system and method based on micro-service architecture

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080270317A1 (en) * 2007-04-19 2008-10-30 Dan Waldron Methods and Computer Software Applications for Selecting Securities for An Investment Portfolio
CN110704738A (en) * 2019-09-29 2020-01-17 平安直通咨询有限公司上海分公司 Service information pushing method and device based on judge portrait, terminal and storage medium
CN110782345A (en) * 2019-09-27 2020-02-11 合肥黎曼信息科技有限公司 Intelligent stock selection method based on market transaction big data

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080270317A1 (en) * 2007-04-19 2008-10-30 Dan Waldron Methods and Computer Software Applications for Selecting Securities for An Investment Portfolio
CN110782345A (en) * 2019-09-27 2020-02-11 合肥黎曼信息科技有限公司 Intelligent stock selection method based on market transaction big data
CN110704738A (en) * 2019-09-29 2020-01-17 平安直通咨询有限公司上海分公司 Service information pushing method and device based on judge portrait, terminal and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117745432A (en) * 2024-02-19 2024-03-22 上海大智慧信息科技有限公司 Quantitative back-testing system and method based on micro-service architecture

Also Published As

Publication number Publication date
CN113590659B (en) 2023-12-05

Similar Documents

Publication Publication Date Title
Gould et al. Limit order books
US20060200395A1 (en) Stock portfolio selection device, stock portfolio selection method and medium storing stock portfolio selection program
CN110737917A (en) Data sharing device and method based on privacy protection and readable storage medium
Pekár et al. Portfolio performance measurement using differential evolution
CN113590659A (en) Data classification processing-based stock selection control method, device and system
US20190172142A1 (en) Model investment portfolios and funds containing combined holdings only found in managed accounts with the greatest performances by time period, risk level, and asset class; including artificial intelligence-enhanced versions
KR102000519B1 (en) A method of recommending stock items using investment patterns of clients having similar tendency and system thereof
Hurley et al. Attacking recommender systems: A cost-benefit analysis
Du et al. Backtesting portfolio value‐at‐risk with estimated portfolio weights
CN115034685A (en) Customer value evaluation method, customer value evaluation device and computer-readable storage medium
TWM626968U (en) Non-fungible token management system
Nyström et al. Hawkes-based models for high frequency financial data
Carare Reserve prices in repeated auctions
Kharvi et al. An optimal inventory policy when purchase price follows geometric Brownian motion process
Metescu Fractal market hypothesis vs. Efficient market hypothesis: applying the r/s analysis on the Romanian capital market
Jungo et al. Financial innovation, corruption, and economic growth: analysis of Sub-Saharan African countries
RU2710830C1 (en) Method for automated provision of recommendations on making investment-relevant decisions on the market of digital assets and device for its implementation
Ogaki GMM estimation techniques
Trimono et al. Value at Risk with Bootstrap Historical Simulation Approach for Prediction of Cryptocurrency Investment Risk
Matsuk et al. Rating of Investments Funds Using the Capital Asset Pricing Model: Experience of Ukraine
JP7054288B1 (en) Program and information processing method
Haley A nonparametric quantity-of-quality approach to assessing financial asset return performance
Halicki The Foster-Hart measure as a tool for determining the set of risky portfolios that do not expose the investor to the bankruptcy
Sadykhov et al. Decentralized token economy theory (DeTEcT): token pricing, stability and governance for token economies
Panja Heuristic Optimization of Portfolio Considering Sharpe's Single Index Model: An Analytical Approach

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant