CN112541824A - K-line candle drawing method and system and storage medium - Google Patents

K-line candle drawing method and system and storage medium Download PDF

Info

Publication number
CN112541824A
CN112541824A CN202011437604.4A CN202011437604A CN112541824A CN 112541824 A CN112541824 A CN 112541824A CN 202011437604 A CN202011437604 A CN 202011437604A CN 112541824 A CN112541824 A CN 112541824A
Authority
CN
China
Prior art keywords
line
candle
price
data
newly added
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011437604.4A
Other languages
Chinese (zh)
Other versions
CN112541824B (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.)
China Citic Bank Corp Ltd
Original Assignee
China Citic Bank Corp 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 China Citic Bank Corp Ltd filed Critical China Citic Bank Corp Ltd
Priority to CN202011437604.4A priority Critical patent/CN112541824B/en
Publication of CN112541824A publication Critical patent/CN112541824A/en
Application granted granted Critical
Publication of CN112541824B publication Critical patent/CN112541824B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • 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/23Updating
    • G06F16/2308Concurrency control
    • G06F16/2315Optimistic concurrency control
    • G06F16/2322Optimistic concurrency control using timestamps

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Development Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Technology Law (AREA)
  • Software Systems (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention discloses a method and a system for drawing a K-line candle picture and a storage medium. The method comprises the steps of receiving real-time product price information sent by a quotation engine and storing the real-time product price information into a receiving queue; polling the receiving queue to determine whether newly added price data is enqueued; when newly added price data are determined to be enqueued, a thread with a preset K line type is awakened and started, and locking operation is performed on the thread, so that data processing and candle drawing of a receiving queue are completed, the technical problems that time sequence cannot be guaranteed and data processing speed is not ideal in K line drawing in a multi-thread running state are solved, and the technical effect of good real-time performance is achieved.

Description

K-line candle drawing method and system and storage medium
Technical Field
The invention relates to the field of finance, in particular to a method and a system for drawing a K-line candle picture and a storage medium.
Background
At present, with the gradual opening of the domestic financial market, financial transactions are increasingly active, and the demands of individual bank customers and public customers on foreign exchange investment transactions and investment transactions of bulk commodities such as precious metals, crude oil, soybeans and the like are rapidly increased. The K line is an advantageous auxiliary tool for analyzing market trend and grasping buying and selling time by trading users. However, the high requirements on the timeliness and the accuracy of the K-line data are generated, the prior art processes the K-line data based on a common multithreading mode, uses a custom file as a data persistence carrier, and configures the range of the K-line product to be drawn based on the quotation engine rule.
However, the prior art has the algorithm logic of actively judging the data access mode, lacks real-time performance, and has certain difficulty in ensuring the time sequence in the common multi-thread mode processing of the K lines, thereby affecting the data processing speed.
Aiming at the problems that the time sequence cannot be ensured and the data processing speed is not ideal in the K line drawing in the multithreading operation state in the related technology, a better solution is not provided.
Disclosure of Invention
The embodiment of the invention provides a method and a system for drawing a K-line candle picture and a storage medium, which are used for at least solving the technical problems that the time sequence cannot be ensured and the data processing speed is not ideal in the K-line drawing in a multithreading running state in the related technology.
According to an aspect of an embodiment of the present invention, there is provided a method for drawing a K-line candle drawing, which is applied to the financial field, and includes:
receiving real-time product price information sent by a quotation engine and storing the real-time product price information in a receiving queue;
polling the receiving queue to determine whether newly added price data is enqueued;
when determining that newly added price data are enqueued, awakening and starting a thread with a preset K line type;
and locking the thread to complete the data processing of the receiving queue and the drawing of the candle drawing.
Optionally, the real-time price information of the product is composed of four dimensions of service type information, product type information, standard processing deadline information and real-time price.
Optionally, a list is created for each standard transaction term of the product;
and when determining that the newly added price data are enqueued, storing the newly added price data into the corresponding list and deleting the newly added price data from the receiving queue.
Optionally, waking up and starting the thread with the preset K line type includes:
the preset K line type comprises a service type, a product type and a standard transaction duration.
Optionally, the data processing and candle drawing of the receiving queue includes:
processing the data in the list according to the time sequence, updating the values of the candle picture in the minute line, the hour line, the day line, the circumference line and the month line, and finishing the drawing of the candle picture;
the candle picture values comprise an opening value, a closing value, a highest value and a lowest value.
Optionally, after the candle drawing is completed, the method further comprises:
storing the candle picture which is drawn according to the minute line and the hour line into a database;
and storing the candle picture drawn according to the solar system, the circumference and the monthly line into a database according to preset time.
According to another aspect of the embodiments of the present invention, there is also provided a system for drawing a K-line candle drawing, which is applied to the field of finance, and includes:
the price screening module is used for receiving the real-time price information of the product sent by the quotation engine and storing the real-time price information into a receiving queue;
the price screening module is also used for polling the receiving queue to determine whether newly added price data is enqueued;
the drawing module is used for awakening and starting a thread with a preset K line type when the newly added price data are determined to be enqueued;
and the drawing module is also used for locking the thread to finish the data processing of the receiving queue and the drawing of the candle drawing.
Optionally, the price filtering module further comprises: creating a list for each standard transaction term of the product;
and when determining that the newly added price data are enqueued, storing the newly added price data into the corresponding list and deleting the newly added price data from the receiving queue.
Optionally, the drawing module further comprises: processing the data in the list according to the time sequence, updating the values of the candle picture in the minute line, the hour line, the day line, the circumference line and the month line, and finishing the drawing of the candle picture;
the candle picture values comprise an opening value, a closing value, a highest value and a lowest value.
According to a further aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium having a computer program stored therein, wherein the computer program is configured to perform the above-mentioned method of K-line candle drawing when executed.
In the embodiment of the invention, the real-time price information of the product sent by a quotation engine is received and stored in a receiving queue; polling the receiving queue to determine whether newly added price data is enqueued; when newly added price data are determined to be enqueued, a thread with a preset K line type is awakened and started, and locking operation is performed on the thread, so that data processing and candle drawing of a receiving queue are completed, the technical problems that time sequence cannot be guaranteed and data processing speed is not ideal in K line drawing in a multi-thread running state are solved, and the technical effect of good real-time performance is achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a method flow diagram for the rendering of a K-line candle diagram according to an embodiment of the present invention;
FIG. 2 is a block diagram of a system architecture for the rendering of a K-line candle diagram in accordance with an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, 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 only a part of the embodiments of the present invention, and not all of the embodiments. 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 should be noted that the terms "comprises" and "comprising," and any variations thereof, in the description and claims of the present invention and the above-described drawings, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of the embodiments of the present invention, there is provided a method for drawing a K-line candle diagram, optionally, as an optional implementation manner, the method for drawing a K-line candle diagram in the embodiments may be executed by means of a computer program, and may be applied in a terminal or a server or a similar computing device or an electronic device. For example, the computing device or electronic device may include one or more processors (the processors may include, but are not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory for storing data, and may further include a transmission device for communication functions and an input/output device. It may also include more or fewer components than previously described, or have a different configuration than that shown. The memory can be used for storing computer programs, for example, software programs and modules of application software, such as a computer program corresponding to the method for drawing a K-line candle holder in the embodiment of the present invention, and the processor executes various functional applications and data processing by running the computer programs stored in the memory, so as to implement the method. The memory may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory may further include memory located remotely from the processor, and these remote memories may be connected to the mobile terminal through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The transmission device is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
Illustratively, as an alternative embodiment, FIG. 1 is a flow chart of a method of K-line candle drawing according to an embodiment of the present invention, as shown in FIG. 1, the method comprising:
step S101, receiving real-time product price information sent by a quotation engine and storing the real-time product price information into a receiving queue;
specifically, the quotation engine is a unique portal for receiving real-time price information for each product;
it should be noted that, in order to avoid congestion caused by the situation like "production speed is higher than consumption speed", the received real-time price information is not processed here, but is stored in a unique receiving queue first in an asynchronous mode.
Step S103, polling the receiving queue to determine whether new price data is enqueued;
specifically, the quote management thread started with the system will poll the queue continuously, and after finding that there is new enqueue data in the queue, the next step of processing will be performed.
Step S105, when determining that newly added price data are enqueued, awakening and starting a thread with a preset K line type;
specifically, when the thread finds that there is a new price in the queue, the thread puts the price into the corresponding list according to the rule and deletes the price from the queue.
Step S107, locking the thread to finish the data processing and the candle drawing of the receiving queue;
specifically, after the locking operation is performed, the situation that two threads process the same queue at the same time does not occur, the price data read from the receiving queue at each time can be guaranteed, the latest price is not reflected in the K line, the repeated processing of the same price is avoided, and the processing efficiency is improved.
In one exemplary embodiment, the product real-time price information is composed of four dimensions of service type information, product type information, standard processing deadline information, and real-time price;
the service type information includes, but is not limited to, an on-demand period, a drop period, and a long term;
the product type information includes a currency pair such as various types of EUR/USD, GBP/USD, USD/JPY, and the like;
the standard processing deadline may comprise the following types:
ON, Over-Night, that is, the rest of the day, and the next day of delivery;
TN Tom-Next, i.e., the Next day (Tom is Tomorrow) of rest, and the third day of delivery;
Spot-Next, i.e. the current time of the day (the current days are different with the currency, and most of the days are 2 days), the current time of the day of the delivery;
1W, starting to rest immediately, namely handing over for one week after the rest;
1M, starting and stopping at an instant, namely delivering for a month after the instant;
1Y, the rest period is started immediately, namely the harvest is carried out in one year after the rest period.
In one exemplary embodiment, a form list is created for each standard transaction term for a product;
specifically, the creating principle may be to be used as the minimum granularity K-line management unit, and it should be noted that the creating of the form by using other principles is also applicable to the present solution.
And when determining that the newly added price data are enqueued, storing the newly added price data into the corresponding list and deleting the newly added price data from the receiving queue.
In one exemplary embodiment, waking up and starting a thread having a preset K-line type comprises:
the preset K line type comprises a service type, a product type and a standard transaction duration.
In an exemplary embodiment, completing data processing and candle drawing of the receive queue comprises:
processing the data in the list according to the time sequence, updating the values of the candle picture in the minute line, the hour line, the day line, the circumference line and the month line, and finishing the drawing of the candle picture;
the candle picture values comprise an opening value, a closing value, a highest value and a lowest value.
In an exemplary embodiment, after the candle drawing is completed, the method further comprises:
storing the candle picture which is drawn according to the minute line and the hour line into a database;
storing the candle picture drawn according to the solar system, the contour and the monthly line into a database according to preset time;
specifically, the preset time may be set to 1h, 2h, etc. In the subsequent data updating, only update is carried out, and no new record is inserted.
Through the steps, the real-time product price information sent by the quotation engine is received and stored in the receiving queue; polling the receiving queue to determine whether newly added price data is enqueued; when newly added price data are determined to be enqueued, a thread with a preset K line type is awakened and started, and locking operation is performed on the thread, so that data processing and candle drawing of a receiving queue are completed, the technical problems that time sequence cannot be guaranteed and data processing speed is not ideal in K line drawing in a multi-thread running state are solved, and the technical effect of good real-time performance is achieved.
The embodiment of the invention also provides a system for drawing the K-line candle picture, which is used for realizing the embodiment and the preferred embodiment. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the system described in the embodiments below is preferably implemented in software, implementations in hardware, or a combination of software and hardware are also possible and contemplated.
FIG. 2 is a block diagram of a system for drawing a K-line candle according to an embodiment of the present invention, as shown in FIG. 2, the system comprising:
the price screening module 22 is used for receiving the real-time price information of the product sent by the quotation engine and storing the real-time price information into a receiving queue;
the price screening module 22 is further configured to poll the receiving queue to determine whether new price data is enqueued;
the drawing module 24 is used for waking up and starting a thread with a preset K line type when determining that newly added price data are enqueued;
the drawing module 24 is further configured to lock the thread to complete data processing of the receiving queue and drawing of the candle drawing;
specifically, after the locking operation is performed, the situation that two threads process the same queue at the same time does not occur, the price data read from the receiving queue at each time can be guaranteed, the latest price is not reflected in the K line, the repeated processing of the same price is avoided, and the processing efficiency is improved.
In an exemplary embodiment, the price filtering module further comprises:
creating a list for each standard transaction term of the product;
and when determining that the newly added price data are enqueued, storing the newly added price data into the corresponding list and deleting the newly added price data from the receiving queue.
In an exemplary embodiment, the rendering module further comprises:
processing the data in the list according to the time sequence, updating the values of the candle picture in the minute line, the hour line, the day line, the circumference line and the month line, and finishing the drawing of the candle picture;
the candle picture values comprise an opening value, a closing value, a highest value and a lowest value.
Through the K-line candle drawing system, the technical problems that time sequence cannot be ensured and data processing speed is not ideal in K-line drawing in a multi-thread running state are solved, and the technical effect of good real-time performance is achieved.
The following is used for further explanation by way of a specific implementation scenario:
and receiving real-time price information of the product sent by a quotation engine, wherein the real-time price information of the product is USD/CNY-on-schedule, USD/CNY-off-schedule-1W, USD/CNY-off-schedule-1M, USD/JPY-on-schedule, USD/JPY-off-schedule-1W and USD/JPY-off-schedule-1M.
The following is defined in the configuration file: 2 service types: on-demand and off-demand; 2 product types: USD/CNY, USD/JPY; 2 fall point standard deadlines: 1W and 1M. When the system is started, the configuration file is read to generate 1 price receiving queue Q and 6 asynchronous processing queues list.
When Q receives the latest price of the quotation engine, the polling thread respectively stores the number into the corresponding 6 asynchronous processing queues according to the price type.
Each price type corresponds to a plurality of K lines, which are commonly a minute line, an hour line, a day line, a circumference line, a month line and the like. When a new price is stored in the list (USD/CNY on-demand), a K-line updating thread is distributed from the thread pool, the price type of the USD/CNY on-demand is locked, and then the thread is started.
A minute line, which is used for comparing the update time stamp of the existing minute line candle picture in the memory with the time stamp of the latest price in the list, if the time stamp is the same minute, the price in the list is compared with the four values of the opening price and the closing price (the opening price, the highest price, the closing price and the closing price) of the existing candle picture in the memory, and then the opening price and the closing price are updated; if the time is different, the candle icon in the memory is marked as the 'finished' state, the candle icon is written into the database, a candle icon object is newly built, and the four values of the opening, the closing and the opening are initialized to the latest price in the list. Hour line, update logic same minute line.
And the daily line, considering that the candle drawing period of one daily line is long, the loss of memory data caused by system abnormity is not avoided, and marking the daily line candle icon in the memory as an unfinished state every hour line warehousing, and warehousing synchronously. After one hour, updating four values of the opening, the closing and the updating of the date line candle picture in the last warehousing and the updating of the timestamp; if 0 o ' clock has passed the day, the state of the latest candle picture record in the updating database is ' completed ', and the updating of the record of the new day is started at the new candle picture object. Similarly, the candle drawing of the contour line and the moon line can refer to a sun line.
It should be further noted that other embodiments with the same effect may also be applied to the present solution, and are not described herein again.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
According to a further aspect of embodiments of the present invention, there is also provided a computer-readable storage medium having a computer program stored thereon, wherein the computer program is arranged to perform the steps in any of the method embodiments of the method of rendering of a K-line candle picture when executed.
Alternatively, in the present embodiment, the above-mentioned computer-readable storage medium may be configured to store a computer program for executing the steps of:
s1, receiving the real-time price information of the product sent by the quotation engine and storing the information in a receiving queue;
s2, polling the receiving queue to determine whether the new price data is enqueued;
s3, when determining that the newly added price data is enqueued, waking up and starting a thread with a preset K line type;
and S4, locking the thread to complete the data processing and candle drawing of the receiving queue.
Through the steps, the real-time product price information sent by the quotation engine is received and stored in the receiving queue; polling the receiving queue to determine whether newly added price data is enqueued; when newly added price data are determined to be enqueued, a thread with a preset K line type is awakened and started, and locking operation is performed on the thread, so that data processing and candle drawing of a receiving queue are completed, the technical problems that time sequence cannot be guaranteed and data processing speed is not ideal in K line drawing in a multi-thread running state are solved, and the technical effect of good real-time performance is achieved.
Alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the methods of the foregoing embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
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.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, 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.
In the several embodiments provided in this application, it should be understood that the above-described apparatus embodiments are merely illustrative, for example, the division of the units is only one logical function division, and in actual implementation, there may be other division manners, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
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 can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A method for drawing a K-line candle picture is applied to the field of finance, and is characterized by comprising the following steps:
receiving real-time product price information sent by a quotation engine and storing the real-time product price information in a receiving queue;
polling the receiving queue to determine whether new price data is enqueued;
when determining that newly added price data are enqueued, awakening and starting a thread with a preset K line type;
and locking the thread to finish the data processing and the candle drawing of the receiving queue.
2. The method of claim 1, wherein the real-time price information of the product is comprised of four dimensions of service type information, product type information, standard processing deadline information, and real-time price.
3. The method of claim 2, further comprising:
creating a list for each standard transaction term of the product;
and when determining that the newly added price data are enqueued, storing the newly added price data into the corresponding list and deleting the newly added price data from the receiving queue.
4. The method of claim 1, wherein waking up and starting a thread having a preset K-line type comprises:
the preset K line type comprises a service type, a product type and a standard transaction deadline.
5. The method of claim 2, wherein the completing the data processing and candle drawing of the receive queue comprises:
processing the data in the form list according to the time sequence, updating the values of the candle picture in the minute line, the hour line, the day line, the circumference line and the month line, and finishing the drawing of the candle picture;
the candle picture values comprise an opening value, a closing value, a highest value and a lowest value.
6. The method of claim 5, further comprising, after completing the candle drawing:
storing the candle picture which is drawn according to the minute line and the hour line into a database;
and storing the candle picture drawn according to the solar system, the circumference and the monthly line into a database according to preset time.
7. The utility model provides a drawing system of K line candle picture, is applied to finance field, its characterized in that includes:
the price screening module is used for receiving the real-time price information of the product sent by the quotation engine and storing the real-time price information into a receiving queue;
the price screening module is also used for polling the receiving queue to determine whether newly added price data is enqueued;
the drawing module is used for awakening and starting a thread with a preset K line type when the newly added price data are determined to be enqueued;
and the drawing module is also used for locking the thread to finish the data processing of the receiving queue and the drawing of the candle drawing.
8. The system of claim 7, wherein the price filtering module further comprises:
creating a list for each standard transaction term of the product;
and when determining that the newly added price data are enqueued, storing the newly added price data into the corresponding list and deleting the newly added price data from the receiving queue.
9. The system of claim 7, wherein the rendering module further comprises:
processing data in the list according to the time sequence, updating the values of the candle picture in the minute line, the hour line, the day line, the circumference line and the month line, and finishing the drawing of the candle picture;
the candle picture values comprise an opening value, a closing value, a highest value and a lowest value.
10. A computer-readable storage medium comprising a stored program, wherein the program when executed performs the method of any of claims 1 to 6.
CN202011437604.4A 2020-12-11 2020-12-11 Drawing method and system of K-line candle graph and storage medium Active CN112541824B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011437604.4A CN112541824B (en) 2020-12-11 2020-12-11 Drawing method and system of K-line candle graph and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011437604.4A CN112541824B (en) 2020-12-11 2020-12-11 Drawing method and system of K-line candle graph and storage medium

Publications (2)

Publication Number Publication Date
CN112541824A true CN112541824A (en) 2021-03-23
CN112541824B CN112541824B (en) 2024-04-30

Family

ID=75019907

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011437604.4A Active CN112541824B (en) 2020-12-11 2020-12-11 Drawing method and system of K-line candle graph and storage medium

Country Status (1)

Country Link
CN (1) CN112541824B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113407525A (en) * 2021-08-03 2021-09-17 深圳华锐金融技术股份有限公司 K-line data inspection method and device, computer equipment and readable storage medium
CN114581242A (en) * 2022-05-05 2022-06-03 北京中捷互联信息技术有限公司 Financial data processing system and method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111427697A (en) * 2020-03-18 2020-07-17 深圳市瑞立视多媒体科技有限公司 Motion capture method, device and equipment based on multithreading and storage medium
CN111767143A (en) * 2020-06-24 2020-10-13 中国工商银行股份有限公司 Transaction data processing method, device, equipment and system
CN112015713A (en) * 2019-05-30 2020-12-01 阿里巴巴集团控股有限公司 Database task processing method and device, electronic equipment and readable medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112015713A (en) * 2019-05-30 2020-12-01 阿里巴巴集团控股有限公司 Database task processing method and device, electronic equipment and readable medium
CN111427697A (en) * 2020-03-18 2020-07-17 深圳市瑞立视多媒体科技有限公司 Motion capture method, device and equipment based on multithreading and storage medium
CN111767143A (en) * 2020-06-24 2020-10-13 中国工商银行股份有限公司 Transaction data processing method, device, equipment and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
王俊昌;王振;付雄;: "基于无锁数据结构的FIFO队列算法", 计算机工程, no. 08, 14 March 2018 (2018-03-14) *
陈益;童亚拉;杨晓艳;: "Java多线程同步机制的应用分析", 智能计算机与应用, no. 03, 1 June 2012 (2012-06-01) *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113407525A (en) * 2021-08-03 2021-09-17 深圳华锐金融技术股份有限公司 K-line data inspection method and device, computer equipment and readable storage medium
CN113407525B (en) * 2021-08-03 2021-11-09 深圳华锐金融技术股份有限公司 K-line data inspection method and device, computer equipment and readable storage medium
CN114581242A (en) * 2022-05-05 2022-06-03 北京中捷互联信息技术有限公司 Financial data processing system and method

Also Published As

Publication number Publication date
CN112541824B (en) 2024-04-30

Similar Documents

Publication Publication Date Title
Jarrow et al. Counterparty risk and the pricing of defaultable securities
CN112541824A (en) K-line candle drawing method and system and storage medium
US20240152898A1 (en) Server device configurations based on machine learning
CN112000675A (en) Market data updating method and device, terminal equipment and storage medium
US20140289165A1 (en) Method and system for generating stock price alerts based on real-time market data
CN109711866B (en) Bank advertisement putting method, device and system
CN110210898A (en) Advertisement sending method, device and equipment based on user behavior
CN112581226A (en) Product recommendation method and system
CA3143827A1 (en) Fund data processing method, apparatus, computer device and storage medium
US20170316502A1 (en) Techniques for automated order matching
CN106874080B (en) Data calculation method and system based on distributed server cluster
CN115082203A (en) Method and device for pushing living scheme, electronic equipment and storage medium
CN105760441B (en) Event result display method and device
CN113222720A (en) Reputation-based privacy protection incentive mechanism method, device and storage medium
CN117036001A (en) Risk identification processing method, device and equipment for transaction service and storage medium
CN111539809A (en) Method and related device for determining electronic receipt style
WO2013177395A2 (en) Methods and systems for order matching
CN107038552B (en) Service processing method, device and equipment and readable medium
CN115082154A (en) Order processing method, system and device and electronic equipment
WO2017185211A1 (en) User expense data processing method and server
CN112381514A (en) Service data reminding method and device and server
CN112950354A (en) Credit scoring method and device for account, storage medium and electronic device
TWI818193B (en) Securities market monitoring methods and systems
CN110471726B (en) Component display control method and terminal equipment
US20230124577A1 (en) Automated exchange for services using service time units

Legal Events

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