CN113269643A - K-line form recognition and classification method and device, computer equipment and storage medium - Google Patents

K-line form recognition and classification method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN113269643A
CN113269643A CN202110571189.XA CN202110571189A CN113269643A CN 113269643 A CN113269643 A CN 113269643A CN 202110571189 A CN202110571189 A CN 202110571189A CN 113269643 A CN113269643 A CN 113269643A
Authority
CN
China
Prior art keywords
line
preset
clustering
valence
line state
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.)
Pending
Application number
CN202110571189.XA
Other languages
Chinese (zh)
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202110571189.XA priority Critical patent/CN113269643A/en
Publication of CN113269643A publication Critical patent/CN113269643A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • 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/248Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/243Classification techniques relating to the number of classes
    • G06F18/24323Tree-organised classifiers

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Probability & Statistics with Applications (AREA)
  • Databases & Information Systems (AREA)
  • Computational Linguistics (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a K-line form recognition and classification method, a device, computer equipment and a storage medium, belonging to the technical field of intelligent decision making, wherein the method comprises the following steps: acquiring stock transaction data in a preset time period, and constructing a price characteristic vector according to the stock transaction data; respectively generating a first K-line state and a second K-line state according to the valence quantity feature vector through a preset K-line state rule and a preset algorithm; acquiring enterprise information and industry information corresponding to the stock trading data from a database, and constructing a non-price characteristic vector according to the enterprise information and the industry information; and identifying and classifying the first K-line state and the second K-line state through a preset classification model according to the non-valence feature vector to obtain a target K-line state. The embodiment of the application can save the time for identifying and classifying the K line shape and improve the accuracy of identifying and classifying.

Description

K-line form recognition and classification method and device, computer equipment and storage medium
Technical Field
The invention relates to the technical field of intelligent decision, in particular to a K-line form recognition and classification method, a K-line form recognition and classification device, computer equipment and a storage medium.
Background
The graph source of the K-line graph is in the time of the curtain of japan, and is used by the traders in japan rice market at that time to record the market conditions and price fluctuations of rice market, and then introduced into the financial market, such as stock market, due to its fine and unique labeling method. The drawing method of the K line graph in the stock market comprises four data, namely the opening price, the highest price, the lowest price and the closing price, and all the K line graphs are developed around the four data to reflect the situation of the great situation and the price information. The K line form is the characteristic of the price track of the stock in the processes of falling, rolling and rising, and the late trend of the stock price can be judged by observing a composite graph formed by a plurality of K lines. Common K-ray forms comprise a W bottom, an M top, a reversed cross star and the like, the existing K-ray forms are generally classified through manual identification, but the manual identification not only consumes a large amount of time, but also has low accuracy.
Disclosure of Invention
The embodiment of the invention provides a K-line form recognition and classification method, a device, computer equipment and a storage medium, and aims to solve the problems of long time consumption and low accuracy of K-line form recognition and classification.
In a first aspect, an embodiment of the present invention provides a method for identifying and classifying a K-line shape, including:
acquiring stock transaction data in a preset time period, and constructing a price characteristic vector according to the stock transaction data;
respectively generating a first K line state and a second K line state according to the valence quantity feature vector through a preset K line state rule and a preset algorithm;
acquiring enterprise information and industry information corresponding to the stock trading data from a database, and constructing a non-price characteristic vector according to the enterprise information and the industry information;
and identifying and classifying the first K-line state and the second K-line state through a preset classification model according to the non-valence feature vector to obtain a target K-line state.
In a second aspect, an embodiment of the present invention further provides a device for identifying and classifying a K-line shape, which includes:
the system comprises a first construction unit, a second construction unit and a third construction unit, wherein the first construction unit is used for acquiring stock transaction data in a preset time period and constructing price characteristic vectors according to the stock transaction data;
the generating unit is used for respectively generating a first K line state and a second K line state according to the valence quantity characteristic vector through a preset K line state rule and a preset algorithm;
the second construction unit is used for acquiring enterprise information and industry information corresponding to the stock transaction data from a database and constructing a non-price characteristic vector according to the enterprise information and the industry information;
and the identification and classification unit is used for identifying and classifying the first K-line state and the second K-line state through a preset classification model according to the non-valence feature vector to obtain a target K-line state.
In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory and a processor, where the memory stores a computer program, and the processor implements the above method when executing the computer program.
In a fourth aspect, the present invention also provides a computer-readable storage medium, which stores a computer program, and the computer program can implement the above method when being executed by a processor.
The embodiment of the invention provides a K-line form recognition and classification method and device, computer equipment and a storage medium. Wherein the method comprises the following steps: acquiring stock transaction data in a preset time period, and constructing a price characteristic vector according to the stock transaction data; respectively generating a first K line state and a second K line state according to the valence quantity feature vector through a preset K line state rule and a preset algorithm; acquiring enterprise information and industry information corresponding to the stock trading data from a database, and constructing a non-price characteristic vector according to the enterprise information and the industry information; and identifying and classifying the first K-line state and the second K-line state through a preset classification model according to the non-valence feature vector to obtain a target K-line state. According to the technical scheme of the embodiment of the invention, according to the constructed valence quantity characteristic vector, not only is the first K line form generated through the preset K line form rule, but also the second K line form is generated according to the preset algorithm, so that the generation of the K line form has good expansibility, and the accuracy rate of the K line form identification and classification can be improved; and then, constructing a non-valence feature vector according to the enterprise information and the market information, and identifying and classifying the first K-line form and the second K-line form through a preset classification model to obtain a target K-line form.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a K-line shape recognition and classification method according to an embodiment of the present invention;
fig. 2 is a schematic sub-flow chart of a method for identifying and classifying a K-line shape according to an embodiment of the present invention;
fig. 3 is a schematic sub-flow chart of a method for identifying and classifying a K-line shape according to an embodiment of the present invention;
fig. 4 is a schematic sub-flow chart of a method for identifying and classifying a K-line shape according to an embodiment of the present invention;
fig. 5 is a schematic sub-flow chart of a method for identifying and classifying a K-line shape according to an embodiment of the present invention;
fig. 6 is a schematic flowchart of a K-line shape recognition and classification method according to another embodiment of the present invention;
fig. 7 is a schematic block diagram of a K-line shape recognition and classification apparatus according to an embodiment of the present invention;
fig. 8 is a schematic block diagram of a generating unit of the K-line shape recognition and classification apparatus provided in the embodiment of the present invention;
fig. 9 is a schematic block diagram of a second generation subunit of the K-line shape recognition and classification apparatus provided in the embodiment of the present invention;
fig. 10 is a schematic block diagram of a second construction unit of the K-line shape recognition and classification apparatus according to the embodiment of the present invention;
fig. 11 is a schematic block diagram of an identification and classification unit of the K-line shape identification and classification apparatus provided in the embodiment of the present invention;
fig. 12 is a schematic block diagram of a K-line shape recognition and classification apparatus according to another embodiment of the present invention; and
fig. 13 is a schematic block diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating a method for identifying and classifying a K-line shape according to an embodiment of the present invention. The K-line shape recognition and classification method in this embodiment may be applied to a terminal, where the terminal includes, but is not limited to, an electronic device with a communication function, such as a tablet computer, a notebook computer, and a desktop computer, and the K-line shape recognition and classification method is implemented by an application program installed on the terminal, so as to save recognition and classification time and improve the accuracy of recognition and classification. As shown in fig. 1, the method includes the following steps S100-S130.
S100, stock transaction data in a preset time period are obtained, and price characteristic vectors are constructed according to the stock transaction data;
in the embodiment of the invention, stock transaction data in a preset time period is obtained firstly, wherein the preset time period can be set according to actual needs, for example, one week or one month, and the stock transaction data comprises transaction data such as highest price, lowest price, opening price, closing price, volume of bargaining and the like; after the stock transaction data is obtained, price quantity feature vectors are constructed according to the obtained stock transaction data, wherein the price quantity feature vectors are vectors representing price quantity features, and the price quantity features refer to the length of an upper shadow line, the length of a lower shadow line, the ratio of the length of the upper shadow line to the length of the lower shadow line, the length of a negative line entity, the length of a positive line entity and the like.
And S110, respectively generating a first K-line form and a second K-line form according to the valence feature vector through a preset K-line form rule and a preset algorithm.
In the embodiment of the invention, after stock transaction data in a preset time period are obtained and a price quantity characteristic vector is constructed according to the stock transaction data, a first K line form and a second K line form are respectively generated according to the price quantity characteristic vector through a preset K line form rule and a preset algorithm. The preset K-line form rule is derived from a traditional K-line theoretical formula, and the preset algorithm is a hierarchical agglomerative clustering algorithm.
In some embodiments, such as this embodiment, as shown in FIG. 2, the step S110 may include steps S111-S112.
S111, generating a plurality of K line states with form names according to the valence quantity feature vector through a preset K line state rule, and taking the plurality of K line states with form names as first K line states;
and S112, generating a plurality of K-line states without form names through a preset algorithm according to the valence feature vectors, and taking the plurality of K-line states without form names as second K-line states.
In the embodiment of the invention, a first K-line form and a second K-line form are respectively generated according to the valence quantity characteristic vector through a preset K-line form rule and a preset algorithm. Specifically, a plurality of K-line states with form names are generated according to the valence feature vector by presetting a K-line state rule, and the plurality of K-line states with form names are used as a first K-line state, for example, the morning star; according to the price characteristic vector, a plurality of K line states without form names are generated through a preset algorithm, and the plurality of K line states without form names are used as second K line states, wherein the preset algorithm is a hierarchical agglomerative clustering algorithm.
In some embodiments, such as the present embodiment, as shown in FIG. 3, the step S112 may include steps S1121-S1124.
S1121, taking all the price characteristic vectors as a data set, and taking each price characteristic vector as a clustering center;
s1122, calculating a distance value between every two clustering centers in the data set, and clustering and combining the two clustering centers with the minimum distance value to generate a new clustering center;
s1123, judging whether the number of the cluster centers after the cluster combination is equal to the number of the cluster centers before the cluster combination, if the number of the cluster centers after the cluster combination is not equal to the number of the cluster centers before the cluster combination, returning to execute the step S1122, otherwise, executing the step S1124;
s1124, generating a plurality of K line shapes without shape names by the plurality of clustering centers, and taking the plurality of K line shapes without shape names as second K line shapes.
In the embodiment of the invention, a plurality of K-line states without form names are generated through a preset algorithm according to the valence feature vector, and the plurality of K-line states without form names are used as second K-line states. Specifically, all the price characteristic vectors are used as a data set, and each price characteristic vector is used as a clustering center; then calculating a distance value between every two clustering centers in the data set, and clustering and combining the two clustering centers with the minimum distance value to generate a new clustering center; after generating a new clustering center, judging whether the number of the clustering centers after clustering combination is equal to the number of the clustering centers before clustering combination; if the number of the cluster centers after the cluster merging is not equal to the number of the cluster centers before the cluster merging, which indicates that the cluster centers in the data set can also be subjected to cluster merging, returning to execute step S1122; and if the number of the cluster centers after the cluster combination is equal to the number of the cluster centers before the cluster combination, which indicates that the cluster centers in the data set can not be subjected to the cluster combination, generating a plurality of K line forms without form names by the plurality of cluster centers, and taking the plurality of K line forms without form names as second K line forms.
S120, acquiring enterprise information and industry information corresponding to the stock trading data from a database, and constructing a non-price characteristic vector according to the enterprise information and the industry information.
In the embodiment of the invention, after the first K-line form and the second K-line form are respectively generated through the preset K-line form rule and the preset algorithm according to the price characteristic vector, enterprise information and industry information corresponding to the stock trading data are obtained from a database, and a non-price characteristic vector is constructed according to the enterprise information and the industry information. In this embodiment, the reason that the non-price quantity feature vector is constructed according to the enterprise information and the market information is that the enterprise information and the market information are related to the stock late-strike information, and it is considered that the enterprise information and the market information have an important meaning for the identification and classification of the K-line state, so that the accuracy of the identification and classification can be further improved.
In some embodiments, such as this embodiment, as shown in FIG. 4, the step S120 may include steps S121-S124.
S121, acquiring a stock code corresponding to the stock trading data;
s122, acquiring enterprise information and industry information corresponding to the stock trading data from a database according to the stock codes;
and S123, respectively carrying out enterprise valuation and industry valuation according to the enterprise information and the industry information to obtain an enterprise valuation value and an industry valuation value.
And S124, constructing a non-price characteristic vector according to the enterprise evaluation value and the industry evaluation value.
In the embodiment of the invention, before acquiring enterprise information and quotation information corresponding to the stock trading data from a database, stock codes corresponding to the stock trading data are acquired, enterprise information and quotation information corresponding to the stock trading data are acquired from the database according to the acquired stock codes, understandably, the stock codes, the enterprise information and the quotation information are in one-to-one correspondence, and enterprise valuation and industry valuation are respectively carried out according to the enterprise information and the industry information to obtain enterprise valuation and industry valuation; and finally constructing a non-price characteristic vector according to the enterprise evaluation value and the industry evaluation value. It should be noted that, in other embodiments, each income corresponding to the enterprise information may also be evaluated, and understandably, the industry information may also take the industry popularity ranking as a consideration of the non-price characteristics.
S130, identifying and classifying the first K-line state and the second K-line state through a preset classification model according to the non-valence feature vector to obtain a target K-line state.
In the embodiment of the invention, after a non-valence feature vector is constructed according to the enterprise information and the market information, the first K line state and the second K line state are identified and classified through a preset classification model according to the non-valence feature vector to obtain a target K line state. The preset classification model is a random forest model, the random forest model is formed by building a plurality of decision trees, and the decision trees are not related to each other. The decision tree is a tree-shaped structure, and can be a non-binary tree structure or a binary tree structure. The random forest model in the embodiment of the invention is of a binary Tree structure, And each decision Tree is generated according to a Classification And Regression (CART) algorithm, namely, each node of the decision Tree has only two values, namely, the values can be 'yes' And 'no', And respectively are a left branch And a right branch, which respectively represent that the target K line state is a favorable state or a non-favorable state. Understandably, in other embodiments, the left branch may represent a non-favorable form, and the right branch may represent a favorable form, depending on the actual requirements. It should be noted that, in this embodiment, the target K line shape carries a preset favorable shape identifier, and whether the target K line shape is a favorable shape can be identified by the preset favorable shape identifier.
In some embodiments, such as this embodiment, as shown in fig. 5, the step S130 may include steps S131-S133.
S131, splicing the feature vector corresponding to the first K line shape with the non-valence feature vector to obtain a first input vector;
s132, splicing the feature vector corresponding to the second K line shape with the non-valence feature vector to obtain a second input vector;
s133, identifying and classifying the K line states corresponding to the first input vector and the second input vector through a random forest model to obtain a target K line state.
In the embodiment of the invention, the first K-line state and the second K-line state are identified and classified through a preset classification model according to the non-valence feature vector to obtain a target K-line state. Specifically, a feature vector corresponding to the first K-line shape is spliced with the feature vector of the non-valence quantity to obtain a first input vector; splicing the feature vector corresponding to the second K line shape with the non-valence feature vector to obtain a second input vector; and after the first input vector and the second input vector are obtained, identifying and classifying the K line states corresponding to the first input vector and the second input vector through a random forest model to obtain a target K line state. In the embodiment of the invention, the non-valence feature vectors are spliced in the first K-line state and the second K-line state through a random forest model, and then the non-valence feature vectors are recognized and classified to obtain the target K-line state, rather than directly recognizing and processing the first K-line state and the second K-line state, because the non-valence feature has very important influence on the trend of the stock in the later period, for example, when the industry is not good, the favorable form can be changed into the non-favorable form in the later period, and therefore, the accuracy of the K-line state recognition and classification can be further improved by considering the non-valence feature vectors when the form recognition and classification is carried out.
Fig. 6 is a flowchart illustrating a K-line shape recognition and classification method according to another embodiment of the present invention, and as shown in fig. 6, the K-line shape recognition and classification method according to the embodiment of the present invention includes steps S200 to S260. Steps S200 to S230 are similar to steps S100 to S130 in the above embodiments, and are not described herein again. The added steps S240 to S260 in the present embodiment are explained in detail below.
S240, judging whether the target K line form carries a preset favorable form mark or not, if so, executing a step S250, otherwise, executing a step S260;
s250, pushing the target K line state to a user;
and S260, sending a risk prompt to the user.
In the embodiment of the invention, after a target K line state is obtained, whether a preset favorable state identifier is carried in the target K line state is judged; if the preset favorable form mark is carried in the target K line form, pushing the target K line form to a user to indicate that stocks corresponding to the target K line form are expanded and can be bought, and pushing the target K line form to the user; and if the target K line shape does not carry the preset favor shape mark, sending a risk prompt to the user to indicate that the stock corresponding to the target K line shape falls, and does not suggest buying, sending a risk prompt to the user to prompt the user not to buy or throw out the stock held in the hand in time, and stopping loss in time.
Fig. 7 is a schematic block diagram of a K-line shape recognition and classification apparatus according to an embodiment of the present invention. As shown in fig. 7, corresponding to the above K-line shape recognition and classification method, the present invention further provides a K-line shape recognition and classification apparatus 200, where the K-line shape recognition and classification apparatus 200 includes a unit for performing the above K-line shape recognition and classification method, and the apparatus may be configured in a terminal. Specifically, referring to fig. 7, the K-line shape recognition and classification apparatus 200 includes a first constructing unit 201, a generating unit 202, a second constructing unit 203, and a recognition and classification unit 204.
The first construction unit 201 is configured to acquire stock trading data in a preset time period, and construct a price characteristic vector according to the stock trading data; the generating unit 202 is configured to generate a first K-line state and a second K-line state according to the valence feature vector by using a preset K-line state rule and a preset algorithm; the second construction unit 203 is configured to obtain enterprise information and industry information corresponding to the stock trading data from a database, and construct a non-price characteristic vector according to the enterprise information and the industry information; the recognition and classification unit 204 is configured to recognize and classify the first K-line shape and the second K-line shape through a preset classification model according to the non-valence feature vector to obtain a target K-line shape.
In some embodiments, for example, in the present embodiment, referring to fig. 8, the generating unit 202 includes a first generating sub-unit 2021 and a second generating sub-unit 2022.
The first generating subunit 2021 is configured to generate a plurality of K-line states with form names according to the valence feature vector by using a preset K-line state rule, and use the plurality of K-line states with form names as a first K-line state; the second generating subunit 2022 is configured to generate a plurality of K-line forms without form names according to the valence feature vector by using a preset algorithm, and use the plurality of K-line forms without form names as a second K-line form.
In some embodiments, for example in this embodiment, referring to fig. 9, the second generating sub-unit 2022 includes a unit 20221, a combining unit 20222, a judging unit 20223, a returning unit 20224, and a third generating sub-unit 20225.
The as unit 20221 is configured to use all the price characteristic vectors as a data set, and use each price characteristic vector as a cluster center; the merging unit 20222 is configured to calculate a distance value between every two of the cluster centers in the data set, and perform clustering and merging on the two cluster centers with the smallest distance value to generate a new cluster center; the judging unit 20223 is configured to judge whether the number of the cluster centers after cluster merging is equal to the number of the cluster centers before cluster merging; the returning unit 20224 is configured to, if the number of the cluster centers after the cluster merging is not equal to the number of the cluster centers before the cluster merging, return to the step of calculating the distance value between every two cluster centers in the data set, and merge the two cluster centers with the smallest distance value to generate a new cluster center; the third generating subunit 20225 is configured to generate a plurality of K line shapes without form names from the plurality of cluster centers if the number of the cluster centers after cluster merging is equal to the number of the cluster centers before cluster merging, and use the plurality of K line shapes without form names as a second K line shape.
In some embodiments, for example, in this embodiment, referring to fig. 10, the second constructing unit 203 includes a first acquiring unit 2031, a second acquiring unit 2032, an estimating unit 2033, and a constructing subunit 2034.
The acquiring unit 2031 is configured to acquire a stock code corresponding to the stock trading data; the second obtaining unit 2032 is configured to obtain enterprise information and industry information corresponding to the stock trading data from a database according to the stock code; the evaluation unit 2033 is configured to perform enterprise evaluation and industry evaluation according to the enterprise information and the industry information, respectively, to obtain an enterprise evaluation value and an industry evaluation value; the construction subunit 2034 is configured to construct a non-price amount feature vector according to the enterprise evaluation value and the industry evaluation value.
In some embodiments, for example, in the present embodiment, referring to fig. 11, the identification and classification unit 204 includes a first splicing unit 2041, a second splicing unit 2042, and an identification and classification subunit 2043.
The first splicing unit 2041 is configured to splice the feature vector corresponding to the first K line state and the feature vector of the non-valence quantity to obtain a first input vector; the second splicing unit 2042 is configured to splice the feature vector corresponding to the second K-line state with the feature vector of the non-valence quantity to obtain a second input vector; the recognition and classification subunit 2043 is configured to recognize and classify the K line states corresponding to the first input vector and the second input vector through a random forest model to obtain a target K line state.
In some embodiments, for example, in this embodiment, as shown in fig. 12, the apparatus 200 further includes a determining unit 205, a pushing unit 206, and a prompting unit 207.
The determining unit 205 is configured to determine whether the target K line shape carries a preset good shape identifier; the pushing unit 206 is configured to push the target K line shape to a user if the target K line shape carries the preset favor shape identifier; the prompt unit 207 is configured to send a risk prompt to a user if the target K-line shape does not carry the preset favor shape identifier.
The K-line shape recognition classification system described above may be implemented in the form of a computer program that can be run on a computer device as shown in fig. 13.
Referring to fig. 13, fig. 13 is a schematic block diagram of a computer device according to an embodiment of the present application. The computer device 900 is a terminal, and the terminal includes, but is not limited to, an electronic device with a communication function, such as a tablet computer, a notebook computer, and a desktop computer.
Referring to fig. 13, the computer device 900 includes a processor 902, memory and an interface 907 connected by a system bus 901, wherein the memory may include a storage medium 903 and an internal memory 904.
The storage medium 903 may store an operating system 9031 and a computer program 9032. The computer program 9032, when executed, may cause the processor 902 to perform a K-line shape recognition classification method.
The processor 902 is used to provide computing and control capabilities to support the operation of the overall computer device 900.
The internal memory 904 provides an environment for the operation of a computer program 9032 in the storage medium 903.
The interface 905 is used for communication with other devices. Those skilled in the art will appreciate that the architecture shown in fig. 13 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing device 900 to which the disclosed aspects apply, as a particular computing device 900 may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
Wherein the processor 902 is configured to run a computer program 9032 stored in the respective memory, to implement the following steps: acquiring stock transaction data in a preset time period, and constructing a price characteristic vector according to the stock transaction data; respectively generating a first K line state and a second K line state according to the valence quantity feature vector through a preset K line state rule and a preset algorithm; acquiring enterprise information and industry information corresponding to the stock trading data from a database, and constructing a non-price characteristic vector according to the enterprise information and the industry information; and identifying and classifying the first K-line state and the second K-line state through a preset classification model according to the non-valence feature vector to obtain a target K-line state.
In some embodiments, for example, in this embodiment, when the processor 902 implements the steps of generating the first K-line shape and the second K-line shape respectively according to the valence feature vector by using a preset K-line shape rule and a preset algorithm, the following steps are implemented: generating a plurality of K line states with form names according to the valence quantity feature vector through a preset K line state rule, and taking the plurality of K line states with form names as first K line states; and generating a plurality of K line states without form names through a preset algorithm according to the valence quantity feature vector, and taking the plurality of K line states without form names as second K line states.
In some embodiments, for example, in this embodiment, when the processor 902 implements the step of generating a plurality of K-line shapes without form names by using a preset algorithm according to the valence feature vector, and taking the plurality of K-line shapes without form names as a second K-line shape, the following steps are implemented: taking all the price characteristic vectors as a data set, and taking each price characteristic vector as a clustering center; calculating a distance value between every two clustering centers in the data set, and clustering and combining the two clustering centers with the minimum distance value to generate a new clustering center; judging whether the number of the clustering centers after clustering combination is equal to the number of the clustering centers before clustering combination; if the number of the clustering centers after clustering combination is not equal to the number of the clustering centers before clustering combination, returning to the step of executing to calculate the distance value between every two clustering centers in the data set, and combining the two clustering centers with the minimum distance value to generate a new clustering center; and if the number of the clustering centers after the clustering combination is equal to the number of the clustering centers before the clustering combination, generating a plurality of K line shapes without morphological names from the clustering centers, and taking the plurality of K line shapes without morphological names as second K line shapes.
In some embodiments, for example, in this embodiment, when the processor 902 implements the step of obtaining the enterprise information and the industry information corresponding to the stock trading data from the database, and constructing the non-price characteristic vector according to the enterprise information and the industry information, the following steps are specifically implemented: acquiring a stock code corresponding to the stock trading data; and acquiring enterprise information and industry information corresponding to the stock trading data from a database according to the stock codes, and constructing a non-price characteristic vector according to the enterprise information and the industry information.
In some embodiments, for example, in this embodiment, when the processor 902 implements the step of identifying and classifying the first K-line shape and the second K-line shape according to the feature vector of the non-valence quantity by using a preset classification model to obtain the target K-line shape, the following steps are implemented: splicing the feature vector corresponding to the first K line state with the non-valence feature vector to obtain a first input vector; splicing the feature vector corresponding to the second K line shape with the non-valence feature vector to obtain a second input vector; and identifying and classifying the K line states corresponding to the first input vector and the second input vector through a random forest model to obtain a target K line state.
In some embodiments, for example, in this embodiment, after the step of identifying and classifying the first K-line state and the second K-line state by using a preset classification model according to the feature vector of the non-valence quantity to obtain the target K-line state, the processor 902 further specifically includes the following steps: judging whether the target K line form carries a preset favorable form mark or not; if the preset favorable form identifier is carried in the target K line form, pushing the target K line form to a user; and if the target K line shape does not carry the preset favorable shape identification, sending a risk prompt to a user.
It should be understood that, in the embodiment of the present Application, the Processor 902 may be a Central Processing Unit (CPU), and the Processor 902 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
It will be understood by those skilled in the art that all or part of the flow of the method implementing the above embodiments may be implemented by a computer program instructing associated hardware. The computer program may be stored in a storage medium, which is a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the flow steps of the embodiments of the method described above. Accordingly, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program. The computer program, when executed by a processor, causes the processor to perform the steps of: acquiring stock transaction data in a preset time period, and constructing a price characteristic vector according to the stock transaction data; respectively generating a first K line state and a second K line state according to the valence quantity feature vector through a preset K line state rule and a preset algorithm; acquiring enterprise information and industry information corresponding to the stock trading data from a database, and constructing a non-price characteristic vector according to the enterprise information and the industry information; and identifying and classifying the first K-line state and the second K-line state through a preset classification model according to the non-valence feature vector to obtain a target K-line state.
In some embodiments, for example, in this embodiment, when the processor executes the computer program to implement the step of generating the first K-line shape and the second K-line shape according to the valence feature vector by using a preset K-line shape rule and a preset algorithm, the following steps are specifically implemented: generating a plurality of K line states with form names according to the valence quantity feature vector through a preset K line state rule, and taking the plurality of K line states with form names as first K line states; and generating a plurality of K line states without form names through a preset algorithm according to the valence quantity feature vector, and taking the plurality of K line states without form names as second K line states.
In some embodiments, for example, in this embodiment, when the processor executes the computer program to generate a plurality of K-line shapes without shape names by a preset algorithm according to the valence feature vector, and uses the plurality of K-line shapes without shape names as a second K-line shape step, the following steps are specifically implemented: taking all the price characteristic vectors as a data set, and taking each price characteristic vector as a clustering center; calculating a distance value between every two clustering centers in the data set, and clustering and combining the two clustering centers with the minimum distance value to generate a new clustering center; judging whether the number of the clustering centers after clustering combination is equal to the number of the clustering centers before clustering combination; if the number of the clustering centers after clustering combination is not equal to the number of the clustering centers before clustering combination, returning to the step of executing to calculate the distance value between every two clustering centers in the data set, and combining the two clustering centers with the minimum distance value to generate a new clustering center; and if the number of the clustering centers after the clustering combination is equal to the number of the clustering centers before the clustering combination, generating a plurality of K line shapes without morphological names from the clustering centers, and taking the plurality of K line shapes without morphological names as second K line shapes.
In some embodiments, for example, in this embodiment, when the processor executes the computer program to implement the steps of obtaining enterprise information and industry information corresponding to the stock trading data from the database, and constructing a non-price feature vector according to the enterprise information and the industry information, the processor specifically implements the following steps: acquiring a stock code corresponding to the stock trading data; and acquiring enterprise information and industry information corresponding to the stock trading data from a database according to the stock codes, and constructing a non-price characteristic vector according to the enterprise information and the industry information.
In some embodiments, for example, in this embodiment, when the processor executes the computer program to implement the step of identifying and classifying the first K-line shape and the second K-line shape according to the feature vector of the non-valence quantity by using a preset classification model to obtain the target K-line shape, the following steps are specifically implemented: splicing the feature vector corresponding to the first K line state with the non-valence feature vector to obtain a first input vector; splicing the feature vector corresponding to the second K line shape with the non-valence feature vector to obtain a second input vector; and identifying and classifying the K line states corresponding to the first input vector and the second input vector through a random forest model to obtain a target K line state.
In some embodiments, for example, in this embodiment, after the processor executes the computer program to implement the step of identifying and classifying the first K-line shape and the second K-line shape according to the feature vector of the non-valence quantity by using a preset classification model to obtain the target K-line shape, the implementation further includes the following steps: judging whether the target K line form carries a preset favorable form mark or not; if the preset favorable form identifier is carried in the target K line form, pushing the target K line form to a user; and if the target K line shape does not carry the preset favorable shape identification, sending a risk prompt to a user.
The storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk, which can store various computer readable storage media.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative. For example, the division of each unit is only one logic function division, and there may be another division manner in actual implementation. For example, various elements or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented.
The steps in the method of the embodiment of the invention can be sequentially adjusted, combined and deleted according to actual needs. The units in the device of the embodiment of the invention can be merged, divided and deleted according to actual needs. In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a storage medium. Based on such understanding, the technical solution of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a terminal, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, while the invention has been described with respect to the above-described embodiments, it will be understood that the invention is not limited thereto but may be embodied with various modifications and changes.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A K-ray shape recognition and classification method is characterized by comprising the following steps:
acquiring stock transaction data in a preset time period, and constructing a price characteristic vector according to the stock transaction data;
respectively generating a first K line state and a second K line state according to the valence quantity feature vector through a preset K line state rule and a preset algorithm;
acquiring enterprise information and industry information corresponding to the stock trading data from a database, and constructing a non-price characteristic vector according to the enterprise information and the industry information;
and identifying and classifying the first K-line state and the second K-line state through a preset classification model according to the non-valence feature vector to obtain a target K-line state.
2. The method for identifying and classifying K-ray forms according to claim 1, wherein the generating a first K-ray form and a second K-ray form according to the valence eigenvector by a preset K-ray form rule and a preset algorithm respectively comprises:
generating a plurality of K line states with form names according to the valence quantity feature vector through a preset K line state rule, and taking the plurality of K line states with form names as first K line states;
and generating a plurality of K line states without form names through a preset algorithm according to the valence quantity feature vector, and taking the plurality of K line states without form names as second K line states.
3. The method for identifying and classifying K-ray line morphology according to claim 2, wherein the generating a plurality of K-ray line morphologies without morphology names by a preset algorithm according to the valence eigenvectors and using the plurality of K-ray line morphologies without morphology names as a second K-ray line morphology comprises:
taking all the price characteristic vectors as a data set, and taking each price characteristic vector as a clustering center;
calculating a distance value between every two clustering centers in the data set, and clustering and combining the two clustering centers with the minimum distance value to generate a new clustering center;
and returning to the step of calculating the distance value between every two clustering centers in the data set in the step of executing, clustering and merging the two clustering centers with the minimum distance value to generate a new clustering center until a preset clustering condition is not met, so as to generate a plurality of K line shapes without morphological names, and taking the plurality of K line shapes without morphological names as second K line shapes.
4. The method for identifying and classifying K-line shape according to claim 3, wherein the step of performing back to calculate a distance value between every two clustering centers in the data set, and clustering and merging the two clustering centers with the smallest distance value to generate a new clustering center until a preset clustering condition is not satisfied, so as to generate a plurality of K-line shapes without shape names, and taking the plurality of K-line shapes without shape names as a second K-line shape, comprises:
judging whether the number of the clustering centers after clustering combination is equal to the number of the clustering centers before clustering combination;
if the number of the clustering centers after clustering combination is not equal to the number of the clustering centers before clustering combination, returning to the step of executing to calculate the distance value between every two clustering centers in the data set, and combining the two clustering centers with the minimum distance value to generate a new clustering center;
and if the number of the clustering centers after the clustering combination is equal to the number of the clustering centers before the clustering combination, generating a plurality of K line shapes without morphological names from the clustering centers, and taking the plurality of K line shapes without morphological names as second K line shapes.
5. The K-ray form recognition classification method according to claim 1, wherein the step of obtaining enterprise information and industry information corresponding to the stock transaction data from a database and constructing a non-price quantity feature vector according to the enterprise information and the industry information comprises the steps of:
acquiring a stock code corresponding to the stock trading data;
acquiring enterprise information and industry information corresponding to the stock trading data from a database according to the stock codes;
enterprise valuation and industry valuation are respectively carried out according to the enterprise information and the industry information to obtain an enterprise valuation value and an industry valuation value;
and constructing a non-price characteristic vector according to the enterprise evaluation value and the industry evaluation value.
6. The method for identifying and classifying K-ray forms according to claim 1, wherein the identifying and classifying the first K-ray form and the second K-ray form according to the non-valence eigenvector through a preset classification model to obtain a target K-ray form comprises:
splicing the feature vector corresponding to the first K line state with the non-valence feature vector to obtain a first input vector;
splicing the feature vector corresponding to the second K line shape with the non-valence feature vector to obtain a second input vector;
and identifying and classifying the K line states corresponding to the first input vector and the second input vector through a random forest model to obtain a target K line state.
7. The method for identifying and classifying K-ray line morphology according to claim 1, wherein after the step of identifying and classifying the first K-ray line morphology and the second K-ray line morphology by a preset classification model according to the non-valence feature vector to obtain a target K-ray line morphology, the method further comprises:
judging whether the target K line form carries a preset favorable form mark or not;
if the preset favorable form identifier is carried in the target K line form, pushing the target K line form to a user;
and if the target K line shape does not carry the preset favorable shape identification, sending a risk prompt to a user.
8. A K-ray shape recognition and classification device is characterized by comprising:
the system comprises a first construction unit, a second construction unit and a third construction unit, wherein the first construction unit is used for acquiring stock transaction data in a preset time period and constructing price characteristic vectors according to the stock transaction data;
the generating unit is used for respectively generating a first K line state and a second K line state according to the valence quantity characteristic vector through a preset K line state rule and a preset algorithm;
the second construction unit is used for acquiring enterprise information and industry information corresponding to the stock transaction data from a database and constructing a non-price characteristic vector according to the enterprise information and the industry information;
and the identification and classification unit is used for identifying and classifying the first K-line state and the second K-line state through a preset classification model according to the non-valence feature vector to obtain a target K-line state.
9. A computer arrangement, characterized in that the computer arrangement comprises a memory having stored thereon a computer program and a processor implementing the method according to any of claims 1-7 when executing the computer program.
10. A computer-readable storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, implements the method according to any one of claims 1-7.
CN202110571189.XA 2021-05-25 2021-05-25 K-line form recognition and classification method and device, computer equipment and storage medium Pending CN113269643A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110571189.XA CN113269643A (en) 2021-05-25 2021-05-25 K-line form recognition and classification method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110571189.XA CN113269643A (en) 2021-05-25 2021-05-25 K-line form recognition and classification method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113269643A true CN113269643A (en) 2021-08-17

Family

ID=77232707

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110571189.XA Pending CN113269643A (en) 2021-05-25 2021-05-25 K-line form recognition and classification method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113269643A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023050331A1 (en) * 2021-09-30 2023-04-06 富途网络科技(深圳)有限公司 K-line form recognition method, and electronic device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023050331A1 (en) * 2021-09-30 2023-04-06 富途网络科技(深圳)有限公司 K-line form recognition method, and electronic device
US11928761B2 (en) 2021-09-30 2024-03-12 Futu Network Technology (Shenzhen) Co., Ltd Method for identifying K-line form and electronic device

Similar Documents

Publication Publication Date Title
CN110263821B (en) Training of transaction feature generation model, and method and device for generating transaction features
TW201905773A (en) Vehicle risk risk prediction method, device and server
WO2019061976A1 (en) Fund product recommendation method and apparatus, terminal device, and storage medium
US20090228233A1 (en) Rank-based evaluation
CN110991474A (en) Machine learning modeling platform
JP2003316950A (en) System and method for credit evaluation
CN109300050A (en) Insurance method for pushing, device and storage medium based on user's portrait
JP2013058192A (en) System, method and computer program product for parcel assessment
CN110609740A (en) Method and device for determining dependency relationship between tasks
CN114187112A (en) Training method of account risk model and determination method of risk user group
CN111125529A (en) Product matching method and device, computer equipment and storage medium
CN110443290B (en) Product competition relationship quantitative generation method and device based on big data
CN111105265A (en) Prediction method and device based on customer information, computer equipment and storage medium
CN111415180A (en) Resource value adjusting method, device, server and storage medium
CN111091287A (en) Risk object identification method and device and computer equipment
CN113269643A (en) K-line form recognition and classification method and device, computer equipment and storage medium
CN110688433A (en) Path-based feature generation method and device
CN114118816A (en) Risk assessment method, device and equipment and computer storage medium
CN114154712A (en) Data management method, data management device, equipment and storage medium
Durica et al. Financial distress prediction in Slovakia: An application of the CART algorithm.
CN111126788A (en) Risk identification method and device and electronic equipment
CN115905648A (en) Gaussian mixture model-based user group and financial user group analysis method and device
US11392857B1 (en) System and method for initiating a completed lading request
CN114418776A (en) Data processing method, device, terminal equipment and medium
KR102095022B1 (en) Method, device and program for trading stocks using articles analysis

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