CN118379390A - Stock curve drawing method and device, electronic equipment and storage medium - Google Patents

Stock curve drawing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN118379390A
CN118379390A CN202410497283.9A CN202410497283A CN118379390A CN 118379390 A CN118379390 A CN 118379390A CN 202410497283 A CN202410497283 A CN 202410497283A CN 118379390 A CN118379390 A CN 118379390A
Authority
CN
China
Prior art keywords
target data
coordinate
drawn
target
curve
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410497283.9A
Other languages
Chinese (zh)
Inventor
何允龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Bozhong Intelligent Technology Investment Co ltd
Original Assignee
Guangdong Bozhong Intelligent Technology Investment 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 Guangdong Bozhong Intelligent Technology Investment Co ltd filed Critical Guangdong Bozhong Intelligent Technology Investment Co ltd
Priority to CN202410497283.9A priority Critical patent/CN118379390A/en
Publication of CN118379390A publication Critical patent/CN118379390A/en
Pending legal-status Critical Current

Links

Landscapes

  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention discloses a stock curve drawing method, a stock curve drawing device, electronic equipment and a storage medium. The method comprises the following steps: acquiring curve data of stocks to be drawn within a set time range; traversing the curve data, and determining a target time stamp corresponding to target data when the condition that the target data meets the drawing trigger condition exists in the curve data, wherein the number of the target data is one or more; for each piece of target data, determining a coordinate to be drawn corresponding to the target data based on a target timestamp corresponding to the target data, the set time range and a relative position of the target data and a corresponding receiving price during drawing; and drawing at the coordinate to be drawn corresponding to each piece of target data to obtain a target curve. According to the technical scheme, when the condition that the target data meets the drawing trigger condition exists in the curve data, the drawing is performed, and the drawing mode of the stock curve can be enriched.

Description

Stock curve drawing method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a stock curve drawing method, a device, electronic equipment and a storage medium.
Background
The material making process mainly comprises the steps of event monitoring, material collection, material design, material distribution and the like, and if the material is managed by manual work, the service requirement is difficult to meet. Therefore, a systematic means is needed to enable links such as monitoring, collecting, designing and distributing the materials, and the efficiency of material management is improved.
The stock k diagram is a widely used and universal material, the existing algorithm for drawing the stock k diagram is in a comparatively solidified form, drawing can be carried out only in a certain time range through given time and corresponding data, the drawn content has high restriction, and the service requirement cannot be met.
Disclosure of Invention
The invention provides a stock curve drawing method, a device, electronic equipment and a storage medium, which can enrich the drawing modes of stock curves.
In a first aspect, an embodiment of the present invention provides a stock curve drawing method, including:
acquiring curve data of stocks to be drawn within a set time range;
Traversing the curve data, and determining a target time stamp corresponding to target data when the condition that the target data meets the drawing trigger condition exists in the curve data, wherein the number of the target data is one or more;
for each piece of target data, determining a coordinate to be drawn corresponding to the target data based on a target timestamp corresponding to the target data, the set time range and a relative position of the target data and a corresponding receiving price during drawing;
and drawing at the coordinate to be drawn corresponding to each piece of target data to obtain a target curve.
In a second aspect, an embodiment of the present invention provides a stock curve drawing apparatus, including:
the acquisition module is used for acquiring curve data of stocks to be drawn within a set time range;
The first determining module is used for traversing the curve data, and determining a target timestamp corresponding to the target data when the condition that the target data meets the drawing trigger condition exists in the curve data, wherein the number of the target data is one or more;
The second determining module is used for determining coordinates to be drawn corresponding to the target data based on the target time stamp corresponding to the target data, the set time range and the relative position of the target data and the corresponding receiving price during drawing;
and the drawing module is used for drawing at the coordinate to be drawn corresponding to each piece of target data to obtain a target curve.
In a third aspect, an embodiment of the present invention provides an electronic device, including:
at least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method according to the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, implements a method as described in the first aspect.
According to the technical scheme, the drawing is performed not through given time and corresponding data within a certain time range, but when the condition that the target data meets the drawing trigger condition exists in the curve data, the coordinates to be drawn corresponding to the target data during drawing are related to the target time stamp and the set time range corresponding to the target data, and the relative position of the target data and the corresponding receiving price during drawing, so that the drawing mode of the stock curve can be enriched.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a stock curve drawing method according to a first embodiment of the present invention;
FIG. 2 is a flow chart of a stock curve drawing method according to a second embodiment of the present invention;
Fig. 3 is a schematic structural diagram of a stock curve drawing device according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device implementing a stock curve drawing method according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like herein are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, 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.
It will be appreciated that before using the technical solutions disclosed in the embodiments of the present invention, the user should be informed and authorized of the type, usage range, usage scenario, etc. of the personal information related to the present disclosure in an appropriate manner according to relevant legal regulations.
Example 1
Fig. 1 is a flowchart of a stock curve drawing method according to an embodiment of the present invention, which is applicable to a case of drawing a stock curve, and the method may be performed by a stock curve drawing apparatus, which may be implemented in the form of software and/or hardware and integrated in an electronic device. Further, the electronic device includes, but is not limited to: computers, notebook computers, servers, etc. As shown in fig. 1, the method includes:
S110, acquiring curve data of stocks to be drawn within a set time range.
The stock to be drawn may be a stock of which a stock curve is to be drawn, and the stock curve may be a stock k line graph. The set time range may be a time range set according to actual application needs, and may include a plurality of consecutive transaction days in the set time range. The curve data in the set time range may be data corresponding to each trading day included in the set time range of the stock to be drawn, such as data of the volume of the trade, the highest price, the lowest price, the latest price, the rising and falling amplitude, and the like.
The mode of acquiring the curve data of the stock to be drawn in the set time range is not limited, for example, the curve data of the stock to be drawn in the set time range can be acquired through a server connected with the electronic device, and the server is used for storing the curve data corresponding to the stock to be drawn.
In one embodiment, obtaining curve data of a stock to be drawn within a set time range includes:
and acquiring curve data of the stocks to be drawn within a set time range based on the stock identifications corresponding to the stocks to be drawn.
The stock identifier may be an identifier for uniquely identifying a stock to be drawn, and the stock identifier may be a stock code of the stock to be drawn, for example. In practical application, curve data of stocks to be drawn in a set time range can be obtained from a server based on stock codes corresponding to the stocks to be drawn.
And S120, traversing the curve data, and determining a target time stamp corresponding to the target data when the condition that the target data meets the drawing trigger condition exists in the curve data, wherein the number of the target data is one or more.
The drawing trigger condition may be a condition for triggering drawing, and the drawing trigger condition may be set according to actual application requirements. The target data may be data that satisfies the drawing trigger condition at a certain transaction day in the curve data. The target timestamp corresponding to the target data may be a transaction day on which the target data was collected.
In one embodiment, the drawing trigger condition includes a condition for triggering drawing corresponding to different data indexes of the stock to be drawn, where the data indexes are related to a business requirement of the stock to be drawn.
The data index may be the volume of stock to be drawn, the highest price, the lowest price, the latest price, the rise and fall, etc. The drawing trigger conditions corresponding to different data indexes may be different, and are not limited herein.
For the data of the stocks to be drawn in a certain trading day, triggering drawing if the trading volume of the stocks to be drawn exceeds a set trading volume threshold; triggering drawing if the trading day is the rising and stopping day of the stock to be drawn; triggering drawing if the trading day is new high near n days; if the rise of the trade day exceeds the set rise threshold, the drawing is triggered. The traffic threshold and the expansion threshold are not limited to these values.
In practical application, the curve data can be traversed, specifically, the data of each trade day in the curve data can be traversed in sequence, the data of each trade day is matched with the drawing trigger conditions corresponding to different data indexes of stocks to be drawn, if the drawing trigger conditions are met, the data meeting the conditions are determined to be target data, and the trade day corresponding to the target data is determined to be a target timestamp. After the traversal is completed, one or more target data and a target timestamp corresponding to each target data may be determined.
S130, determining coordinates to be drawn corresponding to the target data based on the target time stamp corresponding to the target data, the set time range and the relative positions of the target data and the corresponding receiving price during drawing according to each piece of target data.
For each target data, the relative position of the target timestamp in the set time range can be determined through the starting time and the ending time in the set time range and the target timestamp corresponding to the target data, so that the first drawing coordinate is determined. The first drawing coordinate may be regarded as a horizontal axis coordinate corresponding to the target data in the target curve. The target curve can be a stock k diagram of the stock to be drawn, which is finally required to be drawn in the embodiment of the invention. The start time in the set time range may be the earliest trading day in the set time range, and the end time may be the latest trading day in the set time range.
For the drawing trigger conditions corresponding to the data indexes of the stock to be drawn, the relative position of the drawing position of the target data in the vertical axis direction and the closing price (namely, k point) under the target timestamp corresponding to the target data when the drawing is performed after the drawing is triggered based on the drawing trigger conditions can be preset. Such as at a location above the longitudinal axis direction closing price by a first set distance or at a location below the longitudinal axis direction closing price by a second set distance. The first set distance and the second set distance are not limited. For each target data, according to the matched drawing trigger conditions, the relative position of the drawing position of the target data in the vertical axis direction and the closing price under the target timestamp corresponding to the target data during drawing can be determined, and then the second drawing coordinate is determined. The second drawing coordinate may be regarded as a vertical axis coordinate corresponding to the target data in the target curve.
The first drawing coordinates and the second drawing coordinates corresponding to each target data can be determined based on the above manner. Optionally, in practical application, the first drawing coordinate and the second drawing coordinate corresponding to certain target data may be directly used as the coordinates to be drawn corresponding to the target data; the first drawing coordinates and the second drawing coordinates corresponding to each target data can be offset according to the size of a canvas for drawing the target curve, and the two offset coordinates are combined into a final coordinate to be drawn, so that the coordinate to be drawn of each target data can be distributed in the canvas more reasonably. The coordinates of the target data to be drawn can be understood as coordinates of the target data in the target curve during drawing.
And S140, drawing at the coordinate to be drawn corresponding to each piece of target data to obtain a target curve.
For the drawing trigger conditions corresponding to the data indexes of the stock to be drawn, after the drawing is triggered based on the drawing trigger conditions, the drawing modes corresponding to the drawing can be preset, and the drawing modes can comprise icon forms or text forms. For each target data, the corresponding drawing mode during drawing can be determined according to the matched drawing trigger conditions, and then drawing is performed at the coordinate to be drawn corresponding to the target data according to the corresponding drawing mode, so that a target curve is obtained.
When the coordinate to be drawn corresponding to the target data is drawn, the content to be drawn may be the target data itself, and if the target data is the volume of stock to be drawn exceeding the set volume threshold, the target data may be drawn at the coordinate to be drawn in a text form. The drawn content may also be an event corresponding to the target data, for example, when the target data is data corresponding to the rising and stopping day of the stock to be drawn, the "the trade day is the rising and stopping day" may be determined as the event corresponding to the target data, the event may be drawn at the coordinate to be drawn in the form of an icon, and the icon may indicate that the trade day is the rising and stopping day. The content and the drawing manner of the drawing may be determined according to the actual application requirement, and are not limited herein.
According to the technical scheme, the drawing is performed not through given time and corresponding data within a certain time range, but when the condition that the target data meets the drawing trigger condition exists in the curve data, the coordinates to be drawn corresponding to the target data during drawing are related to the target time stamp and the set time range corresponding to the target data, and the relative position of the target data and the corresponding receiving price during drawing, so that the drawing mode of the stock curve can be enriched.
Example two
Fig. 2 is a flowchart of a stock curve drawing method according to a second embodiment of the present invention, where, based on the first embodiment, a further refinement of coordinates to be drawn corresponding to target data is determined based on a target timestamp corresponding to the target data, the set time range, and a relative position between the target data and a corresponding receiving price during drawing; and drawing the coordinate to be drawn corresponding to each piece of target data to obtain further refinement of the target curve. As shown in fig. 2, the method includes:
S110, acquiring curve data of stocks to be drawn within a set time range.
And S120, traversing the curve data, and determining a target time stamp corresponding to the target data when the condition that the target data meets the drawing trigger condition exists in the curve data, wherein the number of the target data is one or more.
S131, determining a first drawing coordinate according to the relative position of a target timestamp corresponding to the target data in the set time range for each piece of target data.
For each target data, a time axis (i.e., horizontal axis) scale ratio may be determined by setting a start time and an end time within a time range, and then a first drawing coordinate in the horizontal axis direction may be determined according to the time axis scale ratio based on a relative position of the target timestamp within the set time range.
And S132, determining a second drawing coordinate based on the relative position of the target data and the closing price corresponding to the target time stamp during drawing.
For each target data, according to the matched drawing trigger conditions, the relative position of the drawing position of the target data in the vertical axis direction and the closing price (namely k points) under the target timestamp corresponding to the target data during drawing can be determined, and then the second drawing coordinate in the vertical axis direction is determined. The drawing trigger condition for matching the target data corresponds to a preset relative position of the target data and the closing price corresponding to the target timestamp during drawing, which is not limited herein.
S133, determining the coordinate to be drawn corresponding to the target data based on the first drawing coordinate and the second drawing coordinate.
In practical application, the first drawing coordinate and the second drawing coordinate corresponding to certain target data can be directly used as the coordinates to be drawn corresponding to the target data; and the first drawing coordinates and the second drawing coordinates corresponding to each target data can be offset according to the size of the canvas for drawing the target curve, so as to obtain the coordinates to be drawn corresponding to the target data.
In one embodiment, determining the coordinates to be drawn corresponding to the target data based on the first drawing coordinates and the second drawing coordinates includes:
Respectively determining the offset of the first drawing coordinate and the offset of the second drawing coordinate according to the size of the canvas and the set time range;
respectively shifting the first drawing coordinate and the second drawing coordinate according to the corresponding offset;
And combining the first drawing coordinate after the offset and the second drawing coordinate after the offset into the coordinate to be drawn.
In practical application, the offset of the first drawing coordinate corresponding to each target data can be determined according to the total amount of transaction days and the width of the canvas included in the set time range, and the basis for determining the offset of the first drawing coordinate corresponding to each target data is that the canvas in the horizontal axis direction can completely bear a plurality of transaction days included in the set time range.
Correspondingly, the canvas in the horizontal axis direction can fully bear a plurality of transaction days included in the set time range, the offset of the second drawing coordinates corresponding to each target data in the vertical axis direction can be correspondingly determined, and the basis for determining the offset of the second drawing coordinates corresponding to each target data is that the canvas in the vertical axis direction can fully bear the offset second drawing coordinates corresponding to each target data.
After determining the offset of the first drawing coordinate and the offset of the second drawing coordinate corresponding to each target data, the first drawing coordinate and the second drawing coordinate corresponding to each target data can be offset according to the corresponding offset, and the offset first drawing coordinate and the offset second drawing coordinate corresponding to each target data are combined to form the corresponding coordinate to be drawn.
In one embodiment, combining the shifted first drawing coordinate and the shifted second drawing coordinate into the coordinate to be drawn includes:
And determining the coordinate to be drawn by taking the first drawing coordinate after the offset as a horizontal axis coordinate and taking the second drawing coordinate after the offset as a vertical axis coordinate.
S141, determining a drawing mode corresponding to each target data, wherein the drawing mode comprises an icon form or a text form.
For each target data, the corresponding drawing mode during drawing can be determined according to the matched drawing trigger conditions. The drawing trigger condition of the target data matching corresponds to a preset drawing mode, such as an icon form or a text form, which is not limited herein.
And S142, drawing at the coordinate to be drawn corresponding to each target data based on the drawing mode corresponding to each target data, so as to obtain a target curve.
When drawing is performed at the coordinate to be drawn corresponding to the target data, the content to be drawn can be the target data per se, for example, the volume of stock to be drawn exceeding the set volume threshold value can be the volume of stock to be drawn; the drawn content may also be an event corresponding to the target data, for example, when the target data is data corresponding to the date of the expansion and stop of the stock to be drawn, the "the transaction date is the date of the expansion and stop" may be determined as the event corresponding to the target data. And drawing corresponding contents at the coordinates to be drawn corresponding to the target data based on the drawing mode corresponding to each target data to obtain a target curve.
In the technical scheme of the embodiment of the invention, different target data can have corresponding drawing modes, such as icon forms or text forms, the drawn content can be the target data per se or can be an event corresponding to the target data, the drawing is performed at the corresponding coordinates to be drawn based on the drawing modes corresponding to the target data to obtain the target curve, and the drawing modes of the stock curve can be enriched.
Example III
Fig. 3 is a schematic structural diagram of a stock curve drawing device according to a third embodiment of the present invention, where the embodiment is applicable to a case of drawing a stock curve, as shown in fig. 3, the specific structure of the device includes:
An obtaining module 31, configured to obtain curve data of a stock to be drawn within a set time range;
A first determining module 32, configured to traverse the curve data, and determine a target timestamp corresponding to target data when there is a situation that the target data satisfies a drawing trigger condition in the curve data, where the number of the target data is one or more;
A second determining module 33, configured to determine, for each piece of target data, coordinates to be drawn corresponding to the target data, based on a target timestamp corresponding to the target data, the set time range, and a relative position of the target data and a corresponding receiving price when drawing;
And the drawing module 34 is configured to draw at the coordinate to be drawn corresponding to each target data, so as to obtain a target curve.
According to the stock curve drawing device provided by the embodiment, curve data of stocks to be drawn in a set time range is obtained through the obtaining module; traversing the curve data through a first determining module, and determining a target time stamp corresponding to target data when the condition that the target data meets the drawing trigger condition exists in the curve data, wherein the number of the target data is one or more; determining, by a second determining module, coordinates to be drawn corresponding to the target data, based on a target timestamp corresponding to the target data, the set time range, and a relative position of the target data and a corresponding receiving price during drawing, for each target data; and drawing the coordinate to be drawn corresponding to each piece of target data through a drawing module to obtain a target curve. According to the scheme, the drawing is not performed through given time and corresponding data in a certain time range, but performed when the condition that the target data meets the drawing trigger condition exists in the curve data, and the coordinates to be drawn corresponding to the target data during drawing are related to the target time stamp and the set time range corresponding to the target data and the relative position of the target data and the corresponding receiving price during drawing, so that the drawing mode of the stock curve can be enriched.
Further, the second determining module 33 is specifically configured to:
determining a first drawing coordinate based on the relative position of a target timestamp corresponding to the target data in the set time range;
determining a second drawing coordinate based on the relative position of the target data and the closing price corresponding to the target timestamp in drawing;
and determining the coordinate to be drawn corresponding to the target data based on the first drawing coordinate and the second drawing coordinate.
Further, the second determining module 33 is specifically configured to:
Respectively determining the offset of the first drawing coordinate and the offset of the second drawing coordinate according to the size of the canvas and the set time range;
respectively shifting the first drawing coordinate and the second drawing coordinate according to the corresponding offset;
And combining the first drawing coordinate after the offset and the second drawing coordinate after the offset into the coordinate to be drawn.
Further, the second determining module 33 is specifically configured to:
And determining the coordinate to be drawn by taking the first drawing coordinate after the offset as a horizontal axis coordinate and taking the second drawing coordinate after the offset as a vertical axis coordinate.
Further, the drawing triggering conditions include conditions for triggering drawing corresponding to different data indexes of the stock to be drawn, wherein the data indexes are related to the business requirements of the stock to be drawn.
Further, the drawing module 34 is specifically configured to:
Determining a drawing mode corresponding to each piece of target data, wherein the drawing mode comprises an icon form or a text form;
And drawing at the coordinate to be drawn corresponding to each target data based on the drawing mode corresponding to each target data to obtain a target curve.
Further, the obtaining module 31 is specifically configured to:
and acquiring curve data of the stocks to be drawn within a set time range based on the stock identifications corresponding to the stocks to be drawn.
The stock curve drawing device provided by the embodiment of the invention can execute the stock curve drawing method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the executing method.
Example IV
Fig. 4 is a schematic structural diagram of an electronic device implementing a stock curve drawing method according to an embodiment of the present invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 4, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as the stock curve drawing method.
In some embodiments, the stock curve drawing method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the stock curve drawing method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the stock curve drawing method in any other suitable way (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A stock curve drawing method, characterized by comprising:
acquiring curve data of stocks to be drawn within a set time range;
Traversing the curve data, and determining a target time stamp corresponding to target data when the condition that the target data meets the drawing trigger condition exists in the curve data, wherein the number of the target data is one or more;
for each piece of target data, determining a coordinate to be drawn corresponding to the target data based on a target timestamp corresponding to the target data, the set time range and a relative position of the target data and a corresponding receiving price during drawing;
and drawing at the coordinate to be drawn corresponding to each piece of target data to obtain a target curve.
2. The method according to claim 1, wherein determining coordinates to be drawn corresponding to the target data based on a target timestamp corresponding to the target data, the set time range, and a relative position of the target data and a corresponding closing price at the time of drawing, includes:
determining a first drawing coordinate based on the relative position of a target timestamp corresponding to the target data in the set time range;
determining a second drawing coordinate based on the relative position of the target data and the closing price corresponding to the target timestamp in drawing;
and determining the coordinate to be drawn corresponding to the target data based on the first drawing coordinate and the second drawing coordinate.
3. The method of claim 2, wherein determining the coordinates to be drawn corresponding to the target data based on the first drawing coordinates and the second drawing coordinates comprises:
Respectively determining the offset of the first drawing coordinate and the offset of the second drawing coordinate according to the size of the canvas and the set time range;
respectively shifting the first drawing coordinate and the second drawing coordinate according to the corresponding offset;
And combining the first drawing coordinate after the offset and the second drawing coordinate after the offset into the coordinate to be drawn.
4. A method according to claim 3, wherein combining the shifted first drawing coordinate and the shifted second drawing coordinate into the coordinate to be drawn comprises:
And determining the coordinate to be drawn by taking the first drawing coordinate after the offset as a horizontal axis coordinate and taking the second drawing coordinate after the offset as a vertical axis coordinate.
5. The method of claim 1, wherein the drawing trigger conditions include conditions for triggering drawing corresponding to different data indicators of the stock to be drawn, the data indicators being related to business requirements of the stock to be drawn.
6. The method according to claim 1, wherein the drawing at the coordinates to be drawn corresponding to each target data, to obtain a target curve, includes:
Determining a drawing mode corresponding to each piece of target data, wherein the drawing mode comprises an icon form or a text form;
And drawing at the coordinate to be drawn corresponding to each target data based on the drawing mode corresponding to each target data to obtain a target curve.
7. The method of claim 1, wherein obtaining curve data for the stock to be drawn over a set time frame comprises:
and acquiring curve data of the stocks to be drawn within a set time range based on the stock identifications corresponding to the stocks to be drawn.
8. A stock curve drawing apparatus, comprising:
the acquisition module is used for acquiring curve data of stocks to be drawn within a set time range;
The first determining module is used for traversing the curve data, and determining a target timestamp corresponding to the target data when the condition that the target data meets the drawing trigger condition exists in the curve data, wherein the number of the target data is one or more;
The second determining module is used for determining coordinates to be drawn corresponding to the target data based on the target time stamp corresponding to the target data, the set time range and the relative position of the target data and the corresponding receiving price during drawing;
and the drawing module is used for drawing at the coordinate to be drawn corresponding to each piece of target data to obtain a target curve.
9. An electronic device, comprising:
at least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-7.
CN202410497283.9A 2024-04-24 2024-04-24 Stock curve drawing method and device, electronic equipment and storage medium Pending CN118379390A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410497283.9A CN118379390A (en) 2024-04-24 2024-04-24 Stock curve drawing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410497283.9A CN118379390A (en) 2024-04-24 2024-04-24 Stock curve drawing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN118379390A true CN118379390A (en) 2024-07-23

Family

ID=91903485

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410497283.9A Pending CN118379390A (en) 2024-04-24 2024-04-24 Stock curve drawing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN118379390A (en)

Similar Documents

Publication Publication Date Title
CN114662953A (en) Internet of things equipment operation and maintenance method, device, equipment and medium
CN115242731A (en) Message processing method, device, equipment and storage medium
CN116881583A (en) Method and device for calculating matching degree of sensing data and space model of Internet of things
CN118379390A (en) Stock curve drawing method and device, electronic equipment and storage medium
CN114912866A (en) Information association method, device, equipment and storage medium
CN115544010A (en) Mapping relation determining method and device, electronic equipment and storage medium
CN115049369A (en) Project management method and device, electronic equipment and storage medium
CN113254993B (en) Data protection method, apparatus, device, storage medium, and program product
CN116662788B (en) Vehicle track processing method, device, equipment and storage medium
CN116714646B (en) Line test sequence generation method, device, equipment and medium
CN116627695B (en) Alarm event root cause recommendation method, device, equipment and storage medium
CN117235867B (en) BIM planning report modeling examination method, device, equipment and storage medium
CN113220230B (en) Data export method and device, electronic equipment and storage medium
CN117808382A (en) Method, device, equipment and medium for determining transportation progress data
CN117640521A (en) Transaction flow determination method, device, equipment and storage medium
CN116089499A (en) Data statistics method, device and medium based on kafka data volume
CN117885760A (en) Automatic driving capability determining method, device, equipment and storage medium
CN115271505A (en) Operation and maintenance index statistical method, device, platform and storage medium
CN118300745A (en) Message adjustment method, device, equipment and storage medium
CN117216066A (en) Material code generation method, device, equipment and storage medium
CN114844920A (en) Internet of things equipment checking method and device, electronic equipment and storage medium
CN118035181A (en) Data file recycling method, device, equipment and storage medium
CN117632027A (en) Disk space processing method, device, equipment and storage medium
CN117690277A (en) Threshold determining method, device, equipment and storage medium
CN118410021A (en) Data storage optimization method and device, electronic equipment and storage medium

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