CN113656464A - Access method, acquisition method, access device and acquisition device of real-time quotation - Google Patents

Access method, acquisition method, access device and acquisition device of real-time quotation Download PDF

Info

Publication number
CN113656464A
CN113656464A CN202110960336.2A CN202110960336A CN113656464A CN 113656464 A CN113656464 A CN 113656464A CN 202110960336 A CN202110960336 A CN 202110960336A CN 113656464 A CN113656464 A CN 113656464A
Authority
CN
China
Prior art keywords
market
data
quotation
time
real
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
CN202110960336.2A
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202110960336.2A priority Critical patent/CN113656464A/en
Publication of CN113656464A publication Critical patent/CN113656464A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2474Sequence data queries, e.g. querying versioned data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/215Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/258Data format conversion from or to a database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/285Clustering or classification
    • 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 invention provides an access method, an acquisition method, an access device and an acquisition device of real-time quotation, which relate to the field of finance, wherein the access method of the real-time quotation comprises the following steps: receiving market data from a data source in real time, and classifying the market data according to service types; extracting key field information of market data in a corresponding class according to market characteristics of each service type; and combining the key field information of the market data according to a preset ID generation rule to obtain the ID of the market data for the market consumers to subscribe. The real-time quotation access method realizes the uniform access of real-time quotation by accessing multi-dimensional real-time quotation from a heterogeneous data source, carrying out standardized processing on the quotation data, generating a unique quotation ID and the like.

Description

Access method, acquisition method, access device and acquisition device of real-time quotation
Technical Field
The present application relates to the field of finance, and in particular, to an access method, an acquisition method, an access apparatus, and an acquisition apparatus for real-time quotation.
Background
The real-time market information in the traditional financial field is generally transmitted by a directional transmission mode, namely, a message provider and a message consumer define a data range, and market information is sent to the message consumer by the message provider in a mode such as an HTTP (hyper text transport protocol); another commonly used market message transmission mode is a message queue transmission mode, in which a message provider sends market information to a message queue, and a message consumer consumes market information from the message queue.
Under the scene of directional transmission real-time quotation, when the message range used by a message user or a message consumer is changed, the message user and the message consumer need to develop again according to a new range, and meanwhile, when a new message user appears, a message provider also needs to develop in cooperation with the message consumer, so that convenient expansion cannot be realized; when the market is transmitted by adopting the message queue mode, although the inconvenience caused by the coupling relationship between the data provider and the consumer in the directional transmission mode can be solved to a certain extent, the data topic information is introduced by subscribing the market through the message queue, and the mapping relationship between the market and the data topic needs to be synchronously maintained upstream and downstream of the message, so that the market is not flexible.
Disclosure of Invention
The application provides an access method of real-time quotation, which relates to the field of finance, and comprises the following steps:
receiving real-time market data from a multi-data source, and classifying the market data according to the service type;
extracting key field information of market data in a corresponding class according to market characteristics of each service type;
and combining the key field information of the market data according to a preset ID generation rule to obtain the ID of the market data for the market consumers to subscribe.
In an embodiment, the real-time market access method further includes:
receiving a market subscription request of a market consumer, wherein the market subscription request comprises a market ID to be subscribed by the market consumer;
judging whether the market situation ID to be subscribed exists; if yes, sending corresponding market information data to the market information consumer; if not, returning subscription error information to the market consumers.
In an embodiment, after the receiving the market data from the data source in real time, the method further includes:
aligning EventTime timestamps of the market data.
In an embodiment, after classifying the market data according to the service type, the method further includes:
and respectively carrying out format conversion on various market data according to a preset standard data structure.
In an embodiment, after obtaining the ID of the market data, the method further includes:
performing time window check on the market data;
and when the time difference between the time represented by the EventTime timestamp of the market data and the current time exceeds a time threshold, marking the market data as the expired market.
In an embodiment, after obtaining the ID of the market data, the method further includes:
carrying out price hang-up check on the market data;
and when the buying price in the market data is higher than the selling price, marking the market data as abnormal market.
The application also provides a real-time market information acquisition method, which comprises the following steps:
acquiring an ID generation rule of the market data to be consumed from a market provider according to the service type of the market data to be consumed;
splicing the key field information corresponding to the market data to be consumed according to the ID generation rule to obtain the ID of the market data to be consumed;
sending the ID of the market data to be consumed to a market provider;
and receiving the market data returned by the market provider according to the ID of the market data to be consumed.
The application also provides another real-time market acquisition method, which comprises the following steps:
the quotation consumption method comprises the steps that a quotation consumption party sends an ID of quotation data to be consumed to a quotation provider, wherein the ID of the quotation data is obtained by splicing the quotation consumption party according to an ID generation rule of the quotation data to be consumed and key field information corresponding to the quotation data to be consumed, and the ID generation rule of the quotation data to be consumed is obtained by the quotation consumption party from the quotation provider;
the market provider returns address information corresponding to the market data to be consumed according to the ID of the market data to be consumed;
the market condition consumer initiates a market condition subscription request to the market condition provider according to the address information, wherein the market condition subscription request comprises an ID of market condition data to be consumed;
the quotation provider judges whether the ID of the quotation data to be consumed is contained in a quotation list or not; the quotation list is generated by a quotation provider according to key field information of the quotation data received from the data source in real time and a corresponding ID generation rule;
if yes, returning corresponding market data; if not, returning subscription error information.
The present application further provides an access device for real-time quotation, the access device comprising:
the real-time market receiving module is used for receiving real-time market data from a multi-data source and classifying the market data according to the service type;
the market information extraction module is used for extracting key field information of market data in the corresponding class according to the market characteristics of each service type;
and the quotation ID generation module is used for combining the key field information of the quotation data according to a preset ID generation rule to obtain the ID of the quotation data for the quotation consumers to subscribe.
In an embodiment, the real-time market access device further includes:
the market subscription request receiving module is used for receiving a market subscription request of a market consumer, wherein the market subscription request comprises a market ID to be subscribed by the market consumer;
the market data sending module is used for judging whether the market ID to be subscribed exists; if yes, sending corresponding market information data to the market information consumer; if not, returning subscription error information to the market consumers.
In an embodiment, the real-time market access device further includes a market data marking module, configured to:
after the ID of the market data is obtained, time window inspection is carried out on the market data; when the time difference between the time represented by the EventTime timestamp of the market data and the current time exceeds a time threshold, marking the market data as an expired market; and
carrying out price hang-up check on the market data;
and when the buying price in the market data is higher than the selling price, marking the market data as abnormal market.
The application also provides an acquisition device of real-time quotation, and this acquisition device includes:
the system comprises a market ID generation rule acquisition module, a market ID generation rule acquisition module and a market ID generation rule acquisition module, wherein the market ID generation rule acquisition module is used for acquiring an ID generation rule of market data to be consumed from a market provider according to the service type of the market data to be consumed;
the market ID generation module is used for splicing the key field information corresponding to the market data to be consumed according to the ID generation rule to obtain the ID of the market data to be consumed;
the communication module is used for sending the ID of the market data to be consumed to the market provider; and
and receiving the market data returned by the market provider according to the ID of the market data to be consumed.
The real-time market access method and the access device realize the uniform access of real-time market by formulating a market standard, introducing a Flink frame, adopting a plurality of dimensionalities such as a native TCP (transmission control protocol) protocol, coding and decoding and the like, adopting the multi-dimensionality real-time market accessed from a heterogeneous data source, carrying out standardized processing on market data, generating a unique market ID and the like. The real-time quotation acquisition method and the acquisition device of the application are applied in cooperation with the real-time quotation access method and the access device of the application, so that the defects that a quotation consumer cannot conveniently expand and cannot flexibly subscribe the information in the traditional real-time quotation information consumption (the consumption range is appointed or the information queue is used) process are well overcome, the quotation data is subscribed as required, the use complexity of the quotation consumer is reduced, and the transmission performance of the real-time quotation is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram of a real-time market access method according to the present application.
Fig. 2 is another schematic diagram of the real-time market access method.
Fig. 3 is another schematic diagram of the real-time market access method.
Fig. 4 is another schematic diagram of the real-time market access method.
Fig. 5 is a schematic diagram of a real-time market information obtaining method according to the present application.
Fig. 6 is a schematic diagram of a real-time market access device according to the present application.
Fig. 7 is another schematic diagram of the real-time market access device.
Fig. 8 is another schematic diagram of the real-time market access device.
Fig. 9 is a schematic diagram of a real-time market information acquiring apparatus according to the present application.
Fig. 10 is a schematic diagram of an electronic device.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The application provides an access method of real-time quotation, which relates to the field of finance, and as shown in figure 1, the access method comprises the following steps:
step S101, receiving real-time market data from a multi-data source, and classifying the market data according to service types.
Specifically, taking a Flink framework as an example, real-time market data is received from heterogeneous data sources using a Flink DataSource operator. The heterogeneous data sources include, but are not limited to, an open source flow processing platform Kafka, a database management system Mysql, a network communication connection port Socket, and various types of texts. Streaming market data can be received from Kafka in real time, market data can be inquired and received from Mysql in batches, market data can be received from Socket in real time, and batch market data can be received from various texts line by line. The format of the market data received from the heterogeneous data source is the Json string format.
Meanwhile, as the characteristics of the market data of different service types are different, the step classifies the received real-time market data, the classified market mainly comprises the types of foreign currency market, precious metal market, position market, exposure information and the like, so that each market data can be conveniently converted into a corresponding standard data structure according to different service types, and the specific data conversion step is explained in the following embodiment.
And step S102, extracting key field information of market data in the corresponding class according to the market characteristics of each service type.
Since the characteristics of market data of different service types are different, the key field that can identify the service characteristics of market data is also different for each service type. In this step, for the market data of each service type, key field information of a corresponding type is extracted, wherein the key field corresponding to each service type is preset.
For example, for the case of the fx market, the fields included in the data structure of the fx market can be seen in table 1:
table 1: data structure of foreign exchange quotation
Figure BDA0003221836420000051
Figure BDA0003221836420000061
According to the characteristics of the foreign exchange quotation, the currency pair, the source channel, the source application name, the transaction type, the quotation type, the transaction period, the institution number and the transaction role field are used as key fields.
Therefore, for the received fx data, in step S102, the information corresponding to the key field in the fx data, that is, the key field information corresponding to the fx data, may be extracted.
Similarly, the key fields of the market data for other business types (such as precious metal market, position market and exposure information) are preset. When the market data is received, the business type of the market data is judged, then the key field corresponding to the business type of the market data is obtained, and then the corresponding key field information can be extracted from the market data.
And step S103, combining the key field information of the market data according to a preset ID generation rule to obtain the ID of the market data for the market consumers to subscribe.
In step S103, a market ID corresponding to the market data is generated from the key field information of the market data extracted in step S102. Specifically, the combination method is described by taking the foreign exchange quotation as an example, in the example in step S102, the key field information corresponding to the extracted foreign exchange quotation includes transaction type information, currency pair information, standard term information, source channel information, source application name information, quotation type information, organization number information, and transaction role information, and the key field information is combined in a certain order to obtain: the currency pair information _ source channel information _ source application name information _ transaction type information _ standard time limit information _ market quotation type information _ transaction role information is market quotation ID corresponding to the foreign exchange market quotation.
The execution main body of the embodiment is a quotation provider, the quotation provider accesses the quotation information acquired from the heterogeneous data source, and generates a unique corresponding quotation ID for each quotation data, so that a uniform quotation subscription platform is provided for the quotation consumers. The market consumers can subscribe the market data from the heterogeneous data sources from the market providers.
In an embodiment, as shown in fig. 2, the real-time market access method further includes:
step S104, receiving a quotation subscription request of a quotation consumer, wherein the quotation subscription request comprises a quotation ID to be subscribed by the quotation consumer;
judging whether the market situation ID to be subscribed exists;
if yes, executing step S105, and sending corresponding market information data to the market information consumers;
if not, executing step S106, and returning subscription error information to the market situation consumers.
Specifically, the market provider receives a market subscription request that the market consumer includes a market ID to be subscribed. The quotation ID with the subscription is generated by the quotation consumer according to the quotation information required to be acquired by the quotation consumer and the corresponding ID generation rule, and the ID generation rule is acquired by the quotation consumer from the quotation provider.
And the market provider judges whether the received market IDs to be subscribed exist in an ID list stored by the market provider, wherein the ID list is a list synthesized by the market IDs of the accessed market data by the market provider.
If the quotation provider judges that the quotation ID to be subscribed exists in the ID list, the address information of the quotation data to be subscribed is sent to the quotation consumer, and the quotation consumer subscribes the quotation data according to the address information; and if the quotation provider judges that the quotation ID to be subscribed does not exist in the ID list, returning subscription error information to the quotation consumer.
In an embodiment, after the receiving the market data from the data source in real time, the method further includes:
aligning EventTime timestamps of the market data.
Specifically, the time at which the market data is received by the market provider may be different from the time at which the market data is actually generated, and thus the EventTime timestamps of the received market data are aligned according to the time at which the market data is actually generated.
In an embodiment, after classifying the market data according to the service type, the method further includes:
and respectively carrying out format conversion on various market data according to a preset standard data structure.
Specifically, the quotation data received from the heterogeneous data sources are in a Json character string format, and the heterogeneous stream batch integrated data sources are combined into unified data through an union operator, that is, the formats of the stream quotation data and the batch quotation data from the heterogeneous data sources are combined into a preset format.
And for the market data of different service types, the corresponding preset formats are different. The preset format corresponding to each service type is formulated as follows: all key elements of the service type are contained and the market information data of all sources are compatible. Therefore, the union of the fields of all the sources of the business type market data can be used as the preset format corresponding to the business type. For example, see table 1, where the fields included in table 1 are preset formats corresponding to the service type of the fx market.
In an embodiment, as shown in fig. 3, after obtaining the ID of the market data, the method further includes cleansing the market data, because the received real-time market includes data of a stream batch, which may include market data that has failed.
Specifically, the cleaning strategy comprises:
step S301, carrying out time window check on the market data;
step S302, when the time difference between the time represented by the EventTime timestamp of the market data and the current time exceeds a time threshold, marking the market data as the expired market.
The expired market can be marked through the steps so as to prompt the market consumers who subscribe to the market.
In an embodiment, as shown in fig. 3, after obtaining the ID of the market data, the cleansing policy for the market data further includes:
step S303, carrying out price hang-up check on the market data;
and step S304, when the buying price in the market data is higher than the selling price, marking the market data as abnormal market.
The abnormal quotation can be marked through the steps so as to prompt the quotation consumers who subscribe the quotation.
The present application further provides a method for acquiring a real-time market quotation, as shown in fig. 4, including the following steps:
step S401, obtaining an ID generation rule of the market data to be consumed from a market provider according to the service type of the market data to be consumed.
The execution main body of the real-time market acquisition method of the embodiment is a market consumer. For example, when a market consumer wants to obtain the fx market data, the market consumer requests the market provider for the ID generation rule for obtaining the fx market. The ID generation rule of the foreign exchange quotation comprises key fields of the foreign exchange quotation and a combination mode of the key fields.
And S402, splicing the key field information corresponding to the market data to be consumed according to the ID generation rule to obtain the ID of the market data to be consumed.
Specifically, in the example in step S401, the market consumers determine the information corresponding to each key field according to the key fields of the fx market, and combine the information of each key field according to the combination mode of each key field to generate the market ID of the fx market to be acquired.
Here, since the foreign exchange quotation to be acquired by the quotation consumer is unknown, the quotation consumer cannot generate the quotation ID and analyze the foreign exchange quotation to obtain each piece of key field information as with the quotation provider. Therefore, the key field information used when the market consumers generate market IDs of foreign exchange market is generated by the market consumers as needed.
The process of generating the market ID of the foreign exchange market by the market consumer is similar to the way of inquiring information through a plurality of search boxes, the key field of the foreign exchange market corresponds to the fields of the plurality of search boxes, and the key field information corresponds to the keyword input in the search boxes.
Step S403, sending the ID of the market data to be consumed to a market provider;
and step S404, receiving the market data returned by the market provider according to the ID of the market data to be consumed.
As shown in fig. 5, the present application further provides another real-time market information obtaining method, including:
step S501, a market condition consumer sends an ID of market condition data to be consumed to a market condition provider, wherein the ID of the market condition data is obtained by splicing the market condition consumer according to an ID generation rule of the market condition data to be consumed and key field information corresponding to the market condition data to be consumed, and the ID generation rule of the market condition data to be consumed is obtained by the market condition consumer from the market condition provider;
step S502, the market situation provider returns address information corresponding to the market situation data to be consumed according to the ID of the market situation data to be consumed;
step S503, the quotation consumer initiates a quotation subscription request to the quotation provider according to the address information, wherein the quotation subscription request comprises the ID of the quotation data to be consumed;
the quotation provider judges whether the ID of the quotation data to be consumed is contained in a quotation list or not; the quotation list is generated by a quotation provider according to key field information of the quotation data received from the data source in real time and a corresponding ID generation rule;
if yes, executing step S504, and returning corresponding market data by the market provider;
if not, step S505 is executed, and the market provider returns the subscription error information.
In this embodiment, each step may be referred to as described in the previous embodiment of the present application, and similar points may be referred to each other, so that details are not repeated herein.
Based on the same inventive concept as the real-time market access method of the present application, the embodiment of the present application further provides a real-time market access device, which can be used to implement the real-time market access method described in the above embodiment, as described in the following embodiments. The problem solving principle of the real-time market access device is similar to that of the real-time market access method, so the implementation of the real-time market access device can refer to the implementation of the real-time market access method, and repeated details are not repeated. As used hereinafter, the term "unit" or "module" may be a combination of software and/or hardware that implements a predetermined function. While the system described in the embodiments below is preferably implemented in software, implementations in hardware, or a combination of software and hardware are also possible and contemplated.
The present application further provides an access device for real-time quotation, as shown in fig. 6, the access device includes:
the real-time market receiving module 601 is configured to receive market data from a data source in real time and classify the market data according to service types;
a market information extraction module 602, configured to extract key field information of market data in a corresponding class according to the market characteristics of each service type;
the market ID generation module 603 is configured to combine the key field information of the market data according to a preset ID generation rule to obtain an ID of the market data, so that the market consumer can subscribe the ID.
In an embodiment, as shown in fig. 7, the real-time market access device further includes:
a quotation subscription request receiving module 604, configured to receive a quotation subscription request of a quotation consumer, where the quotation subscription request includes a quotation ID to be subscribed by the quotation consumer;
a market data sending module 605, configured to determine whether the market ID to be subscribed exists; if yes, sending corresponding market information data to the market information consumer; if not, returning subscription error information to the market consumers.
In an embodiment, as shown in fig. 8, the real-time market access device further includes a market data marking module 606, configured to:
after the ID of the market data is obtained, time window inspection is carried out on the market data; when the time difference between the time represented by the EventTime timestamp of the market data and the current time exceeds a time threshold, marking the market data as an expired market; and
carrying out price hang-up check on the market data;
and when the buying price in the market data is higher than the selling price, marking the market data as abnormal market.
Based on the same inventive concept as the real-time market acquisition method of the present application, the present application further provides a real-time market acquisition apparatus, as shown in fig. 9, the acquisition apparatus includes:
a market ID generation rule obtaining module 901, configured to obtain, from a market provider, an ID generation rule of market data to be consumed according to a service type of the market data to be consumed;
a market ID generation module 902, configured to splice the key field information corresponding to the market data to be consumed according to the ID generation rule, to obtain an ID of the market data to be consumed;
the communication module 903 is used for sending the ID of the market data to be consumed to the market provider; and receiving the market data returned by the market provider according to the ID of the market data to be consumed.
The real-time market access method and the access device realize the uniform access of real-time market by formulating a market standard, introducing a Flink frame, adopting a plurality of dimensionalities such as a native TCP (transmission control protocol) protocol, coding and decoding and the like, adopting the multi-dimensionality real-time market accessed from a heterogeneous data source, carrying out standardized processing on market data, generating a unique market ID and the like. The real-time quotation acquisition method and the acquisition device of the application are applied in cooperation with the real-time quotation access method and the access device of the application, so that the defects that a quotation consumer cannot conveniently expand and cannot flexibly subscribe the information in the traditional real-time quotation information consumption (the consumption range is appointed or the information queue is used) process are well overcome, the quotation data is subscribed as required, the use complexity of the quotation consumer is reduced, and the transmission performance of the real-time quotation is improved.
The present invention further provides an electronic device, referring to fig. 10, where the electronic device 100 specifically includes:
a central processing unit (processor)110, a memory (memory)120, a communication module (Communications)130, an input unit 140, an output unit 150, and a power supply 160.
The memory (memory)120, the communication module (Communications)130, the input unit 140, the output unit 150 and the power supply 160 are respectively connected to the central processing unit (processor) 110. The memory 120 stores a computer program, the central processing unit 110 can call the computer program, and the central processing unit 110 implements all the steps of the access method of the real-time quotation or the acquisition method of the real-time quotation in the above embodiments when executing the computer program.
Embodiments of the present application also provide a computer storage medium for storing a computer program executable by a processor. The computer program, when executed by a processor, implements all the steps of the real-time market access method or the real-time market acquisition method provided by the present invention.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein. The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the hardware + program class embodiment and the system embodiment, since they are basically similar to the method embodiment, the description is simple, and the relevant points can be referred to the partial description of the method embodiment. Although embodiments of the present description provide method steps as described in embodiments or flowcharts, more or fewer steps may be included based on conventional or non-inventive means. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of an embodiment of the specification. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction. The above description is only an example of the embodiments of the present disclosure, and is not intended to limit the embodiments of the present disclosure. Various modifications and variations to the embodiments described herein will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiments of the present specification should be included in the scope of the claims of the embodiments of the present specification.

Claims (15)

1. A real-time market access method is characterized by comprising the following steps:
receiving real-time market data from a multi-data source, and classifying the market data according to the service type;
extracting key field information of market data in a corresponding class according to market characteristics of each service type;
and combining the key field information of the market data according to a preset ID generation rule to obtain the ID of the market data for the market consumers to subscribe.
2. The real-time market access method of claim 1, wherein the multiple data sources include an open source stream processing platform, a database management system, a network communication connection port data source, and a text data source;
the service types include: foreign exchange quotation, noble metal quotation, position quotation and opening information;
the classifying the market data according to the service type includes:
and dividing the market data into foreign exchange market, precious metal market, position market and opening information.
3. The real-time market access method according to claim 2, further comprising:
receiving a market subscription request of a market consumer, wherein the market subscription request comprises a market ID to be subscribed by the market consumer;
judging whether the market situation ID to be subscribed exists; if yes, sending corresponding market information data to the market information consumer; if not, returning subscription error information to the market consumers.
4. The real-time market access method according to claim 3, further comprising, after receiving the real-time market data from the multi-data source:
aligning EventTime timestamps of the market data.
5. The real-time market access method according to claim 3, wherein after classifying the market data according to the service type, the method further comprises:
and respectively carrying out format conversion on various market data according to a preset standard data structure.
6. The real-time market access method according to claim 3, further comprising, after obtaining the ID of the market data:
performing time window check on the market data;
and when the time difference between the time represented by the EventTime timestamp of the market data and the current time exceeds a time threshold, marking the market data as the expired market.
7. The real-time market access method according to claim 3, further comprising, after obtaining the ID of the market data:
carrying out price hang-up check on the market data;
and when the buying price in the market data is higher than the selling price, marking the market data as abnormal market.
8. A real-time market acquisition method is characterized by comprising the following steps:
acquiring an ID generation rule of the market data to be consumed from a market provider according to the service type of the market data to be consumed;
splicing the key field information corresponding to the market data to be consumed according to the ID generation rule to obtain the ID of the market data to be consumed;
sending the ID of the market data to be consumed to a market provider;
and receiving the market data returned by the market provider according to the ID of the market data to be consumed.
9. A real-time market acquisition method is characterized by comprising the following steps:
the quotation consumption method comprises the steps that a quotation consumption party sends an ID of quotation data to be consumed to a quotation provider, wherein the ID of the quotation data is obtained by splicing the quotation consumption party according to an ID generation rule of the quotation data to be consumed and key field information corresponding to the quotation data to be consumed, and the ID generation rule of the quotation data to be consumed is obtained by the quotation consumption party from the quotation provider;
the market provider returns address information corresponding to the market data to be consumed according to the ID of the market data to be consumed;
the market condition consumer initiates a market condition subscription request to the market condition provider according to the address information, wherein the market condition subscription request comprises an ID of market condition data to be consumed;
the quotation provider judges whether the ID of the quotation data to be consumed is contained in a quotation list or not; the quotation list is generated by a quotation provider according to key field information of the quotation data received from the data source in real time and a corresponding ID generation rule;
if yes, returning corresponding market data; if not, returning subscription error information.
10. An access device for real-time market conditions, comprising:
the real-time market receiving module is used for receiving real-time market data from a multi-data source and classifying the market data according to the service type;
the market information extraction module is used for extracting key field information of market data in the corresponding class according to the market characteristics of each service type;
and the quotation ID generation module is used for combining the key field information of the quotation data according to a preset ID generation rule to obtain the ID of the quotation data for the quotation consumers to subscribe.
11. The real-time market access device of claim 10, further comprising:
the market subscription request receiving module is used for receiving a market subscription request of a market consumer, wherein the market subscription request comprises a market ID to be subscribed by the market consumer;
the market data sending module is used for judging whether the market ID to be subscribed exists; if yes, sending corresponding market information data to the market information consumer; if not, returning subscription error information to the market consumers.
12. The real-time market access device of claim 11, further comprising a market data tagging module configured to:
after the ID of the market data is obtained, time window inspection is carried out on the market data; when the time difference between the time represented by the EventTime timestamp of the market data and the current time exceeds a time threshold, marking the market data as an expired market; and
carrying out price hang-up check on the market data;
and when the buying price in the market data is higher than the selling price, marking the market data as abnormal market.
13. An apparatus for acquiring real-time market conditions, comprising:
the system comprises a market ID generation rule acquisition module, a market ID generation rule acquisition module and a market ID generation rule acquisition module, wherein the market ID generation rule acquisition module is used for acquiring an ID generation rule of market data to be consumed from a market provider according to the service type of the market data to be consumed;
the market ID generation module is used for splicing the key field information corresponding to the market data to be consumed according to the ID generation rule to obtain the ID of the market data to be consumed;
the communication module is used for sending the ID of the market data to be consumed to the market provider; and
and receiving the market data returned by the market provider according to the ID of the market data to be consumed.
14. An electronic device, comprising:
a central processing unit, a memory, and a communication module, wherein the memory stores a computer program, the central processing unit can call the computer program, and the central processing unit realizes the method according to any one of claims 1 to 9 when executing the computer program.
15. A computer storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the method of any one of claims 1 to 9.
CN202110960336.2A 2021-08-20 2021-08-20 Access method, acquisition method, access device and acquisition device of real-time quotation Pending CN113656464A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110960336.2A CN113656464A (en) 2021-08-20 2021-08-20 Access method, acquisition method, access device and acquisition device of real-time quotation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110960336.2A CN113656464A (en) 2021-08-20 2021-08-20 Access method, acquisition method, access device and acquisition device of real-time quotation

Publications (1)

Publication Number Publication Date
CN113656464A true CN113656464A (en) 2021-11-16

Family

ID=78491748

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110960336.2A Pending CN113656464A (en) 2021-08-20 2021-08-20 Access method, acquisition method, access device and acquisition device of real-time quotation

Country Status (1)

Country Link
CN (1) CN113656464A (en)

Similar Documents

Publication Publication Date Title
CN109344170B (en) Stream data processing method, system, electronic device and readable storage medium
US7958251B2 (en) Method and system for processing raw financial data streams to produce and distribute structured and validated product offering data to subscribing clients
US7958025B2 (en) Method and system for processing raw financial data streams to produce and distribute structured and validated product offering objects
US7139844B2 (en) Method and system for processing financial data objects carried on broadcast data streams and delivering information to subscribing clients
US8825798B1 (en) Business event tracking system
US20190050277A1 (en) Router management by an event stream processing cluster manager
US11949757B2 (en) Method, apparatus and system for subscription management
CN111429241A (en) Accounting processing method and device
CN110688828A (en) File processing method and device, file processing system and computer equipment
US7974347B2 (en) Automating interval selection based on range and size of display area
CN111881329A (en) Account balance management method and system
EP1323087A1 (en) System for processing raw financial data to produce validated product offering information to subscribers
CN112181678A (en) Service data processing method, device and system, storage medium and electronic device
CN113656464A (en) Access method, acquisition method, access device and acquisition device of real-time quotation
CN111951040A (en) Information sending method and device, electronic equipment and storage medium
CN114238585A (en) Query method and device based on 5G message, computer equipment and storage medium
CN113778818A (en) Method, apparatus, device and computer readable medium for optimizing system
CN107679230B (en) Information processing method, system, medium, and computing device
US20150006690A1 (en) Feature set negotiation framework
CN112783615A (en) Method and device for cleaning data processing task
CN115168438B (en) Transaction return data integration method and related device
CN115115457B (en) Method, system and medium for processing business transaction flow
WO2012096681A1 (en) Method and system for providing an sms-based interactive electronic marketing offer search and distribution system
CN114726752A (en) Log information processing method, device, terminal and storage medium
CN115801893A (en) Monitoring method of business system and related equipment

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