CN112965860A - Snapshot market distribution method, device, equipment and storage medium - Google Patents

Snapshot market distribution method, device, equipment and storage medium Download PDF

Info

Publication number
CN112965860A
CN112965860A CN202110267813.7A CN202110267813A CN112965860A CN 112965860 A CN112965860 A CN 112965860A CN 202110267813 A CN202110267813 A CN 202110267813A CN 112965860 A CN112965860 A CN 112965860A
Authority
CN
China
Prior art keywords
snapshot
market
storage area
target
resource
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
CN202110267813.7A
Other languages
Chinese (zh)
Other versions
CN112965860B (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.)
Yusur Technology Co ltd
Original Assignee
Yusur 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 Yusur Technology Co ltd filed Critical Yusur Technology Co ltd
Priority to CN202110267813.7A priority Critical patent/CN112965860B/en
Publication of CN112965860A publication Critical patent/CN112965860A/en
Application granted granted Critical
Publication of CN112965860B publication Critical patent/CN112965860B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • 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

Abstract

The disclosure relates to a snapshot market distribution method, a snapshot market distribution device, a snapshot market distribution equipment and a storage medium. The method comprises the following steps: acquiring resource codes of market data, and determining a target address and a target storage area based on a shared memory according to the resource codes; and generating snapshot quotations of the quotation data in real time according to a preset quotation processing rule of the resource code, and executing distribution operation on the snapshot quotations based on the stored snapshot data in the target storage area so as to distribute the generated snapshot quotations to the target application in real time. The method and the system have the advantages that the snapshot quotation is generated in real time based on the acquired quotation data, and the generated snapshot quotation is distributed to the target application in real time, so that the requirements of low delay and accuracy of various financial practitioners on transactions can be met, the financial practitioners can conveniently acquire the snapshot quotation in real time, and the decision and adjustment can be made according to the snapshot quotation acquired in real time.

Description

Snapshot market distribution method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of information processing technologies, and in particular, to a snapshot market distribution method, apparatus, device, and storage medium.
Background
The snapshot quotation is also called slice quotation, and is a slice data which is issued by a stock exchange, takes stock codes as basic granularity and is used for the stroke-by-stroke (tick) quotation data at a certain moment. At present, a security exchange issues snapshot market information according to a certain time period, the common snapshot market information issuing time is 3s, that is, the market service system receives various market data issued by the security exchange every 3s, including market data of the security in 3s, such as the highest price, the lowest price, the volume of finished deals, and the like, and then directly forwards the market data to each security exchange application, so that a user can know the real-time market through each security exchange application, for example, know information of consignment, finished deal, and the like one by one.
However, as the volume of stock trades increases and stock market quotes change rapidly, the target stock may have many thousands of commissions in a 3 second interval. Therefore, the stock exchange pushes the snapshot quotation once every 3 seconds, so that the financial practitioner cannot acquire the snapshot quotation in real time. Therefore, the current snapshot market data distribution cycle is too long, and the time delay is too long.
Disclosure of Invention
To solve the technical problem or at least partially solve the technical problem, the present disclosure provides a snapshot market distribution method, apparatus, device, and storage medium.
The present disclosure provides a snapshot market distribution method, which includes:
acquiring a resource code of market data;
determining a target address corresponding to the resource code, and determining a target storage area of the resource code based on the target address;
generating snapshot quotations of the quotation data based on a preset quotation processing rule of the resource codes;
and executing distribution operation on the snapshot market based on the stored snapshot data in the target storage area.
In a second aspect, an embodiment of the present invention further provides a snapshot market information distribution apparatus, where the apparatus includes:
the resource code acquisition module is used for acquiring resource codes of the market data;
the target address determining module is used for determining a target address corresponding to the resource code;
a target memory area determination module for determining a target memory area of the resource code based on the target address;
the snapshot market generating module is used for generating snapshot market of the market data based on a preset market processing rule of the resource code;
and the snapshot quotation distribution module is used for executing distribution operation on the snapshot quotation based on the stored snapshot data in the target storage area.
In a third aspect, an embodiment of the present invention further provides a snapshot market distribution device, where the device includes:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the snapshot market distribution method provided by any embodiment of the invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the snapshot market distribution method provided in any embodiment of the present invention
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the following advantages: acquiring resource codes of market data, and determining a target address and a target storage area based on a shared memory according to the resource codes; and generating snapshot quotations of the quotation data in real time according to a preset quotation processing rule of the resource code, and executing distribution operation on the snapshot quotations based on the stored snapshot data in the target storage area so as to distribute the generated snapshot quotations to the target application in real time. Compared with the scheme that the acquired market data are directly forwarded to the securities trading application at set time intervals in the prior art, the method can meet the requirements of low delay and accuracy of trading of various financial practitioners, is convenient for the financial practitioners to acquire the snapshot market in real time, and makes decisions and adjustments according to the snapshot market acquired in real time.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present disclosure, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a flowchart of a snapshot market distribution method according to a first embodiment of the present invention;
fig. 2 is a flowchart of a snapshot market distribution method in the second embodiment of the present invention;
FIG. 3 is a diagram illustrating a snapshot address table according to a second embodiment of the present invention;
FIG. 4 is a diagram of a snapshot storage area in a second embodiment of the present invention;
fig. 5 is a logic diagram of a snapshot market distribution method in the second embodiment of the present invention;
fig. 6 is a schematic structural diagram of a snapshot market distribution apparatus in a third embodiment of the present invention;
fig. 7 is a schematic structural diagram of a snapshot market distribution device in the fourth embodiment of the present invention.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, aspects of the present disclosure will be further described below. It should be noted that the embodiments and features of the embodiments of the present disclosure may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced in other ways than those described herein; it is to be understood that the embodiments disclosed in the specification are only a few embodiments of the present disclosure, and not all embodiments.
Example one
The snapshot market distribution method provided by the embodiment can be suitable for updating the snapshot market to a target application (such as a stock exchange application) in real time. The method can be executed by a snapshot market distribution device, which can be implemented by software and/or hardware, and can be integrated in a device with data operation function, such as a desktop computer or a server. Referring to fig. 1, the method of the present embodiment specifically includes the following steps:
and S110, acquiring a resource code of the market data.
The market data refers to important financial information such as stocks, futures, funds, precious metals, foreign exchanges, and the like. The resource code refers to a code corresponding to a resource name, for example, a stock code, a futures code, a fund code, a precious metal code, a foreign exchange code, and the like.
In order to improve the transmission and calculation efficiency of market data, the embodiment adopts a field programmable gate array (FPGA for short) to receive market data sent by a stock exchange at set time intervals and perform accelerated processing on the market data, the market data subjected to accelerated processing is output to a software side, and the software side extracts resource codes of the market data and executes operations of generating and distributing snapshot market. The FPGA receives the market data and accelerates the market data, so that the transmission speed of the market data can be increased, and the subsequent snapshot generation speed and distribution speed can be increased. Alternatively, the set time period may be a 3 second, 5 second, or the like time period.
S120, determining a target address corresponding to the resource code, and determining a target storage area of the resource code based on the target address.
The target address corresponding to the resource code refers to the snapshot address corresponding to the resource code. The target storage area refers to the storage space allocated to the resource corresponding to the resource code at the stock exchange end.
It is understood that each resource code corresponds to a snapshot address, and each snapshot address corresponds to a unique storage space. When the resource code is obtained, the corresponding address is searched from the software side based on the resource code to be used as a target address, and the target address is used as an index to search the corresponding storage space to be used as a target storage area.
And S130, generating snapshot quotations of the quotation data based on the quotation processing rules of the predetermined resource codes.
The market processing rule may include processing logic of all nodes of each resource. For example, processing logic including nodes for order-by-order, deal-by-deal, exchange original snapshot, buying and selling directions, etc.
In an optional embodiment, the generating a snapshot market of the market data based on the market processing rule of the predetermined resource code includes:
step S1, determining whether a snapshot update exists in the target storage area;
step S2, if the snapshot update exists, and the value matched with the resource code is searched from the quotation data packets pre-stored in the target storage area, the change number of the quotation data packets in the target storage area is updated;
step S3, if the snapshot update exists and the value matched with the resource code is not found in the quotation data packets pre-stored in the target storage area, storing the current value and the change number of the resource code into the quotation data packets in the target storage area, and sequencing the values in the quotation data packets.
Specifically, in step S1, the snapshot behavior in the target storage area is obtained in real time, the snapshot behavior at the current time of the resource code is compared with the snapshot behavior at the previous time, and if the snapshot behavior at the current time is different from the snapshot behavior at the previous time, the snapshot behavior of the resource code in the target storage area is determined to be updated; aiming at the step S2, the quotation data packets pre-stored in the target storage area comprise a 10-grade value queue, the value of the resource code is compared with the value in the 10-grade value queue, if the matched value exists, the snapshot quotation at the current moment is added to the pre-stored quotation data packet, or the snapshot quotation at the current moment is deleted from the pre-stored quotation data packet, namely, the change number in the quotation data packet in the target storage area is updated; in step S3, if there is no matching value, it is indicated that no corresponding value is found from the 10 th value order, the value of the resource code is stored in the market data packet, and the values in the market data packet are sorted, so that the snapshot market at the next time of the current time is generated based on the 10 th value queue in the market data packet.
It should be noted that the market data packet includes, but is not limited to, an order data packet, a transaction data packet, and an order data packet. The number of changes includes, but is not limited to, the number of commissions, the number of deals, and the number of waybills. The value-10 queue may include, but is not limited to, a value-10 commission queue, a value-10 deal queue, and a value-10 de-order queue.
And S140, based on the stored snapshot data in the target storage area, distributing the snapshot quotation.
The stored snapshot data refers to snapshot data stored before the current time. Optionally, the performing a distribution operation on the snapshot market based on the stored snapshot data in the target storage area includes: performing ping-pong operation on the stored snapshot data to copy the stored snapshot data from the target storage area to a corresponding new storage area; and determining a market situation type corresponding to the snapshot market situation, updating relevant parameters in the commission/commission queue in the new storage area based on a distribution rule corresponding to the market situation type and the snapshot market situation, updating the new storage area to a pre-established snapshot address table, and distributing the updated relevant parameters in the commission/commission queue in the new storage area to a target application.
The ping-pong operation refers to a process of copying data in the ping address to the pong address. The market types include: a transaction-by-transaction delegation type, a transaction-by-transaction type, an exchange original snapshot type, etc. The purchase/sale queue can be understood as the purchase/sale direction and can comprise related parameters such as the lowest price, the bargain price, the highest price stop-and-go price, the drop-and-stop price and the like of the purchase/sale direction of each resource. The target application refers to the stock exchange application of each stock exchange, and a financial practitioner can acquire snapshot quotations from the stock exchange application, so that the financial practitioner can make decisions and adjustments on exchange products conveniently.
Specifically, when a snapshot quotation is received, if the target storage area is consistent with the ping address, the snapshot data stored in the ping address is copied to the pong address, and the pong address is used as a new storage area; and if the target storage area is consistent with the pong address, copying the snapshot data stored in the pong address to the ping address, and taking the ping address as a new storage area. And then, performing binary protocol analysis on the acquired market data, determining market types corresponding to the snapshot market, wherein each market type corresponds to a distribution rule, extracting relevant parameters in a purchase/sale queue copied in a new storage area according to the distribution rule corresponding to each snapshot market, comparing the values in the purchase/sale queue with the values in the generated snapshot market, updating the relevant parameters in the purchase/sale queue in the new storage area if the values are consistent, updating the new storage area to a pre-established snapshot address table, and distributing the relevant parameters in the purchase/sale queue updated in the new storage area to a target application.
The double physical shared memory is opened up for each stock for ping-pong storage, so that conflict between reading and writing processes is avoided, and time waste caused by locking and semaphore can be effectively reduced by the method, so that market processing and reading performance is improved.
According to the technical scheme of the embodiment, resource codes of market data are obtained, and a target address and a target storage area based on a shared memory are determined according to the resource codes; and generating snapshot quotations of the quotation data in real time according to a preset quotation processing rule of the resource code, and executing distribution operation on the snapshot quotations based on the stored snapshot data in the target storage area so as to distribute the generated snapshot quotations to the target application in real time. Compared with the scheme that the acquired market data are directly forwarded to the securities trading application at set time intervals, the scheme has the advantages that the requirements of low delay and accuracy of trading of financial practitioners can be met, the financial practitioners can conveniently acquire the snapshot market in real time, and make decisions and adjustments according to the snapshot market acquired in real time.
Example two
On the basis of the first embodiment, the present embodiment refines "determining a target address and a target storage area, and performing a distribution operation on a snapshot market". Wherein explanations of the same or corresponding terms as those of the above embodiments are omitted. Referring to fig. 2, the snapshot market distribution method provided in this embodiment includes:
s210, acquiring resource codes of market data.
S220, with the resource codes as indexes, searching the address offset of the resource codes from the pre-established snapshot address table to be used as target addresses of the resource codes, and determining the target storage areas of the resource codes based on the target addresses and the pre-established snapshot storage areas.
Before the resource codes of the market data are acquired, a snapshot address table based on the shared memory and a snapshot storage area based on the shared content are established in advance in the memory on the software side. Fig. 3 is a schematic diagram of a snapshot address table, and fig. 4 is a schematic diagram of a snapshot storage area. The snapshot address table in fig. 3 is composed of a shared memory area with a fixed size, the size of which is 20000 bytes, and is used to store the address offset of each resource code, and the currently acquired resource code is used as an index to search the address offset of the resource code from the snapshot address table, which is used as the target address of the currently acquired resource code. The shared memory area is represented by a matrix, wherein each row of the matrix is represented by a high three-bit map of each resource code (e.g., stock code), and each column of the matrix is represented by a low three-bit map of each resource code (e.g., stock code). The snapshot storage area is composed of a shared memory area with a fixed size, two continuous spaces can be applied for each resource, a snapshot address table is initialized by the address (such as a ping address) of each resource code, and the target storage area of the resource code is searched according to the determined target address and the preset snapshot storage area. For example, if the resource in fig. 4 is a stock, the snapshot quote involves a memory ping-pong operation, applying two contiguous spaces for each stock, and if 5000 stocks are reserved, the memory size is 5000 x 2 x 16048-160480000 bytes.
And S230, generating snapshot quotations of the quotation data based on the quotation processing rules of the predetermined resource codes.
And S240, performing ping-pong operation on the stored snapshot data to copy the stored snapshot data from the target storage area to the corresponding new storage area.
And S250, determining the market situation type corresponding to the snapshot market situation.
And S260, if the market type is an individual consignment type, matching the related parameters of the resource codes with the related parameters in the consignment/consignment queue in the new storage area, and changing the quantity and/or value of the resources in the consignment/consignment queue in the new storage area according to the matching result so as to update the related parameters in the consignment/consignment queue in the new storage area.
Specifically, if the market type is an order-by-order entrusting type, the snapshot market is taken as a market data packet, the order number and the value contained in the market data packet are stored in a pre-established order storage linked list, the order storage linked list stores relevant parameters of an order-by-order transaction type, an order-by-order entrusting type and an order removing type in advance, the relevant parameters of the resource codes are matched with the relevant parameters in an order buying/selling queue in a new storage area (such as a pong address), and if the matching is successful, the quantity of the resources at the gear is added with the quantity of the resources in the order buying/selling queue to record the quantity of the resources entrusted at the gear; if the matching fails, the value and the quantity of the order are stored in an order buying/order selling queue, and the ordering is carried out according to the value, so that the resources with low value are arranged in front and the resources with high value are arranged behind, the information inquiry of the target application is facilitated, and the operation of updating the relevant parameters in the order buying/order selling queue in the new storage area is completed.
S270, if the market type is a transaction type, traversing a pre-established order storage linked list, searching a node corresponding to the resource code and acquiring a corresponding value, updating the quantity and/or the value of the resource in the purchase/sale queue in the new storage area according to the searched node and value, and updating the related parameters of the resource code in the new storage area.
The relevant parameters may include parameters such as the highest price, the lowest price, the volume of bargaining and the volume of bargaining of the resource. Specifically, if the market type is a transaction type, traversing a pre-established order storage linked list, finding a node matched with the transaction and acquiring a corresponding value; subtracting the resource quantity in the transaction from the resource quantity of the value gear in the consignment/consignment queue, comparing the value in the transaction market with the highest price and the lowest price of the resource in the new storage area in the snapshot storage area, and updating the highest price or the lowest price of the resource in the new storage area; and further updating the volume and the volume of the transaction of the resources in the new storage area. For example, volume of transaction is original volume of transaction in snapshot + volume of transaction; the initial bargain amount + the bargain price/10000 times the bargain amount in the snapshot.
S280, if the market type is the original snapshot type of the exchange, extracting relevant parameters from the snapshot market, and updating the relevant parameters in the buying/selling queue in the new storage area based on the extracted relevant parameters.
The exchange original snapshot type refers to various states of recording information at a certain moment. The market situation type is the original snapshot type of the exchange, and relevant parameters are extracted from the snapshot market situation. For example, related parameters such as opening price, yesterday collecting price, rising price, falling price and the like in the snapshot market are extracted, and related parameters in the commission/commission queue in the new storage area are updated based on the extracted related parameters.
S260 to S280 in fig. 2 are executed in parallel. In specific implementation, S260 to S280 may also be executed in sequence based on the order according to the time points, that is, the step of updating the relevant parameters in the consignment/consignment queue in the new storage area is executed first, where the market type is the distribution rule corresponding to each consignment type; then, the step of updating the relevant parameters in the buying/selling commission queue in the new storage area is executed, and the whole step of updating the relevant parameters in the commission/commission queue in the new storage area is completed.
And S290, updating the new storage area to a pre-established snapshot address table, and distributing the updated related parameters in the commission/commission queue in the new storage area to the target application.
Fig. 5 is a logic diagram of a snapshot market distribution method. The above process is explained in conjunction with fig. 5. Firstly, the resource code of market data is obtained through the FPGA, whether the market data is stroke-by-stroke data is judged, if the market data is stroke-by-stroke data, and the quotation type of the quotation data is a consignation type one by one or a transaction type one by one, the resource codes are extracted, the corresponding addresses of the resource codes are determined, namely, by executing ping-pong operation on the stored snapshot data in the target area of the resource code, determining a new storage area of the resource code, matching the value of the resource code with the relevant parameters in the commission/commission queue in the new memory area according to the purchase and sale direction and the relevant parameters in the commission/commission queue in the new memory area, changing the quantity and/or value of the resource in the commission/commission queue in the new memory area and updating the address offset of the resource, namely, the new storage area is updated to a pre-established snapshot address table, and the updated related parameters in the commission/commission queue in the new storage area are further distributed to the target application.
According to the technical scheme of the embodiment, based on the distribution rule and the snapshot market corresponding to the market type, the relevant parameters in the commission/commission queue in the new storage area are updated in a targeted manner, the new storage area is updated to the pre-established snapshot address table, the updated relevant parameters in the commission/commission queue in the new storage area are distributed to the target application, so that the distribution operation is executed by executing the snapshot market in order, the distribution accuracy of the snapshot market is improved, and the requirements of financial practitioners on low delay and accuracy of transactions are met.
The following is an embodiment of the snapshot market quotation distribution device provided in the embodiments of the present invention, and the device and the snapshot market quotation distribution method in the embodiments described above belong to the same inventive concept, and details that are not described in detail in the embodiment of the snapshot market quotation distribution device may refer to the embodiment of the snapshot market quotation distribution method described above.
EXAMPLE III
The present embodiment provides a snapshot market distribution apparatus, and referring to fig. 6, the apparatus specifically includes:
a resource code obtaining module 310, configured to obtain a resource code of the market data;
a target address determining module 320, configured to determine a target address corresponding to the resource code;
a target memory area determination module 330, configured to determine a target memory area of the resource code based on the target address;
a snapshot market generating module 340, configured to generate a snapshot market of the market data based on a market processing rule of the predetermined resource code;
and a snapshot market distribution module 350, configured to perform a distribution operation on the snapshot market based on the stored snapshot data in the target storage area.
Optionally, the target address determining module 320 is specifically configured to: and searching the address offset of the resource code from a pre-established snapshot address table by taking the resource code as an index to serve as the target address of the resource code.
Optionally, the target storage area determining module 330 is specifically configured to: and determining a target storage area of the resource codes based on the target address and a pre-established snapshot storage area.
Optionally, the snapshot market distribution module 350 is specifically configured to: determining whether a snapshot update exists in the target storage area;
if the snapshot update exists, searching the value matched with the resource code from the quotation data packets prestored in the target storage area, and updating the change number of the quotation data packets in the target storage area;
and if snapshot updating exists and the value matched with the resource codes is not found in the quotation data packets prestored in the target storage area, storing the current value and the change quantity of the resource codes into the quotation data packets in the target storage area and sequencing the values in the quotation data packets.
Optionally, the snapshot market distribution module 350 includes: a ping-pong operation subunit, configured to perform a ping-pong operation on the stored snapshot data, so as to copy the stored snapshot data from the target storage area to a corresponding new storage area;
and the distribution subunit is used for determining the market situation type corresponding to the snapshot market situation, updating the relevant parameters in the purchase/sale delegation queue in the new storage area based on the distribution rule corresponding to the market situation type and the snapshot market situation, updating the new storage area to a pre-established snapshot address table, and distributing the relevant parameters in the purchase/sale delegation queue updated in the new storage area to a target application.
Optionally, the distribution subunit is specifically configured to, if the market type is an entrustment-by-entrustment type, match the relevant parameter of the resource code with the relevant parameter in the entrustment/consignment queue in the new storage area;
and according to the matching result, the quantity and/or value of the resources in the buying/selling queue in the new memory area are changed so as to update the relevant parameters in the buying/selling queue in the new memory area.
Optionally, the distribution subunit is specifically configured to, if the market type is a transaction type, traverse a pre-created order storage linked list, search for a node corresponding to the resource code, and obtain a corresponding value;
and updating the quantity and/or the value of the resources in the purchase/sale queue in the new storage area and updating the related parameters of the resource codes in the new storage area according to the searched nodes and values.
Optionally, the distribution subunit is specifically configured to, if the market type is an original exchange snapshot type, extract the relevant parameter from the snapshot market, and update the relevant parameter in the commission/commission queue in the new storage area based on the extracted relevant parameter.
The snapshot market information distribution device provided by the embodiment reduces the calculation and generation period of the snapshot market information, shortens the distribution period of the snapshot market information, and facilitates the financial practitioner to obtain the effect of the snapshot market information in real time.
The snapshot market information distribution device provided by the embodiment of the invention can execute the snapshot market information distribution method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
It should be noted that, in the embodiment of the snapshot market distribution apparatus, each included unit and module are only divided according to functional logic, but are not limited to the above division, as long as the corresponding function can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
Example four
Referring to fig. 7, the present embodiment provides an apparatus 500 comprising: one or more processors 520; the storage 510 is configured to store one or more programs, and when the one or more programs are executed by the one or more processors 520, the one or more processors 520 implement the snapshot market distribution method provided in the embodiment of the present invention, including:
acquiring a resource code of market data;
determining a target address corresponding to the resource code, and determining a target storage area of the resource code based on the target address;
generating snapshot quotations of the quotation data based on a preset quotation processing rule of the resource codes;
and executing distribution operation on the snapshot market based on the stored snapshot data in the target storage area.
Of course, those skilled in the art can understand that the processor 520 may also implement the technical solution of the snapshot market distribution method provided in any embodiment of the present invention.
The device 500 shown in fig. 7 is only an example and should not bring any limitations to the functionality and scope of use of the embodiments of the present invention.
As shown in fig. 7, the apparatus 500 includes a processor 520, a storage device 510, an input device 530, and an output device 540; the number of the processors 520 in the device may be one or more, and one processor 520 is taken as an example in fig. 7; the processor 520, the memory device 510, the input device 530 and the output device 540 of the apparatus may be connected by a bus or other means, such as by a bus 550 in fig. 7.
The storage device 510, which is a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the snapshot market method in the embodiment of the present invention (for example, the resource code obtaining module 310, the target address determining module 320, the target storage area determining module 330, the snapshot market generating module 340, and the snapshot market distributing module 350 in the snapshot market distributing device).
The storage device 510 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the storage 510 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, storage 510 may further include memory located remotely from processor 520, which may be connected to devices over 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 input device 530 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the apparatus, and may include at least one of a mouse, a keyboard, and a touch screen, for example. The output device 540 may include a display device such as a display screen.
EXAMPLE five
The present embodiments provide a storage medium containing computer-executable instructions that, when executed by a computer processor, are operable to perform a snapshot market distribution method, the method comprising:
acquiring a resource code of market data;
determining a target address corresponding to the resource code, and determining a target storage area of the resource code based on the target address;
generating snapshot quotations of the quotation data based on a preset quotation processing rule of the resource codes;
and executing distribution operation on the snapshot market based on the stored snapshot data in the target storage area.
Of course, the storage medium provided by the embodiment of the present invention includes computer-executable instructions, and the computer-executable instructions are not limited to the operations of the method described above, and may also perform related operations in the snapshot market quotation distribution method provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment 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 may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) to execute the snapshot market distribution method provided in the embodiments of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A snapshot market distribution method is characterized by comprising the following steps:
acquiring a resource code of market data;
determining a target address corresponding to the resource code, and determining a target storage area of the resource code based on the target address;
generating snapshot quotations of the quotation data based on a preset quotation processing rule of the resource codes;
and executing distribution operation on the snapshot market based on the stored snapshot data in the target storage area.
2. The method of claim 1, wherein determining the target address corresponding to the resource code and determining the target storage area of the resource code based on the target address comprises:
searching the address offset of the resource code from a pre-established snapshot address table by taking the resource code as an index to serve as a target address of the resource code;
and determining a target storage area of the resource codes based on the target address and a pre-established snapshot storage area.
3. The method according to claim 1, wherein the generating a snapshot market of the market data based on a market processing rule of the resource code determined in advance comprises:
determining whether a snapshot update exists in the target storage area;
if the snapshot update exists, searching the value matched with the resource code from the quotation data packets prestored in the target storage area, and updating the change number of the quotation data packets in the target storage area;
and if snapshot updating exists and the value matched with the resource codes is not found in the quotation data packets prestored in the target storage area, storing the current value and the change quantity of the resource codes into the quotation data packets in the target storage area and sequencing the values in the quotation data packets.
4. The method of claim 1, wherein performing a distribution operation on the snapshot market based on the stored snapshot data in the target storage area comprises:
performing ping-pong operation on the stored snapshot data to copy the stored snapshot data from the target storage area to a corresponding new storage area;
and determining a market situation type corresponding to the snapshot market situation, updating relevant parameters in the commission/commission queue in the new storage area based on a distribution rule corresponding to the market situation type and the snapshot market situation, updating the new storage area to a pre-established snapshot address table, and distributing the updated relevant parameters in the commission/commission queue in the new storage area to a target application.
5. The method according to claim 4, wherein the updating the relevant parameters in the commission/commission queue in the new storage area based on the distribution rule corresponding to the market type corresponding to the market data comprises:
if the market type is a successive consignment type, matching the related parameters of the resource codes with the related parameters in the consignment/consignment queue in the new storage area;
and according to the matching result, the quantity and/or value of the resources in the buying/selling queue in the new memory area are changed so as to update the relevant parameters in the buying/selling queue in the new memory area.
6. The method according to claim 4, wherein the updating the relevant parameters in the commission/commission queue in the new storage area based on the distribution rule corresponding to the market type corresponding to the market data comprises:
if the market type is a transaction type, traversing a pre-established order storage linked list, searching nodes corresponding to the resource codes and acquiring corresponding values;
and updating the quantity and/or the value of the resources in the purchase/sale queue in the new storage area and updating the related parameters of the resource codes in the new storage area according to the searched nodes and values.
7. The method according to claim 4, wherein the updating the relevant parameters in the commission/commission queue in the new storage area based on the distribution rule corresponding to the market type corresponding to the market data comprises:
and if the market type is the original snapshot type of the exchange, extracting relevant parameters from the snapshot market, and updating the relevant parameters in the buying/selling queue in the new storage area based on the extracted relevant parameters.
8. A snapshot market distribution apparatus, comprising:
the resource code acquisition module is used for acquiring resource codes of the market data;
the target address determining module is used for determining a target address corresponding to the resource code;
a target memory area determination module for determining a target memory area of the resource code based on the target address;
the snapshot market generating module is used for generating snapshot market of the market data based on a preset market processing rule of the resource code;
and the snapshot quotation distribution module is used for executing distribution operation on the snapshot quotation based on the stored snapshot data in the target storage area.
9. A snapshot market distribution apparatus, characterized in that the apparatus comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a snapshot market distribution method as recited in any one of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a snapshot market distribution method according to one of claims 1 to 7.
CN202110267813.7A 2021-03-11 2021-03-11 Snapshot market distribution method, device, equipment and storage medium Active CN112965860B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110267813.7A CN112965860B (en) 2021-03-11 2021-03-11 Snapshot market distribution method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110267813.7A CN112965860B (en) 2021-03-11 2021-03-11 Snapshot market distribution method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112965860A true CN112965860A (en) 2021-06-15
CN112965860B CN112965860B (en) 2022-02-11

Family

ID=76277352

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110267813.7A Active CN112965860B (en) 2021-03-11 2021-03-11 Snapshot market distribution method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112965860B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113313596A (en) * 2021-07-28 2021-08-27 深圳华锐金融技术股份有限公司 Index snapshot issuing method, device, equipment and medium
CN113691586A (en) * 2021-07-16 2021-11-23 北京达佳互联信息技术有限公司 Resource distribution method and device, electronic equipment and storage medium
CN113989011A (en) * 2021-12-28 2022-01-28 深圳华锐金融技术股份有限公司 Market data processing method and device, computer equipment and readable storage medium
CN114124668A (en) * 2021-11-03 2022-03-01 上证所信息网络有限公司 System and method for ensuring consistency of market quotation slices of multiple hosts
CN115080573A (en) * 2022-08-19 2022-09-20 深圳星云智联科技有限公司 Data processing method and device, electronic equipment and storage medium
CN115686869A (en) * 2022-12-29 2023-02-03 杭州迈拓大数据服务有限公司 Resource processing method, system, electronic device and storage medium
CN116226155A (en) * 2023-05-08 2023-06-06 中信建投证券股份有限公司 Data updating method and device, electronic equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6061770A (en) * 1997-11-04 2000-05-09 Adaptec, Inc. System and method for real-time data backup using snapshot copying with selective compaction of backup data
US7624063B1 (en) * 2003-09-30 2009-11-24 Trading Technologies International, Inc. System and method for improved distribution of market information
CN106293535A (en) * 2016-08-12 2017-01-04 浪潮(北京)电子信息产业有限公司 The performance optimization method of a kind of NAS and device
CN108491136A (en) * 2018-03-30 2018-09-04 深圳市富途网络科技有限公司 A kind of method and system for being inserted into stock market snapshot contents in editing machine
CN109710182A (en) * 2018-12-14 2019-05-03 北京向上一心科技有限公司 Market data processing method, device and controller and medium
CN110190974A (en) * 2019-05-31 2019-08-30 深圳市思迪信息技术股份有限公司 Present quotation data distributing method and device
CN110781387A (en) * 2019-10-10 2020-02-11 深圳证券交易所 Pushing method of stock market snapshot, stock trading system and storage medium
CN111583042A (en) * 2020-05-13 2020-08-25 恒生电子股份有限公司 Option real-time data calculation method, option real-time data calculation system, option real-time data storage medium and electronic device
CN111861743A (en) * 2020-06-29 2020-10-30 浪潮电子信息产业股份有限公司 Method, device and equipment for reconstructing market quotation based on stroke-by-stroke data
CN112000675A (en) * 2019-05-27 2020-11-27 招商证券股份有限公司 Market data updating method and device, terminal equipment and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6061770A (en) * 1997-11-04 2000-05-09 Adaptec, Inc. System and method for real-time data backup using snapshot copying with selective compaction of backup data
US7624063B1 (en) * 2003-09-30 2009-11-24 Trading Technologies International, Inc. System and method for improved distribution of market information
CN106293535A (en) * 2016-08-12 2017-01-04 浪潮(北京)电子信息产业有限公司 The performance optimization method of a kind of NAS and device
CN108491136A (en) * 2018-03-30 2018-09-04 深圳市富途网络科技有限公司 A kind of method and system for being inserted into stock market snapshot contents in editing machine
CN109710182A (en) * 2018-12-14 2019-05-03 北京向上一心科技有限公司 Market data processing method, device and controller and medium
CN112000675A (en) * 2019-05-27 2020-11-27 招商证券股份有限公司 Market data updating method and device, terminal equipment and storage medium
CN110190974A (en) * 2019-05-31 2019-08-30 深圳市思迪信息技术股份有限公司 Present quotation data distributing method and device
CN110781387A (en) * 2019-10-10 2020-02-11 深圳证券交易所 Pushing method of stock market snapshot, stock trading system and storage medium
CN111583042A (en) * 2020-05-13 2020-08-25 恒生电子股份有限公司 Option real-time data calculation method, option real-time data calculation system, option real-time data storage medium and electronic device
CN111861743A (en) * 2020-06-29 2020-10-30 浪潮电子信息产业股份有限公司 Method, device and equipment for reconstructing market quotation based on stroke-by-stroke data

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张延雄: "GPS精确授时及其快照数据采集系统的研究和实现", 《中国优秀硕士学位论文全文数据库基础科学辑》 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113691586A (en) * 2021-07-16 2021-11-23 北京达佳互联信息技术有限公司 Resource distribution method and device, electronic equipment and storage medium
CN113691586B (en) * 2021-07-16 2023-05-12 北京达佳互联信息技术有限公司 Resource distribution method and device, electronic equipment and storage medium
CN113313596A (en) * 2021-07-28 2021-08-27 深圳华锐金融技术股份有限公司 Index snapshot issuing method, device, equipment and medium
CN114124668A (en) * 2021-11-03 2022-03-01 上证所信息网络有限公司 System and method for ensuring consistency of market quotation slices of multiple hosts
CN113989011A (en) * 2021-12-28 2022-01-28 深圳华锐金融技术股份有限公司 Market data processing method and device, computer equipment and readable storage medium
CN115080573A (en) * 2022-08-19 2022-09-20 深圳星云智联科技有限公司 Data processing method and device, electronic equipment and storage medium
CN115080573B (en) * 2022-08-19 2022-11-01 深圳星云智联科技有限公司 Data processing method and device, electronic equipment and storage medium
CN115686869A (en) * 2022-12-29 2023-02-03 杭州迈拓大数据服务有限公司 Resource processing method, system, electronic device and storage medium
CN116226155A (en) * 2023-05-08 2023-06-06 中信建投证券股份有限公司 Data updating method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112965860B (en) 2022-02-11

Similar Documents

Publication Publication Date Title
CN112965860B (en) Snapshot market distribution method, device, equipment and storage medium
CN104699725B (en) data search processing method and system
CN111629051B (en) Performance optimization method and device for industrial internet identification analysis system
CN110825966B (en) Information recommendation method and device, recommendation server and storage medium
CN111506849A (en) Page generation method and device
WO2022110990A1 (en) Account management method and related product
CN111694841A (en) Order mark generation method, device, server and storage medium
CA2992747A1 (en) System and associated methodology of creating order lifecycles via daisy chain linkage
CN110727857A (en) Method and device for identifying key features of potential users aiming at business objects
CN112053143A (en) Fund routing method, apparatus, electronic device and storage medium
WO2022134829A1 (en) Method and apparatus for identifying same user, and computer device and storage medium
CN110427358A (en) Data cleaning method and device and information recommendation method and device
CN107292694A (en) The generation method and system of buying order
CN111950237B (en) Sentence rewriting method, sentence rewriting device and electronic equipment
CN116521945A (en) Method for constructing fund association diagram for block chain encrypted currency transaction traceability and control system
CN115168509A (en) Processing method and device of wind control data, storage medium and computer equipment
CN111400608B (en) Data processing method and device, storage medium and electronic equipment
CN114926253A (en) Market snapshot generation method and device and electronic equipment
CN110929207B (en) Data processing method, device and computer readable storage medium
CN112181964A (en) Business notification duplicate removal method, device, server and storage medium
CN114238576A (en) Data matching method and device, computer equipment and storage medium
CN111488490A (en) Video clustering method, device, server and storage medium
CN114186024A (en) Recommendation method and device
CN112395408A (en) Stop word list generation method and device, electronic equipment and storage medium
CN112231481A (en) Website classification method and device, computer 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
GR01 Patent grant
GR01 Patent grant