CN105701450B - The recognition methods of K line morphology and device - Google Patents

The recognition methods of K line morphology and device Download PDF

Info

Publication number
CN105701450B
CN105701450B CN201511031705.0A CN201511031705A CN105701450B CN 105701450 B CN105701450 B CN 105701450B CN 201511031705 A CN201511031705 A CN 201511031705A CN 105701450 B CN105701450 B CN 105701450B
Authority
CN
China
Prior art keywords
line
window
rate
key point
channel
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.)
Active
Application number
CN201511031705.0A
Other languages
Chinese (zh)
Other versions
CN105701450A (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 Jindashi Network Technology Co ltd
Original Assignee
Shanghai Silver Competition Computer Science And Technology 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 Silver Competition Computer Science And Technology Co Ltd filed Critical Shanghai Silver Competition Computer Science And Technology Co Ltd
Priority to CN201511031705.0A priority Critical patent/CN105701450B/en
Publication of CN105701450A publication Critical patent/CN105701450A/en
Application granted granted Critical
Publication of CN105701450B publication Critical patent/CN105701450B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2218/00Aspects of pattern recognition specially adapted for signal processing
    • G06F2218/08Feature extraction
    • 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/06Asset management; Financial planning or analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2218/00Aspects of pattern recognition specially adapted for signal processing
    • G06F2218/12Classification; Matching

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Artificial Intelligence (AREA)
  • Game Theory and Decision Science (AREA)
  • Human Resources & Organizations (AREA)
  • Operations Research (AREA)
  • Signal Processing (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The invention discloses a kind of K line morphology recognition methods and devices, belong to field of computer technology.The described method includes: obtaining K line number evidence to be identified;Read the logical coordinates of the configuration parameter and each key point in form configuration file, the indicating predetermined form of form configuration file;According to the logical coordinates of configuration parameter and key point to K line number according to traversal identification is carried out, determine whether K line number evidence matches with predetermined form.The present invention solves in the prior art the artificially method of mark K line morphology, and, with more subjectivity, and for the K line of overabundance of data, graphics intensive, analyst is difficult to identify by naked eyes, the problem relatively high to the error rate of K line morphology identification;It can allow terminal is automatic, is rapidly performed by K line morphology to identify, abandon the subjectivity of manual identified.

Description

K-line form identification method and device
Technical Field
The invention relates to the technical field of computers, in particular to a K-line shape recognition method and device.
Background
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-line shapes include W-bottom, M-top, ascending channel, descending channel, etc. The existing K-ray form mainly depends on human recognition, and an analyst can mark each characteristic of the K-ray form through local amplification of a K-ray diagram by experience.
In the process of implementing the invention, the inventor finds that the prior art has at least the following problems: the existing method for artificially marking the K line state has more subjectivity, and for the K lines with excessive data and dense graphs, an analyst is difficult to recognize by naked eyes, and the error rate of the K line state recognition is higher.
Disclosure of Invention
In order to solve the problems that the method for artificially marking the K line form in the prior art has more subjectivity, and for the K lines with excessive data and dense graphs, an analyst is difficult to recognize by naked eyes, and the error rate of the K line form recognition is higher, the embodiment of the invention provides a K line form recognition method and a device. The technical scheme is as follows:
in a first aspect, a method for identifying a K-line state is provided, the method including:
acquiring K line data to be identified;
reading configuration parameters in a form configuration file and logic coordinates of each key point, wherein the form configuration file indicates a preset form;
and traversing and identifying the K-line data according to the configuration parameters and the logical coordinates of the key points, and determining whether the K-line data is matched with the preset form.
Optionally, the traversing and identifying the K-line data according to the configuration parameters and the logical coordinates of the key points, and determining whether the K-line data matches the predetermined form includes:
determining whether K lines within the first window constitute a shape matching the predetermined shape;
if the K lines in the first window form a form matched with the preset form, adding 1 to both the left boundary value and the right boundary value of the first window to obtain a second window, and further determining whether the K lines in the second window form a form matched with the preset form;
and when the K line in the first window does not form a form matched with the preset form, subtracting 1 from the right boundary value of the first window to obtain a third window, when the size of the third window is larger than the minimum value of the window, determining whether the K line in the third window forms a form matched with the preset form, and when the size of the third window is smaller than the minimum value of the window, determining whether the K line in the first window is matched with the preset form.
Optionally, the determining whether the K line in the first window matches the predetermined shape includes:
standardizing four data in each K line data, wherein the standardized numerical values are all between 0 and 1, and the four data in the K line data are the highest price, the lowest price, the opening price and the closing price corresponding to the K line;
calculating the logic position of each K line in the first window;
calculating an upper boundary line value and a lower boundary line value corresponding to each K line according to the logic position;
calculating a judgment parameter in the first window according to the numerical values of the four normalized data in the K line and the corresponding upper boundary line value and lower boundary line value, wherein the preset judgment parameter comprises at least one of a point breakthrough rate, a key point error rate, a channel breakthrough rate, a channel defect rate and an adaptation rate;
and determining that the K line data in the first window is matched with the preset form according to the judgment parameter.
Optionally, the calculating the logical position of each K line in the first window includes:
acquiring the initial position of a channel corresponding to the first window and the size of the first window;
and for each K line, subtracting the initial position from the index position of the K line, and dividing the obtained difference value by the size of the first window to obtain the logic position of the K line in the first window.
Optionally, the calculating an upper boundary line value and a lower boundary line value corresponding to each K line according to the logical position includes:
for each K line, determining a first upper boundary key point nearest to the left side of the K line and a second upper boundary key point nearest to the right side of the K line, acquiring a first connecting line between the first upper boundary key point and the second upper boundary key point, calculating a first intersection point of an extension line of the K line and the first connecting line, and determining a vertical coordinate of the first intersection point as an upper boundary line value of the K line;
determining a first lower boundary key point nearest to the left side of the K line and a second lower boundary key point nearest to the right side of the K line, acquiring a second connecting line between the first lower boundary key point and the second lower boundary key point, calculating a second intersection point of an extension line of the K line and the second connecting line, and determining a vertical coordinate of the second intersection point as a lower boundary line value of the K line.
Optionally, the calculating a determination parameter in the first window according to the numerical value obtained by normalizing the four data in the K line and the corresponding upper boundary line value and lower boundary line value includes:
for each K line in the first window, when the highest point of the K line exceeds the upper boundary line of the channel of the first window, calculating the upward breakthrough rate of the K line, and when the lowest point of the K line exceeds the lower boundary line of the channel, calculating the downward breakthrough rate of the K line;
or,
for each key point in the first window, respectively calculating the sum of the upper difference values and the sum of the lower difference values of the key point, a first point before the key point and a second point after the key point, adding the obtained sum of the upper difference values to the obtained sum of the lower difference values, and dividing the obtained sum value by 2 times of the number of the key points to obtain the error rate of the key point;
or,
counting the number of K lines which break through upwards and the number of K lines which break through downwards of the first window, adding the number of K lines which break through upwards to the number of K lines which break through downwards, and dividing the obtained sum value by 2 times of the size of the first window to obtain a channel break-through rate;
or,
counting the sum of the upper defect values and the lower defect values of all K lines in the first window, and dividing the sum by the size of the first window to obtain a channel defect rate;
or,
and calculating the sum of the error rate of the key points, the breakthrough rate of the channel and the defect rate of the channel, and subtracting the sum from 1 to obtain the adaptation rate.
Optionally, the determining, according to the determination parameter, whether the K-line data in the first window constitutes a shape matching the predetermined shape includes:
when the upward breakthrough rate of any K line exceeds a first point breakthrough rate threshold or the downward breakthrough rate exceeds a second point breakthrough rate threshold, or the key point error rate exceeds a key point error rate threshold, or the channel breakthrough rate exceeds a channel breakthrough rate threshold, or the channel defect rate exceeds a channel defect rate threshold, or the adaptation rate is smaller than a lowest adaptation rate threshold, judging that the K line data in the first window is not matched with the preset form;
and when the upward breakthrough rate of any K line does not exceed a first point breakthrough rate threshold or the downward breakthrough rate exceeds a second point breakthrough rate threshold, the key point error rate does not exceed a key point error rate threshold, the channel breakthrough rate exceeds a channel breakthrough rate threshold, the channel defect rate does not exceed a channel defect rate threshold, and the adaptation rate is greater than a lowest adaptation rate threshold, judging that the K line data in the first window is matched with the preset form.
In a second aspect, there is provided a K-line shape recognition apparatus, the apparatus comprising:
the acquisition module is used for acquiring K line data to be identified;
the reading module is used for reading configuration parameters in a form configuration file and the logic coordinates of each key point, wherein the form configuration file indicates a preset form;
and the determining module is used for performing traversal identification on the K-line data according to the configuration parameters and the logic coordinates of the key points, and determining whether the K-line data is matched with the preset form.
Optionally, the determining module includes:
a first determination unit for determining whether the K lines within the first window constitute a shape matching the predetermined shape;
a second determining unit, configured to add 1 to both the left boundary value and the right boundary value of the first window to obtain a second window if the K lines in the first window form a shape matching the predetermined shape, and further determine whether the K lines in the second window form a shape matching the predetermined shape;
a third determining unit, configured to, if the K line in the first window does not form a shape that matches the predetermined shape, subtract 1 from the right boundary value of the first window to obtain a third window, determine, when the size of the third window is larger than the minimum value of the window, whether the K line in the third window forms a shape that matches the predetermined shape, and, when the size of the third window is smaller than the minimum value of the window, determine, whether the K line in the first window matches the predetermined shape.
Optionally, the third determining unit includes:
the first calculation unit is used for standardizing four data in each K line data, the standardized numerical values are all located between 0 and 1, and the four data in the K line data are the highest price, the lowest price, the opening price and the closing price corresponding to the K line;
the second calculation unit is used for calculating the logic position of each K line in the first window;
the third calculating unit is used for calculating an upper boundary line value and a lower boundary line value corresponding to each K line according to the logic position;
a fourth calculating unit, configured to calculate a determination parameter in the first window according to the normalized values of the four data in the K line and the corresponding upper boundary line value and lower boundary line value, where the predetermined determination parameter includes at least one of a point breakthrough rate, a key point error rate, a channel breakthrough rate, a channel loss rate, and an adaptation rate;
and the third determining unit is used for determining that the K line data in the first window is matched with the preset form according to the judgment parameter.
Optionally, the second computing unit includes:
the acquisition unit is used for acquiring the initial position of a channel corresponding to the first window and the size of the first window;
and the fifth calculation unit is used for subtracting the initial position from the index position of the K line and dividing the obtained difference value by the size of the first window to obtain the logic position of the K line in the first window.
Optionally, the third computing unit includes:
a fourth determining unit, configured to determine, for each K line, a first upper boundary key point located closest to the left side of the K line and a second upper boundary key point located closest to the right side of the K line, obtain a first connection line between the first upper boundary key point and the second upper boundary key point, calculate a first intersection point of an extension line of the K line and the first connection line, and determine a vertical coordinate of the first intersection point as an upper boundary line value of the K line;
a fifth determining unit, configured to determine a first lower boundary key point located closest to the left side of the K line and a second lower boundary key point located closest to the right side, obtain a second connection line between the first lower boundary key point and the second lower boundary key point, calculate a second intersection point between an extension line of the K line and the second connection line, and determine a vertical coordinate of the second intersection point as a lower boundary line value of the K line.
Optionally, the fourth calculating unit includes:
a sixth calculating unit, configured to calculate, for each K line in the first window, an upward breakthrough rate of the K line when a highest point of the K line exceeds an upper boundary line of a channel of the first window, and calculate a downward breakthrough rate of the K line when a lowest point of the K line exceeds a lower boundary line of the channel;
or,
a seventh calculating unit, configured to calculate, for each key point in the first window, a sum of upper differences and a sum of lower differences of the key point, a first point before the key point, and a second point after the key point, respectively, add the obtained sum of the upper differences to the obtained sum of the lower differences, and divide the obtained sum by 2 times of the number of the key points to obtain an error rate of the key point;
or,
the eighth calculating unit is used for counting the number of the K lines which break through upwards and the number of the K lines which break through downwards of the first window, adding the number of the K lines which break through upwards to the number of the K lines which break through downwards, and dividing the obtained sum value by 2 times of the size of the first window to obtain the channel breakthrough rate;
or,
a ninth calculating unit, configured to count a sum of upper defect values and lower defect values of all K lines in the first window, and divide the sum by the size of the first window to obtain a channel defect rate;
or,
and the tenth calculating unit is used for calculating a sum of the error rate of the key points, the breakthrough rate of the channels and the defect rate of the channels, and subtracting the sum from 1 to obtain the adaptation rate.
Optionally, the third determining unit includes:
a first determining unit, configured to determine that K-line data in the first window is not matched with the predetermined form when an upward breakthrough rate of any K-line exceeds a first point breakthrough rate threshold or a downward breakthrough rate exceeds a second point breakthrough rate threshold, or the key point error rate exceeds a key point error rate threshold, or the channel breakthrough rate exceeds a channel breakthrough rate threshold, or the channel defect rate exceeds a channel defect rate threshold, or the adaptation rate is smaller than a lowest adaptation rate threshold;
and the second judging unit is used for judging that the K line data in the first window is matched with the preset form when the upward breakthrough rate of any K line does not exceed the first point breakthrough rate threshold or the downward breakthrough rate exceeds the second point breakthrough rate threshold, the key point error rate does not exceed the key point error rate threshold, the channel breakthrough rate exceeds the channel breakthrough rate threshold, the channel defect rate does not exceed the channel defect rate threshold, and the adaptation rate is greater than the lowest adaptation rate threshold.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
traversing and identifying the K line data to be identified according to configuration parameters in a form configuration file and logic coordinates of each key point by acquiring the K line data to be identified; the form configuration file indicates a preset form and traverses and identifies the K line data to determine whether the K line data is matched with the preset form, so that the problems that a method for artificially marking the K line form in the prior art has more subjectivity, and for the K lines with excessive data and dense graphs, an analyst is difficult to identify by naked eyes and the error rate of K line form identification is higher are solved; the terminal can automatically and quickly identify the K-ray state, and the subjectivity of manual identification is abandoned.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only 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 diagram of an implementation environment of a morphology recognition system according to a K-ray morphology recognition method provided in an embodiment of the present invention;
FIG. 2A is a flow chart of a method for K-line shape recognition provided in one embodiment of the present invention;
FIG. 2B is a schematic diagram of a chart reflecting the change of data over time provided in one embodiment of the present invention;
FIG. 2C is a schematic illustration of a design interface provided as a visualization in one embodiment of the invention;
FIG. 3A is a flow chart of a method for K-ray shape recognition provided in another embodiment of the present invention;
FIG. 3B is a flowchart of a method for determining whether K lines within the first window match the predetermined shape according to one embodiment of the present invention;
fig. 4A is a block diagram illustrating a configuration of a K-line shape recognition apparatus according to an embodiment of the present invention;
fig. 4B is a block diagram of a configuration of a K-line shape recognition apparatus according to another embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Fig. 1 is a schematic diagram of an implementation environment of a morphology recognition system related to a K-ray morphology recognition method provided in an embodiment of the present invention. The implementation environment may include at least a morphology designer 110, a third party application 120, and a morphology recognition module 130.
A first possible implementation:
the configuration data of the form parameters refers to a configuration document which can be used by a user to design forms by using a visual form designer and store form parameter XML.
The K-line data is provided to the third party application 120 in a plug-in manner by the modality recognition module 130. The form recognition module 130 is only used as an analysis tool, the third-party application 120 needs to transmit K-line data to be recognized, and when the form recognition module 130 completes analysis of the K-line data, an analysis result is output to the third-party application 120.
The form recognition module is a DLL and can be loaded by a third-party application program, and the form recognition module can read in all K line data to be recognized, load configuration documents of form parameters XML and then automatically evaluate and recognize the mode of the K line.
The form recognition module 130 is associated with the form designer 110 through a configuration document of the form parameter XML, and when the form designer 110 generates the configuration document of the form parameter XML, the form recognition module 130 loads the configuration document.
After the third-party application 120 transmits the K-line data to be identified to the form identification module 130 through the module interface, the form identification module 130 divides the K-line into a plurality of window channels, and performs traversal analysis one by one, converts the physical coordinate data of the K-line of the channel into logical coordinate data, performs evaluation according to various form indexes according to parameters set by the configuration document, and feeds back the output result to the third-party application 120.
The morphological designer 110 is a visual design tool and the user-designed modalities are visible or available.
The user may save the designed form to the configuration document of the form parameter XML, and may also load the configuration document to be displayed to the form designer 110, that is, the form designer 110 has save and load functions.
The form recognition module 130 provides only the calculation and analysis functions and does not provide the display function. The third-party application 120 generally has a K-line display function, and after receiving the result set output by the form recognition module 130, the third-party application 120 draws a corresponding form line according to the specified position of the result set on the K-line display screen.
A second possible implementation:
the morphological designer 110 may import K-line data and display K-lines based on the K-line data. When the user selects the K line area and performs the form drawing, the user can adjust the set values of various index parameters in the form drawing in real time by referring to the K line displayed by the form designer 110;
the user can select the morphological recognition evaluation index (for example, several of the point breakthrough rate, the key point error rate, the channel breakthrough rate, and the lowest adaptation rate) from the morphological designer 110, and other index parameters can be ignored.
A third possible implementation:
the morphology designer 110 may add a closing line to form three upper, middle, and lower traces, with the center line (i.e., closing line) as the reference, and the highest and lowest points of the non-channel may be regarded as the logical coordinates of the K-line region.
If there are multiple channel adaptation modalities, the modality designer 110 may pop-up to remind the user.
Fig. 2A is a flowchart of a method for identifying a K-line pattern according to an embodiment of the present invention, where the method for identifying a K-line pattern is applied to the implementation environment shown in fig. 1. In fig. 2A, the K-line shape recognition method includes:
step 201, acquiring K line data to be identified.
Referring to fig. 2B, a diagram of a graph reflecting the change rule of data with time according to an embodiment of the present invention is shown. A group of data curves is displayed in the graph, each data curve 11 in the group is in a two-dimensional rectangular coordinate system formed by a time axis 12 and a data axis 13, and each data curve 11 is formed by sequentially connecting a plurality of sampling points. For each sampling point of each data curve, the abscissa (i.e., the coordinate on the time axis 12) is the sampling time, and the ordinate (i.e., the coordinate on the data axis 13) is the statistical data corresponding to the sampling time, and the statistical time period of the statistical data corresponding to the sampling time is different in each data curve. For example, for the kth data curve, the statistical data corresponding to the sampling time in the data curve is obtained by counting the data within a predetermined time period from the sampling time onward. And when K is different, the preset time length is also different. The data may be various types of data including closing price, humidity, price, yield, etc. in the stock market.
Step 202, reading configuration parameters and logical coordinates of each key point in a configuration file, wherein the configuration file indicates a predetermined configuration.
The form designer can provide a visual design interface, and a user designs various forms by himself, and the user only needs to drag the dotted line to design the forms, set each parameter, and store configuration documents of different form parameters XML.
Referring to FIG. 2C, a diagram of a design interface that is a visualization provided in one embodiment of the invention is shown. Each K line shape is composed of an upper boundary line and a lower boundary line, L1 represents an upper boundary line, L2 represents a lower boundary line, each boundary line is composed of 2 or more key points (for example, the key points in L1 are from point a to point C, and the key points in L2 are from point D to point F), the number of the key points in each line may not be the same, but the first point and the last point must be aligned, that is, the positions of the X axis are the same, the key points are connected by line segments to form the boundary line, the upper boundary line and the lower boundary line form a channel, and the upper boundary line and the lower boundary line cannot have intersections.
In the form designer, the X coordinates and the Y coordinates of all key points are logical coordinates rather than physical coordinates, and the form recognition module is designed with a variable sliding window in order to adapt to the maximum period as much as possible.
Where X corresponds to the relative position of the K line within the window, which is a percentage of the entire window length. That is, the first points of the upper and lower boundary points have X of 0 and the last points have X of 100.
Wherein the Y coordinate of the keypoint is a percentage of the window height. The Y coordinate of the window refers to the composition of the highest point and the lowest point of the period in the window, wherein the highest point is 100, and the lowest point is 0.
Correspondingly, in the form recognition module, all the related data of the K lines in the channel should be converted into the corresponding logical coordinates of the Y axis.
Step 203, traversing and identifying the K-line data according to the configuration parameters and the logical coordinates of the key points, and determining whether the K-line data is matched with a preset form.
In summary, in the K-line shape identification method provided in the embodiment of the present invention, the K-line data to be identified is obtained, and the traversal identification is performed on the K-line data according to the configuration parameters in the shape configuration file and the logical coordinates of each key point; the form configuration file indicates a preset form and traverses and identifies the K line data to determine whether the K line data is matched with the preset form, so that the problems that a method for artificially marking the K line form in the prior art has more subjectivity, and for the K lines with excessive data and dense graphs, an analyst is difficult to identify by naked eyes and the error rate of K line form identification is higher are solved; the terminal can automatically and quickly identify the K-ray state, and the subjectivity of manual identification is abandoned.
Fig. 3A is a flowchart of a method for identifying a K-line pattern according to another embodiment of the present invention, which is applied to the implementation environment shown in fig. 1. In fig. 3A, the K-line shape recognition method includes:
step 301, acquiring K-line data to be identified.
Step 302, reading configuration parameters and logical coordinates of each key point in a configuration file, wherein the configuration file indicates a predetermined configuration.
Step 301 is similar to step 201, and step 302 is similar to step 202, and for details, reference may be made to the description in step 301 to step 302, which is not described herein again.
Step 303, determine if the K lines in the first window constitute a shape matching the predetermined shape.
Step 304, if the K lines in the first window form a shape matching the predetermined shape, then add 1 to both the left boundary value and the right boundary value of the first window to obtain a second window, and further determine whether the K lines in the second window form a shape matching the predetermined shape.
For example, the parameter sets the maximum period to be 50, the minimum period to be 20, if the current K line position index is 100, first scan whether the K lines in the window [ 100-.
Step 305, if the K line in the first window does not form a shape matching the predetermined shape, subtracting 1 from the right boundary value of the first window to obtain a third window, determining whether the K line in the third window forms a shape matching the predetermined shape when the size of the third window is larger than the minimum value of the window, and determining whether the K line in the first window matches the predetermined shape when the size of the third window is smaller than the minimum value of the window.
For example, setting the minimum value of the window to 120, first, whether the K lines in the scanning window [ 100-.
FIG. 3B is a flowchart illustrating a method for determining whether the K line in the first window matches the predetermined shape according to an embodiment of the present invention. In fig. 3B, the method for determining whether the K line in the first window matches the predetermined shape comprises:
and 305a, normalizing the four data in each piece of K line data, wherein the normalized values are all between 0 and 1.
Four data in the K-line data described here are the maximum price, minimum price, opening price, and closing price corresponding to the K-line.
Firstly, calculating the highest price point and the lowest price point of a K line in a channel, wherein the standardization formula of all K line data is as follows:
normalized data (data before normalization-lowest point)/(highest point-lowest point)
Wherein after normalization, the data are all between 0 and 1.
And temporarily storing the data of the standardized maximum price, the standardized opening price, the standardized minimum price and the standardized closing price corresponding to the K line in an array, wherein the array of the standardized maximum price is represented by High [ ], the array of the standardized opening price is represented by Open [ ], the array of the standardized minimum price is represented by Low [ ], and the array of the standardized closing price is represented by Close [ ].
Note that, except for the calculation formula of step 305a, the data before normalization is used, and the calculation formulas related to the other steps all use the normalized data.
Step 305b, calculate the logical position of each K line in the first window.
Optionally, the starting position of the channel corresponding to the first window and the size of the first window are obtained, for each K line, the starting position is subtracted from the index position of the K line, and the obtained difference is divided by the size of the first window to obtain the logical position of the K line in the first window.
The configuration document of the form parameter XML stores the logical coordinates of the key points, and the boundary line is formed by connecting line segments of the key points, so that the boundary line corresponding to each K line needs to be calculated.
Window represents the Window size, N represents the relative channel position of K line, and the calculation formula for converting the position of K line of Window into logic position is: and X is N/Window.
For example, the channel start position is 100, the window size is 40, the current K-line index position is 120, that is, the deviation channel position is 20, and then X is 20/40 is 0.5.
And step 305c, calculating an upper boundary line value and a lower boundary line value corresponding to each K line according to the logic position.
Optionally, for each K line, a first upper boundary key point located closest to the left side of the K line and a second upper boundary key point located closest to the right side of the K line are determined, a first connection line between the first upper boundary key point and the second upper boundary key point is obtained, a first intersection point of an extension line of the K line and the first connection line is calculated, and a vertical coordinate of the first intersection point is determined as an upper boundary line value of the K line.
Optionally, a first lower boundary key point nearest to the left of the K line and a second lower boundary key point nearest to the right of the K line are determined, a second connection line between the first lower boundary key point and the second lower boundary key point is obtained, a second intersection point of the extension line of the K line and the second connection line is calculated, and a vertical coordinate of the second intersection point is determined as a lower boundary line value of the K line.
The calculation formula of the slopes of the adjacent key points in the K line is as follows: b ═ (Y1-Y2)/(X1-X2).
The formula for calculating the constants is: C-Y1-B X1
According to the slope and the constant of the adjacent key points in the K line, the calculation formula of the boundary line Y value corresponding to the K line of the channel is as follows: y ═ B × X + C.
And storing the data of the channel K line corresponding to the upper and lower boundaries into a temporary array. Wherein the array of upper boundary lines is represented by upBound [ ], and the array of lower boundary lines is represented by lowBound [ ].
Step 305d, calculating the decision parameter in the first window according to the normalized values of the four data in the K line and the corresponding upper boundary line value and lower boundary line value.
The predetermined decision parameter includes at least one of a point breakthrough rate, a key point error rate, a channel breakthrough rate, a channel loss rate, and an adaptation rate.
Optionally, for each K line in the first window, when the highest point of the K line exceeds the upper boundary line of the channel of the first window, the upward breakthrough rate of the K line is calculated, and when the lowest point of the K line exceeds the lower boundary line of the channel, the downward breakthrough rate of the K line is calculated.
Wherein, the breakthrough rate comprises an upward breakthrough rate and a downward breakthrough rate.
The upward breakthrough rate refers to the probability that the highest point of the K line exceeds the upper boundary line, and the calculation formula is as follows:
upward breakthrough rate (highest point-upper boundary line)/upper boundary line
The downward breakthrough rate refers to the probability that the lowest point of the K line breaks through the lower boundary line, and the calculation formula is as follows:
downward breakthrough rate ═ lower boundary line-lowest point)/lower boundary line
Optionally, for each key point in the first window, the sum of the upper difference values and the sum of the lower difference values of the key point, the first point before the key point, and the second point after the key point are respectively calculated, the obtained sum of the upper difference values is added to the obtained sum of the lower difference values, and the obtained sum is divided by 2 times of the number of the key points to obtain the error rate of the key point.
The keypoint is usually an inflection point, and the calculation formula of the keypoint error rate (KeyPointErrorRate) is as follows:
KeyPointErrorRate=(UpErrorArea+LowErrorArea)/2/KeyPointNum
wherein, UperrorAREA refers to the sum of differences of all key points and 2 points before and after the key points, LowErrorAREA refers to the sum of differences of all key points and 2 points before and after the key points, and KeyPointNum refers to the number of the key points.
Optionally, the number of the K lines that make upward breakthrough and the number of the K lines that make downward breakthrough in the first window are counted, the number of the K lines that make upward breakthrough is added to the number of the K lines that make downward breakthrough, and the obtained sum is divided by 2 times of the size of the first window to obtain the channel breakthrough rate.
From this, the channel breakthrough rate (channelbreakouutrrate) is calculated by the following formula:
ChannelBreakoutRate=(UpBreakoutNum+LowBreakoutNum)/(2*Window)
wherein, UpBreakoutnum refers to the number of K lines which break through upwards in the statistical channel, and LowBreakoutnum refers to the number of K lines which break through downwards in the statistical channel.
Optionally, the sum of the upper defect value and the lower defect value of all K lines in the first window is counted, and the sum is divided by the size of the first window to obtain the channel defect rate.
From this, the channel defect rate (ChannelErrorRate) is calculated by the following formula:
ChannelErrorRate=ErrorAreaTotal/Window;
where ErrorARenaTotal refers to the total area of the defect.
Optionally, a sum of the error rate of the key points, the channel breakthrough rate and the channel defect rate is calculated, and the sum is subtracted from 1 to obtain the adaptation rate.
It can be seen that the formula for calculating the adaptation rate (FitnessRate) is:
FitnessRate=1–PointErrorRate–ChannelBreakoutRate-ChannelErrorRate
step 305e, determining that the K-line data in the first window matches the predetermined shape according to the decision parameter.
Optionally, when the upward breakthrough rate of any K line exceeds the first point breakthrough rate threshold or the downward breakthrough rate exceeds the second point breakthrough rate threshold, or the key point error rate exceeds the key point error rate threshold, or the channel breakthrough rate exceeds the channel breakthrough rate threshold, or the channel defect rate exceeds the channel defect rate threshold, or the adaptation rate is smaller than the lowest adaptation rate threshold, it is determined that the K line data in the first window is not matched with the predetermined form.
Optionally, when the upward breakthrough rate of any K line does not exceed the first point breakthrough rate threshold or the downward breakthrough rate exceeds the second point breakthrough rate threshold, and the key point error rate does not exceed the key point error rate threshold, and the channel breakthrough rate exceeds the channel breakthrough rate threshold, and the channel defect rate does not exceed the channel defect rate threshold, and the adaptation rate is greater than the lowest adaptation rate threshold, it is determined that the K line data in the first window is matched with the predetermined form.
In summary, in the K-line shape identification method provided in the embodiment of the present invention, the K-line data to be identified is obtained, and the traversal identification is performed on the K-line data according to the configuration parameters in the shape configuration file and the logical coordinates of each key point; the form configuration file indicates a preset form and traverses and identifies the K line data to determine whether the K line data is matched with the preset form, so that the problems that a method for artificially marking the K line form in the prior art has more subjectivity, and for the K lines with excessive data and dense graphs, an analyst is difficult to identify by naked eyes and the error rate of K line form identification is higher are solved; the terminal can automatically and quickly identify the K-ray state, and the subjectivity of manual identification is abandoned.
Fig. 4A is a block diagram illustrating a structure of a K-line pattern recognition apparatus according to an embodiment of the present invention, which is applied to the implementation environment shown in fig. 1. In fig. 4A, the K-line shape recognition apparatus includes: an acquisition module 401, a reading module 402 and a determination module 403.
An obtaining module 401, configured to obtain K line data to be identified;
a reading module 402, configured to read configuration parameters and logical coordinates of each key point in a form configuration file, where the form configuration file indicates a predetermined form;
the determining module 403 is configured to perform traversal identification on the K-line data according to the configuration parameters and the logical coordinates of the key points, and determine whether the K-line data matches a predetermined form.
In a possible implementation manner, please refer to fig. 4B, which is a block diagram of a structure of a K-line shape recognition apparatus provided in another embodiment of the present invention, where the determining module 403 may include: a first determination unit 403a, a second determination unit 403b and a third determination unit 403 c.
A first determining unit 403a for determining whether the K lines in the first window constitute a shape matching a predetermined shape;
a second determining unit 403b, configured to add 1 to both the left boundary value and the right boundary value of the first window to obtain a second window if the K lines in the first window form a shape matching the predetermined shape, and further determine whether the K lines in the second window form a shape matching the predetermined shape;
a third determining unit 403c, configured to subtract 1 from the right boundary value of the first window to obtain a third window if the K lines in the first window do not form a shape matching the predetermined shape, determine whether the K lines in the third window form a shape matching the predetermined shape if the size of the third window is larger than the minimum value of the window, and determine whether the K lines in the first window match the predetermined shape if the size of the third window is smaller than the minimum value of the window.
In one possible implementation, still referring to fig. 4B, the third determining unit 403c may include: a first calculation unit 403c1, a second calculation unit 403c2, a third calculation unit 403c3, a fourth calculation unit 403c4, and a third determination unit 403c 5.
The first calculating unit 403c1 is configured to normalize four data in each piece of K line data, where the normalized values are all located between 0 and 1, and the four data in the K line data are the highest price, the lowest price, the opening price, and the closing price corresponding to the K line;
a second calculating unit 403c2, configured to calculate a logical position of each K line in the first window;
a third calculating unit 403c3, configured to calculate, according to the logical position, an upper boundary line value and a lower boundary line value corresponding to each K line;
a fourth calculating unit 403c4, configured to calculate a determination parameter in the first window according to the normalized values of the four data in the K line and corresponding upper boundary line values and lower boundary line values, where the predetermined determination parameter includes at least one of a point breakthrough rate, a key point error rate, a channel breakthrough rate, a channel loss rate, and an adaptation rate;
the third determining unit 403c5 is configured to determine that the K-line data in the first window matches the predetermined shape according to the determination parameter.
In one possible implementation, still referring to fig. 4B, the second computing unit 403c2 may include: an obtaining unit 403c2a and a fifth calculating unit 403c2 b.
An obtaining unit 403c2a, configured to obtain a starting position of a channel corresponding to a first window and a size of the first window;
a fifth calculating unit 403c2b, configured to, for each K line, subtract the start position from the index position of the K line, and divide the obtained difference by the size of the first window to obtain the logical position of the K line within the first window.
In one possible implementation, still referring to fig. 4B, the third computing unit 403c3 may include: a fourth determination unit 403c3a and a fifth determination unit 403c3 b.
A fourth determining unit 403c3a, configured to determine, for each K line, a first upper boundary key point located closest to the left side of the K line and a second upper boundary key point located closest to the right side of the K line, obtain a first connecting line between the first upper boundary key point and the second upper boundary key point, calculate a first intersection point of an extension line of the K line and the first connecting line, and determine a ordinate of the first intersection point as an upper boundary line value of the K line;
a fifth determining unit 403c3b, configured to determine a first lower boundary key point located closest to the left of the K-line and a second lower boundary key point located closest to the right of the K-line, obtain a second connection line between the first lower boundary key point and the second lower boundary key point, calculate a second intersection point between an extension line of the K-line and the second connection line, and determine a vertical coordinate of the second intersection point as a lower boundary line value of the K-line.
In one possible implementation, still referring to fig. 4B, the fourth computing unit 403c4 includes: a sixth calculation unit 403c4a, a seventh calculation unit 403c4b, an eighth calculation unit 403c4c, a ninth calculation unit 403c4d, and a tenth calculation unit 403c4 e.
A sixth calculating unit 403c4a, configured to, for each K line in the first window, calculate an upward breakthrough rate of the K line when the highest point of the K line exceeds the upper boundary line of the channel of the first window, and calculate a downward breakthrough rate of the K line when the lowest point of the K line exceeds the lower boundary line of the channel;
or,
a seventh calculating unit 403c4b, configured to calculate, for each keypoint in the first window, a sum of upper differences and a sum of lower differences of the keypoint, a first point before the keypoint, and a second point after the keypoint, respectively, add the obtained sum of upper differences to the obtained sum of lower differences, and divide the obtained sum by 2 times of the number of the keypoints, so as to obtain a keypoint error rate;
or,
an eighth calculating unit 403c4c, configured to count the number of upward-breakthrough K lines and the number of downward-breakthrough K lines of the first window, add the number of upward-breakthrough K lines to the number of downward-breakthrough K lines, and divide the obtained sum by 2 times of the size of the first window to obtain a channel breakthrough rate;
or,
a ninth calculating unit 403c4d, configured to count a sum of upper defect values and lower defect values of all K lines in the first window, and divide the sum by the size of the first window to obtain a channel defect rate;
or,
a tenth calculating unit 403c4e, configured to calculate a sum of the key point error rate, the channel breakthrough rate and the channel defect rate, and subtract the sum from 1 to obtain the adaptation rate.
In one possible implementation, still referring to fig. 4B, the third determining unit 403c5 includes: a first decision unit 403c5a and a second decision unit 403c5 b.
A first determining unit 403c5a, configured to determine that the K line data in the first window does not match the predetermined form when the upward breakthrough rate of any one K line exceeds a first point breakthrough rate threshold or the downward breakthrough rate exceeds a second point breakthrough rate threshold, or the key point error rate exceeds a key point error rate threshold, or the channel breakthrough rate exceeds a channel breakthrough rate threshold, or the channel loss rate exceeds a channel loss rate threshold, or the adaptation rate is smaller than a minimum adaptation rate threshold;
a second determining unit 403c5b, configured to determine that the K line data in the first window matches the predetermined shape when the upward breakthrough rate of any one K line does not exceed the first point breakthrough rate threshold or the downward breakthrough rate exceeds the second point breakthrough rate threshold, the key point error rate does not exceed the key point error rate threshold, the channel breakthrough rate exceeds the channel breakthrough rate threshold, the channel loss rate does not exceed the channel loss rate threshold, and the adaptation rate is greater than the lowest adaptation rate threshold.
In summary, the K-line shape recognition apparatus provided in the embodiment of the present invention performs traversal recognition on K-line data to be recognized by obtaining the K-line data, according to configuration parameters in a shape configuration file and logical coordinates of each key point; the form configuration file indicates a preset form and traverses and identifies the K line data to determine whether the K line data is matched with the preset form, so that the problems that a method for artificially marking the K line form in the prior art has more subjectivity, and for the K lines with excessive data and dense graphs, an analyst is difficult to identify by naked eyes and the error rate of K line form identification is higher are solved; the terminal can automatically and quickly identify the K-ray state, and the subjectivity of manual identification is abandoned.
It should be noted that: the K-line shape recognition apparatus provided in the above embodiment is only illustrated by dividing the functional modules when recognizing the K-line shape, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the terminal is divided into different functional modules to complete all or part of the functions described above. In addition, the K-line shape recognition apparatus provided in the above embodiments and the K-line shape recognition method embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments and are not described herein again.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (11)

1. A K-line shape recognition method, the method comprising:
acquiring K line data to be identified;
reading configuration parameters in a form configuration file and logic coordinates of each key point, wherein the form configuration file indicates a preset form;
determining whether K lines within the first window constitute a shape matching the predetermined shape;
if the K lines in the first window form a form matched with the preset form, adding 1 to both the left boundary value and the right boundary value of the first window to obtain a second window, and further determining whether the K lines in the second window form a form matched with the preset form;
if the K lines in the first window do not form a form matched with the preset form, subtracting 1 from the right boundary value of the first window to obtain a third window, when the size of the third window is larger than the minimum value of the window, determining whether the K lines in the third window form a form matched with the preset form, and when the size of the third window is smaller than the minimum value of the window, standardizing four data in each piece of K line data, wherein the standardized values are all between 0 and 1, and the four pieces of K line data are the highest price, the lowest price, the opening price and the closing price corresponding to the K lines; calculating the logic position of each K line in the first window; calculating an upper boundary line value and a lower boundary line value corresponding to each K line according to the logic position; calculating a judgment parameter in the first window according to the numerical values of the four normalized data in the K line and the corresponding upper boundary line value and lower boundary line value, wherein the judgment parameter comprises at least one of a point breakthrough rate, a key point error rate, a channel breakthrough rate, a channel defect rate and an adaptation rate; and determining whether the K line data in the first window is matched with the preset form or not according to the judgment parameter.
2. The method of claim 1, wherein calculating the logical position of each K-line within the first window comprises:
acquiring the initial position of a channel corresponding to the first window and the size of the first window;
and for each K line, subtracting the initial position from the index position of the K line, and dividing the obtained difference value by the size of the first window to obtain the logic position of the K line in the first window.
3. The method of claim 1, wherein calculating the upper boundary line value and the lower boundary line value corresponding to each K line according to the logical position comprises:
for each K line, determining a first upper boundary key point nearest to the left side of the K line and a second upper boundary key point nearest to the right side of the K line, acquiring a first connecting line between the first upper boundary key point and the second upper boundary key point, calculating a first intersection point of an extension line of the K line and the first connecting line, and determining a vertical coordinate of the first intersection point as an upper boundary line value of the K line;
determining a first lower boundary key point nearest to the left side of the K line and a second lower boundary key point nearest to the right side of the K line, acquiring a second connecting line between the first lower boundary key point and the second lower boundary key point, calculating a second intersection point of an extension line of the K line and the second connecting line, and determining a vertical coordinate of the second intersection point as a lower boundary line value of the K line.
4. The method of claim 1, wherein calculating the decision parameter in the first window according to the normalized values of the four data in the K-line and the corresponding upper boundary line value and lower boundary line value comprises:
for each K line in the first window, when the highest point of the K line exceeds the upper boundary line of the channel of the first window, calculating the upward breakthrough rate of the K line, and when the lowest point of the K line exceeds the lower boundary line of the channel, calculating the downward breakthrough rate of the K line;
or,
for each key point in the first window, respectively calculating the sum of the upper difference values and the sum of the lower difference values of the key point, a first point before the key point and a second point after the key point, adding the obtained sum of the upper difference values to the obtained sum of the lower difference values, and dividing the obtained sum value by 2 times of the number of the key points to obtain the error rate of the key point;
or,
counting the number of K lines which break through upwards and the number of K lines which break through downwards of the first window, adding the number of K lines which break through upwards to the number of K lines which break through downwards, and dividing the obtained sum value by 2 times of the size of the first window to obtain a channel break-through rate;
or,
counting the sum of the upper defect values and the lower defect values of all K lines in the first window, and dividing the sum by the size of the first window to obtain a channel defect rate;
or,
and calculating the sum of the error rate of the key points, the breakthrough rate of the channel and the defect rate of the channel, and subtracting the sum from 1 to obtain the adaptation rate.
5. The method of claim 4, wherein said determining whether the K-line data within the first window matches the predetermined profile based on the decision parameter comprises:
when the upward breakthrough rate of any K line exceeds a first point breakthrough rate threshold or the downward breakthrough rate exceeds a second point breakthrough rate threshold, or the key point error rate exceeds a key point error rate threshold, or the channel breakthrough rate exceeds a channel breakthrough rate threshold, or the channel defect rate exceeds a channel defect rate threshold, or the adaptation rate is smaller than a lowest adaptation rate threshold, judging that the K line data in the first window is not matched with the preset form;
and when the upward breakthrough rate of any K line does not exceed a first point breakthrough rate threshold or the downward breakthrough rate exceeds a second point breakthrough rate threshold, the key point error rate does not exceed a key point error rate threshold, the channel breakthrough rate exceeds a channel breakthrough rate threshold, the channel defect rate does not exceed a channel defect rate threshold, and the adaptation rate is greater than a lowest adaptation rate threshold, judging that the K line data in the first window is matched with the preset form.
6. A K-line shape recognition apparatus, the apparatus comprising:
the acquisition module is used for acquiring K line data to be identified;
the reading module is used for reading configuration parameters in a form configuration file and the logic coordinates of each key point, wherein the form configuration file indicates a preset form;
the determining module is used for performing traversal identification on the K line data according to the configuration parameters and the logic coordinates of the key points, and determining whether the K line data is matched with the preset form;
the determining module includes:
a first determination unit for determining whether the K lines within the first window constitute a shape matching the predetermined shape;
a second determining unit, configured to add 1 to both the left boundary value and the right boundary value of the first window to obtain a second window if the K lines in the first window form a shape matching the predetermined shape, and further determine whether the K lines in the second window form a shape matching the predetermined shape;
a third determining unit, configured to subtract 1 from a right boundary value of the first window to obtain a third window if the K lines in the first window do not form a shape matching the predetermined shape, determine whether the K lines in the third window form a shape matching the predetermined shape when the size of the third window is larger than a minimum value of the window, and determine whether the K lines in the first window match the predetermined shape when the size of the third window is smaller than the minimum value of the window;
the third determination unit includes:
the first calculation unit is used for standardizing four data in each K line data, the standardized numerical values are all located between 0 and 1, and the four data in the K line data are the highest price, the lowest price, the opening price and the closing price corresponding to the K line;
the second calculation unit is used for calculating the logic position of each K line in the first window;
the third calculating unit is used for calculating an upper boundary line value and a lower boundary line value corresponding to each K line according to the logic position;
a fourth calculating unit, configured to calculate a determination parameter in the first window according to the normalized values of the four data in the K line and the corresponding upper boundary line value and lower boundary line value, where the determination parameter includes at least one of a point breakthrough rate, a key point error rate, a channel breakthrough rate, a channel loss rate, and an adaptation rate;
and the third determining unit is used for determining whether the K line data in the first window is matched with the preset form or not according to the judgment parameter.
7. The apparatus of claim 6, wherein the second computing unit comprises:
the acquisition unit is used for acquiring the initial position of a channel corresponding to the first window and the size of the first window;
and the fifth calculation unit is used for subtracting the initial position from the index position of the K line and dividing the obtained difference value by the size of the first window to obtain the logic position of the K line in the first window.
8. The apparatus of claim 6, wherein the third computing unit comprises:
a fourth determining unit, configured to determine, for each K line, a first upper boundary key point located closest to the left side of the K line and a second upper boundary key point located closest to the right side of the K line, obtain a first connection line between the first upper boundary key point and the second upper boundary key point, calculate a first intersection point of an extension line of the K line and the first connection line, and determine a vertical coordinate of the first intersection point as an upper boundary line value of the K line;
a fifth determining unit, configured to determine a first lower boundary key point located closest to the left side of the K line and a second lower boundary key point located closest to the right side, obtain a second connection line between the first lower boundary key point and the second lower boundary key point, calculate a second intersection point between an extension line of the K line and the second connection line, and determine a vertical coordinate of the second intersection point as a lower boundary line value of the K line.
9. The apparatus of claim 6, wherein the fourth computing unit comprises:
a sixth calculating unit, configured to calculate, for each K line in the first window, an upward breakthrough rate of the K line when a highest point of the K line exceeds an upper boundary line of a channel of the first window, and calculate a downward breakthrough rate of the K line when a lowest point of the K line exceeds a lower boundary line of the channel;
or,
a seventh calculating unit, configured to calculate, for each key point in the first window, a sum of upper differences and a sum of lower differences of the key point, a first point before the key point, and a second point after the key point, respectively, add the obtained sum of the upper differences to the obtained sum of the lower differences, and divide the obtained sum by 2 times of the number of the key points to obtain an error rate of the key point;
or,
the eighth calculating unit is used for counting the number of the K lines which break through upwards and the number of the K lines which break through downwards of the first window, adding the number of the K lines which break through upwards to the number of the K lines which break through downwards, and dividing the obtained sum value by 2 times of the size of the first window to obtain the channel breakthrough rate;
or,
a ninth calculating unit, configured to count a sum of upper defect values and lower defect values of all K lines in the first window, and divide the sum by the size of the first window to obtain a channel defect rate;
or,
and the tenth calculating unit is used for calculating a sum of the error rate of the key points, the breakthrough rate of the channels and the defect rate of the channels, and subtracting the sum from 1 to obtain the adaptation rate.
10. The apparatus of claim 9, wherein the third determining unit comprises:
a first determining unit, configured to determine that K-line data in the first window is not matched with the predetermined form when an upward breakthrough rate of any K-line exceeds a first point breakthrough rate threshold or a downward breakthrough rate exceeds a second point breakthrough rate threshold, or the key point error rate exceeds a key point error rate threshold, or the channel breakthrough rate exceeds a channel breakthrough rate threshold, or the channel defect rate exceeds a channel defect rate threshold, or the adaptation rate is smaller than a lowest adaptation rate threshold;
and the second judging unit is used for judging that the K line data in the first window is matched with the preset form when the upward breakthrough rate of any K line does not exceed the first point breakthrough rate threshold or the downward breakthrough rate exceeds the second point breakthrough rate threshold, the key point error rate does not exceed the key point error rate threshold, the channel breakthrough rate exceeds the channel breakthrough rate threshold, the channel defect rate does not exceed the channel defect rate threshold, and the adaptation rate is greater than the lowest adaptation rate threshold.
11. A computer-readable storage medium, characterized in that a program is stored in the computer-readable storage medium, which when executed by a processor implements the K-line shape recognition method according to any one of claims 1 to 5.
CN201511031705.0A 2015-12-31 2015-12-31 The recognition methods of K line morphology and device Active CN105701450B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201511031705.0A CN105701450B (en) 2015-12-31 2015-12-31 The recognition methods of K line morphology and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201511031705.0A CN105701450B (en) 2015-12-31 2015-12-31 The recognition methods of K line morphology and device

Publications (2)

Publication Number Publication Date
CN105701450A CN105701450A (en) 2016-06-22
CN105701450B true CN105701450B (en) 2019-10-08

Family

ID=56226116

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201511031705.0A Active CN105701450B (en) 2015-12-31 2015-12-31 The recognition methods of K line morphology and device

Country Status (1)

Country Link
CN (1) CN105701450B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106503725A (en) * 2016-09-12 2017-03-15 新浪网技术(中国)有限公司 A kind of graphic processing method and device
CN107958415B (en) * 2017-10-31 2021-07-27 创新先进技术有限公司 Security information broadcasting method and device
CN109543716B (en) * 2018-10-23 2021-12-21 华南理工大学 K-line form image identification method based on deep learning
CN110263843A (en) * 2019-06-18 2019-09-20 苏州梧桐汇智软件科技有限责任公司 Stock K line recognition methods based on deep neural network
TWI711995B (en) * 2019-11-14 2020-12-01 三竹資訊股份有限公司 Device and method for an educational diagnosis of a technical pattern of a finance instrument
CN112257770B (en) * 2020-10-19 2022-05-06 四川长虹电器股份有限公司 K-line form recognition method
AU2021466668A1 (en) 2021-09-30 2024-04-18 Futu Network Technology (shenzhen) Co., Ltd. K-line form recognition method, and electronic device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103544647A (en) * 2012-07-10 2014-01-29 廖倡兴 Method and system for displaying on-demand interval prices of financial commodity
CN103793844A (en) * 2012-10-30 2014-05-14 三竹资讯股份有限公司 Device and method of stock market automation technology analysis
CN103793848A (en) * 2012-10-30 2014-05-14 三竹资讯股份有限公司 Device and method of financial commodity quotation view K-line analysis
CN104809648A (en) * 2014-01-27 2015-07-29 神乎科技股份有限公司 Securities information processing method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103544647A (en) * 2012-07-10 2014-01-29 廖倡兴 Method and system for displaying on-demand interval prices of financial commodity
CN103793844A (en) * 2012-10-30 2014-05-14 三竹资讯股份有限公司 Device and method of stock market automation technology analysis
CN103793848A (en) * 2012-10-30 2014-05-14 三竹资讯股份有限公司 Device and method of financial commodity quotation view K-line analysis
CN104809648A (en) * 2014-01-27 2015-07-29 神乎科技股份有限公司 Securities information processing method

Also Published As

Publication number Publication date
CN105701450A (en) 2016-06-22

Similar Documents

Publication Publication Date Title
CN105701450B (en) The recognition methods of K line morphology and device
CN106156791B (en) Business data classification method and device
CN105184292B (en) The structural analysis of handwritten form mathematical formulae and recognition methods in natural scene image
CN107958230B (en) Facial expression recognition method and device
CN105144239A (en) Image processing device, program, and image processing method
CN102982534B (en) Canny edge detection dual threshold acquiring method based on chord line tangent method
CN109656366B (en) Emotional state identification method and device, computer equipment and storage medium
CN107315989A (en) For the text recognition method and device of medical information picture
CN110674811B (en) Image recognition method and device
CN106372624A (en) Human face recognition method and human face recognition system
CN109934278A (en) A kind of high-dimensional feature selection method of information gain mixing neighborhood rough set
CN108399366A (en) It is a kind of based on the remote sensing images scene classification extracting method classified pixel-by-pixel
Kosarevych et al. Image segmentation based on the evaluation of the tendency of image elements to form clusters with the help of point field characteristics
CN112348417A (en) Marketing value evaluation method and device based on principal component analysis algorithm
CN114776304B (en) Method, device, equipment and medium for identifying abnormities of deep sea mineral products
CN111414930B (en) Deep learning model training method and device, electronic equipment and storage medium
CN115798022A (en) Artificial intelligence identification method based on feature extraction
CN115730605A (en) Data analysis method based on multi-dimensional information
CN116703912B (en) Mini-host network port integrity visual detection method
CN105404682A (en) Digital image content based book retrieval method
US11448634B2 (en) Analysis apparatus, stratum age estimation apparatus, analysis method, stratum age estimation method, and program
CN116343300A (en) Face feature labeling method, device, terminal and medium
CN115631370A (en) Identification method and device of MRI (magnetic resonance imaging) sequence category based on convolutional neural network
CN114419294A (en) Self-adaptive determination method for curve variation threshold
CN115239947A (en) Wheat stripe rust severity evaluation method and device based on unsupervised learning

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 201700 Qingpu District, Shanghai green Ping Road, No. 1, building 153, room C, room 1,

Applicant after: Shanghai silver competition computer science and Technology Co., Ltd.

Address before: 201700 Qingpu District, Shanghai green Ping Road, No. 1, building 153, room C, room 1,

Applicant before: SHANGHAI YINTIANXIA TECHNOLOGY CO., LTD.

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210507

Address after: 201702 room 295, area G, 2nd floor, No.158 Shuanglian Road, Xujing Town, Qingpu District, Shanghai

Patentee after: SHANGHAI JINDASHI NETWORK TECHNOLOGY Co.,Ltd.

Address before: 201700 room 153, area C, 1st floor, building 1, No. 1362, Huqingping Road, Qingpu District, Shanghai

Patentee before: SHANGHAI YINSAI COMPUTER TECHNOLOGY Co.,Ltd.