CN114691688A - A kind of high-frequency market data inspection method and device - Google Patents
A kind of high-frequency market data inspection method and device Download PDFInfo
- Publication number
- CN114691688A CN114691688A CN202210325792.4A CN202210325792A CN114691688A CN 114691688 A CN114691688 A CN 114691688A CN 202210325792 A CN202210325792 A CN 202210325792A CN 114691688 A CN114691688 A CN 114691688A
- Authority
- CN
- China
- Prior art keywords
- data
- market data
- transaction
- frequency
- frequency market
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION 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
- G06Q10/00—Administration; Management
- G06Q10/10—Office automation; Time management
- G06Q10/107—Computer-aided management of electronic mailing [e-mailing]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2282—Tablespace storage structures; Management thereof
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2379—Updates performed during online database operations; commit processing
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION 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/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/004—Arrangements for detecting or preventing errors in the information received by using forward error control
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/0078—Avoidance of errors by organising the transmitted data in a format specifically designed to deal with errors, e.g. location
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Human Resources & Organizations (AREA)
- Strategic Management (AREA)
- Finance (AREA)
- General Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Signal Processing (AREA)
- Entrepreneurship & Innovation (AREA)
- Economics (AREA)
- Marketing (AREA)
- Computer Networks & Wireless Communication (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- Technology Law (AREA)
- Development Economics (AREA)
- Operations Research (AREA)
- Quality & Reliability (AREA)
- Tourism & Hospitality (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Abstract
Description
技术领域technical field
本发明涉及数据检验技术领域,特别是涉及一种高频行情数据检验方法及装置。The invention relates to the technical field of data inspection, in particular to a method and device for inspecting high-frequency market data.
背景技术Background technique
为了确保数据在传输过程的准确率,通常需要数据发送方对数据进行一系列的计算,得到并引入相应的校验码,附加在有效数据的末尾。数据接收方根据约定,利用算法函数,对收到的数据重新计算并生成校验码,再与数据发送方发送的校验码进行比对。若校验码比对正确,则将数据提交应用程序,进行下一步处理;若校验码比对错误,则认为数据存在一定的错误。In order to ensure the accuracy of the data during the transmission process, the data sender usually needs to perform a series of calculations on the data, obtain and introduce the corresponding check code, and append it to the end of the valid data. According to the agreement, the data receiver uses the algorithm function to recalculate the received data and generate the check code, and then compare it with the check code sent by the data sender. If the verification code comparison is correct, the data is submitted to the application for further processing; if the verification code comparison is incorrect, it is considered that there is a certain error in the data.
目前在现有技术中,使用较为广泛的校验码主要包括抑或校验(Xor)、累加和校验(Add)、循环冗余校验(Cyclic Redundancy Check,CRC)、累加和求补校验(CheckSum)等。异或校验(Xor)与累加和校验(Add)两种检验方法都是以字节为单位,对数据进行校验处理,其算法相对而言比较简单,但由于校验形式单一,容易出现差错与纰漏,对数据完备性检验的正确率并不高。而出错率较低的循环冗余校验(Cyclic Redundancy Check,CRC)与累加和求补校验(CheckSum),则存在算法与编码步骤较为繁杂等问题。Currently in the prior art, the more widely used check codes mainly include OR check (Xor), cumulative sum check (Add), cyclic redundancy check (Cyclic Redundancy Check, CRC), cumulative sum and complement check (CheckSum) et al. The two inspection methods, Xor and Add, both use bytes as the unit to verify the data. The algorithm is relatively simple, but due to the single verification form, it is easy to Errors and omissions occur, and the accuracy of the data integrity test is not high. The cyclic redundancy check (Cyclic Redundancy Check, CRC) and the accumulation and complement check (CheckSum), which have a low error rate, have problems such as complicated algorithms and coding steps.
因此需要提供一种数据检验方法及装置,能够解决上述问题。Therefore, it is necessary to provide a data verification method and device, which can solve the above problems.
发明内容SUMMARY OF THE INVENTION
本发明针对现有技术存在的问题和不足,提供一种高频行情数据检验方法及装置,检验通过不同渠道获取的高频行情数据是否存在缺失、乱码等现象,从而提升数据质量,大大减少人力成本。Aiming at the problems and deficiencies existing in the prior art, the present invention provides a high-frequency market data inspection method and device, which can inspect whether the high-frequency market data obtained through different channels is missing, garbled and other phenomena, thereby improving data quality and greatly reducing manpower cost.
本发明是通过下述技术方案来解决上述技术问题的:The present invention solves the above-mentioned technical problems through the following technical solutions:
本发明提供一种高频行情数据检验方法,所述高频行情数据检验方法包括:The present invention provides a method for testing high-frequency market data, and the method for testing high-frequency market data includes:
步骤102:获取高频行情数据,其包括快照数据、逐笔委托数据、逐笔成交数据以及K线行情数据;Step 102: Acquire high-frequency market data, which includes snapshot data, transaction-by-transaction data, transaction-by-transaction data, and K-line market data;
步骤104:若所述逐笔委托数据和所述逐笔成交数据中不同频道代码下的最大业务序列号与所述逐笔委托数据和所述逐笔成交数据总条数不对应,则判断所述高频行情数据为错误;Step 104: If the maximum business serial numbers under different channel codes in the transaction-by-transaction data and the transaction-by-transaction data do not correspond to the total number of the transaction-by-transaction data and the transaction-by-transaction data, determine the The above high-frequency market data is wrong;
步骤106:当所述高频行情数据为错误时,生成错误记录并向相应的收件人发送邮件。Step 106: When the high-frequency market data is wrong, generate an error record and send an email to the corresponding recipient.
优选地,在所述步骤102之前,还包括:Preferably, before the
步骤101:通过API接口调取每日码值表,根据所述每日码值表对应场景编号调取所述高频行情数据。Step 101 : retrieve the daily code value table through an API interface, and retrieve the high-frequency market data according to the scene number corresponding to the daily code value table.
优选地,所述步骤101中根据所述每日码值表对应场景编号调取所述高频行情数据还包括每间隔第一预设时间获取一次所述高频行情数据的文件大小,若本次获取的所述高频行情数据的文件大小和上一次获取的所述高频行情数据的文件大小一样,则所述高频行情数据下载完成,若本次获取的所述高频行情数据的文件大小和上一次获取的所述高频行情数据的文件大小不一样,则等下一次时间间隔再获取一次所述高频行情数据,直到第二预设时间为止。Preferably, in the
优选地,若本次获取的所述高频行情数据的文件大小和上一次获取的所述高频行情数据的文件大小不一样,则自动删除之前下载的所述高频行情数据,重新下载修复后的数据,并对所述高频行情数据进行分块。Preferably, if the file size of the high-frequency market data obtained this time is different from the file size of the high-frequency market data obtained last time, the previously downloaded high-frequency market data is automatically deleted, and the high-frequency market data is downloaded and repaired again. The latter data is obtained, and the high-frequency market data is divided into blocks.
优选地,所述步骤102中所述获取高频行情数据包括若读取成功所述高频行情数据则表示所述高频行情数据正常,若读取失败所述高频行情数据则表示所述高频行情数据异常,当所述高频行情数据异常时,生成错误记录并向相应的收件人发送邮件。Preferably, the obtaining of the high-frequency market data in the
优选地,在所述步骤104之后,还包括:Preferably, after the
步骤105:根据所述逐笔成交数据生成当日K线行情数据,将所述当日K线行情数据与官方K线行情数据进行比较,若所述当日K线行情数据与所述官方K线行情数据无法一一对应,表示所述逐笔成交数据存在缺失的情况,则生成错误记录并向相应的收件人发送邮件。Step 105: Generate the current day K-line market data according to the transaction data, compare the current day’s K-line market data with the official K-line market data, if the current day’s K-line market data and the official K-line market data If there is no one-to-one correspondence, indicating that the transaction data is missing, an error record will be generated and an email will be sent to the corresponding recipient.
优选地,所述当日K线行情数据包括相应证券的昨收价、开盘价、最新价、最高价、最低价、成交额、成交量以及均价。Preferably, the current day's K-line market data includes yesterday's closing price, opening price, latest price, highest price, lowest price, transaction volume, transaction volume and average price of the corresponding securities.
优选地,所述错误记录存储在高频数据日常检验表中,所述高频数据日常检验表中的所述错误记录包括ID、交易市场、交易日、校验时间、校验结果、报错类型、报错类型描述、报错具体内容、发布时间、更新时间以及更新ID。Preferably, the error records are stored in a high-frequency data daily inspection table, and the error records in the high-frequency data daily inspection table include ID, trading market, trading day, verification time, verification result, and error type. , Description of the error type, specific content of the error, release time, update time, and update ID.
优选地,若所述快照数据和所述K线行情数据无法对应,表示所述快照数据和日行情成交金额无法对应,则生成错误记录并向相应的收件人发送邮件。Preferably, if the snapshot data and the K-line market data cannot correspond, indicating that the snapshot data cannot correspond to the daily market transaction amount, an error record is generated and an email is sent to the corresponding recipient.
本发明还提供一种高频行情数据检验装置,所述高频行情数据检验装置包括:The present invention also provides a high-frequency market data inspection device, and the high-frequency market data inspection device includes:
数据获取模块,其用于获取高频行情数据,其包括快照数据、逐笔委托数据、逐笔成交数据以及K线行情数据;A data acquisition module, which is used to acquire high-frequency market data, including snapshot data, transaction-by-transaction data, transaction-by-transaction data, and K-line market data;
数据判断模块,其用于判断若所述逐笔委托数据和所述逐笔成交数据中不同频道代码下的最大业务序列号与所述逐笔委托数据和所述逐笔成交数据总条数不对应,则判断所述高频行情数据为错误;A data judgment module, which is used for judging if the maximum business serial number under different channel codes in the transaction-by-transaction data and the transaction-by-transaction data is different from the total number of the transaction-by-transaction data and the transaction-by-transaction data. Correspondingly, it is judged that the high-frequency market data is wrong;
数据报错模块,其用于当所述高频行情数据为错误时,生成错误记录并向相应的收件人发送邮件。A data error reporting module, which is used to generate an error record and send an email to a corresponding recipient when the high-frequency market data is incorrect.
与现有技术相比,本发明实施例的技术方案具有以下有益效果:Compared with the prior art, the technical solutions of the embodiments of the present invention have the following beneficial effects:
本发明实施例提供的高频行情数据检验方法及装置,通过比较所述逐笔委托数据和所述逐笔成交数据中不同频道代码下的最大业务序列号与所述逐笔委托数据和所述逐笔成交数据总条数是否对应,来判断所述高频行情数据是否准确,当所述高频行情数据为错误时,生成错误记录并向相应的收件人发送邮件,从而在降低技术难度的同时,大大提高高频行情数据检验正确率;The method and device for verifying high-frequency market data provided by the embodiments of the present invention compare the maximum service serial numbers under different channel codes in the transaction-by-transaction data and the transaction-by-transaction data with the transaction-by-transmission data and the transaction-by-transaction data. Whether the total number of transaction data corresponding to each transaction is to determine whether the high-frequency market data is accurate, and when the high-frequency market data is wrong, an error record is generated and an email is sent to the corresponding recipient, thereby reducing the technical difficulty. At the same time, it greatly improves the accuracy of high-frequency market data inspection;
进一步地,根据所述逐笔成交数据生成当日K线行情数据,将所述当日K线行情数据与官方K线行情数据进行比较,若所述当日K线行情数据与所述官方K线行情数据无法一一对应,表示所述逐笔成交数据存在缺失的情况,则生成错误记录并向相应的收件人发送邮件,从而进一步确保所述高频行情数据检验的正确率;Further, the K-line market data on the current day is generated according to the transaction data, and the K-line market data on the current day is compared with the official K-line market data. If the K-line market data on the current day and the official K-line market data are compared. If there is no one-to-one correspondence, indicating that the transaction data is missing, an error record is generated and an email is sent to the corresponding recipient, thereby further ensuring the correct rate of the high-frequency market data inspection;
进一步地,若所述快照数据和所述K线行情数据无法对应,表示所述快照数据和日行情成交金额无法对应,则生成错误记录并向相应的收件人发送邮件,从而能够及时通知相关收件人,进一步确保所述高频行情数据检验的正确率。Further, if the snapshot data and the K-line market data cannot correspond, indicating that the snapshot data cannot correspond to the daily market transaction amount, an error record will be generated and an email will be sent to the corresponding recipient, so that the relevant recipients can be notified in time. The recipient, further ensure the correct rate of the high-frequency market data inspection.
附图说明Description of drawings
图1为本发明的一个实施例提供的高频行情数据检验方法的流程示意图;1 is a schematic flowchart of a high-frequency market data inspection method provided by an embodiment of the present invention;
图2为本发明的又一个实施例提供的高频行情数据检验方法的流程示意图;2 is a schematic flowchart of a method for checking high-frequency market data provided by another embodiment of the present invention;
图3为本发明的一个实施例提供的高频行情数据检验装置的结构示意图。FIG. 3 is a schematic structural diagram of an apparatus for checking high-frequency market data provided by an embodiment of the present invention.
具体实施方式Detailed ways
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments These are some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present invention.
下面以具体的实施例对本发明的技术方案进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例不再赘述。The technical solutions of the present invention will be described in detail below with specific embodiments. The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
基于现有技术存在的问题,如图1所示,本发明提供一种高频行情数据检验方法,所述高频行情数据检验方法包括:Based on the problems existing in the prior art, as shown in FIG. 1 , the present invention provides a method for testing high-frequency market data. The method for testing high-frequency market data includes:
步骤102:获取高频行情数据,其包括快照数据、逐笔委托数据、逐笔成交数据以及K线行情数据;Step 102: Acquire high-frequency market data, which includes snapshot data, transaction-by-transaction data, transaction-by-transaction data, and K-line market data;
步骤104:若所述逐笔委托数据和所述逐笔成交数据中不同频道代码下的最大业务序列号与所述逐笔委托数据和所述逐笔成交数据总条数不对应,则判断所述高频行情数据为错误;Step 104: If the maximum business serial numbers under different channel codes in the transaction-by-transaction data and the transaction-by-transaction data do not correspond to the total number of the transaction-by-transaction data and the transaction-by-transaction data, determine the The above high-frequency market data is wrong;
步骤106:当所述高频行情数据为错误时,生成错误记录并向相应的收件人发送邮件。Step 106: When the high-frequency market data is wrong, generate an error record and send an email to the corresponding recipient.
在步骤102中,所述快照数据包括交易所累计成交金额、成交量以及最后一笔最新成交价。In
在步骤104中,所述业务序列号是交易所方便订单时间先后排序而设置的一个字段。所述逐笔委托数据和所述逐笔成交数据按频道代码顺序依次排列,并且,所述逐笔委托数据中的业务序列号,不会在所述逐笔成交数据的业务序列号中重复出现。因此,所述逐笔委托数据和所述逐笔成交数据中不同频道代码下的最大业务序列号与所述逐笔委托数据和所述逐笔成交数据总条数应当相对应,则说明所述高频行情数据中不存在缺失现象,如果出现不对应的情况,则判断所述高频行情数据为错误,需要生成错误记录并向相应的收件人发送邮件。In
例如,在多个不同的的交易日出现了高频行情数据缺失的情况,生成错误记录:数据类型为逐笔委托书数据和逐笔成交数据,校验结果为0表示高频行情数据为错误的情况,报错类型描述为:逐笔委托书数据和逐笔成交数据缺失。同时,向相应的收件人发送邮件,对所述高频行情数据进行相应的处理。并且,自动下载更新后的数据,并重复步骤104的检验过程。For example, if the high-frequency market data is missing on several different trading days, an error record is generated: the data type is the order-by-transaction data and the transaction-by-transaction data, and the verification result is 0, indicating that the high-frequency market data is wrong In the case of , the error type is described as: the data of each order of entrustment and the data of each transaction are missing. At the same time, send an email to the corresponding recipient, and perform corresponding processing on the high-frequency market data. And, the updated data is automatically downloaded, and the verification process of
在具体实施中,若本次获取的所述高频行情数据的文件大小和上一次获取的所述高频行情数据的文件大小不一样,则自动删除之前下载的所述高频行情数据,重新下载修复后的数据,并对所述高频行情数据进行分块。对所述高频行情数据进行分块包括根据每个证券的证券类型将所述高频行情数据分为债券类、基金类、股票类数据等,便于投资者获取到想要的数据。在具体实施中,所述步骤102中所述获取高频行情数据包括若读取成功所述高频行情数据则表示所述高频行情数据正常,若读取失败所述高频行情数据则表示所述高频行情数据异常,当所述高频行情数据异常时,生成错误记录并向相应的收件人发送邮件。In a specific implementation, if the file size of the high-frequency market data obtained this time is different from the file size of the high-frequency market data obtained last time, the previously downloaded high-frequency market data will be automatically deleted, and the new high-frequency market data will be automatically deleted. The repaired data is downloaded, and the high-frequency market data is divided into blocks. Segmenting the high-frequency market data includes dividing the high-frequency market data into bond data, fund data, and stock data according to the security type of each security, so as to facilitate investors to obtain desired data. In a specific implementation, the obtaining of the high-frequency market data in the
例如,在多个不同的交易日中出现了高频行情数据为错误的情况,生成错误记录:数据类型为逐笔委托数据,校验结果为0表示高频行情数据为错误的情况,报错类型描述为:文件存在乱码。同时,向相应的收件人发送邮件,对所述高频行情数据进行相应的处理。For example, if the high-frequency market data is wrong in several different trading days, an error record is generated: the data type is the order-by-transaction data, and the verification result is 0, indicating that the high-frequency market data is wrong, and the error type is reported. Description: The file contains garbled characters. At the same time, send an email to the corresponding recipient, and perform corresponding processing on the high-frequency market data.
现在参看图2,本发明提供一种高频行情数据检验方法,所述高频行情数据检验方法包括:Referring now to FIG. 2 , the present invention provides a method for checking high-frequency market data, and the method for checking high-frequency market data includes:
步骤101:通过API接口调取每日码值表,根据所述每日码值表对应场景编号调取所述高频行情数据;Step 101: retrieve the daily code value table through the API interface, and retrieve the high-frequency market data according to the scene number corresponding to the daily code value table;
步骤102:获取高频行情数据,其包括快照数据、逐笔委托数据、逐笔成交数据以及K线行情数据;Step 102: Acquire high-frequency market data, which includes snapshot data, transaction-by-transaction data, transaction-by-transaction data, and K-line market data;
步骤104:若所述逐笔委托数据和所述逐笔成交数据中不同频道代码下的最大业务序列号与所述逐笔委托数据和所述逐笔成交数据总条数不对应,则判断所述高频行情数据为错误;Step 104: If the maximum business serial numbers under different channel codes in the transaction-by-transaction data and the transaction-by-transaction data do not correspond to the total number of the transaction-by-transaction data and the transaction-by-transaction data, determine the The above high-frequency market data is wrong;
步骤105:根据所述逐笔成交数据生成当日K线行情数据,将所述当日K线行情数据与官方K线行情数据进行比较,若所述当日K线行情数据与所述官方K线行情数据无法一一对应,表示所述逐笔成交数据存在缺失的情况,则生成错误记录并向相应的收件人发送邮件;Step 105: Generate the current day K-line market data according to the transaction data, compare the current day’s K-line market data with the official K-line market data, if the current day’s K-line market data and the official K-line market data If there is no one-to-one correspondence, indicating that the transaction data is missing, an error record will be generated and an email will be sent to the corresponding recipient;
步骤106:当所述高频行情数据为错误时,生成错误记录并向相应的收件人发送邮件。Step 106: When the high-frequency market data is wrong, generate an error record and send an email to the corresponding recipient.
在具体实施中,所述每日码值表包含交易所的证券官方代码、证券简称、证券类型、交易市场等信息,码值具体指证券官方代码。所述场景编号包括快照数据、逐笔成交数据、逐笔委托数据以及K线行情数据为不同的场景编号。所述步骤101中根据所述每日码值表对应场景编号调取所述高频行情数据还包括每间隔第一预设时间获取一次所述高频行情数据的文件大小,若本次获取的所述高频行情数据的文件大小和上一次获取的所述高频行情数据的文件大小一样,则所述高频行情数据下载完成,若本次获取的所述高频行情数据的文件大小和上一次获取的所述高频行情数据的文件大小不一样,则等下一次时间间隔再获取一次所述高频行情数据,直到第二预设时间为止。In a specific implementation, the daily code value table includes information such as the securities official code, securities abbreviation, securities type, and trading market of the exchange, and the code value specifically refers to the securities official code. The scene numbers include snapshot data, transaction-by-transaction data, transaction-by-transaction commission data, and K-line market data, which are different scene numbers. In the
所述第一预设时间通常为1小时,所述第二预设时间通常为23点。若直到当日第二预设时间23点为止,都没有获取到符合上述17点获取要求的高频行情数据,则认为当日没有高频行情数据产生。如没有获取到符合与上一次大小一致的的的高频行情数据,则认为当日没有准确的高频行情数据产生。The first preset time is usually 1 hour, and the second preset time is usually 23 o'clock. If there is no high-frequency market data that meets the above 17:00 acquisition requirements until 23:00, the second preset time of the day, it is considered that there is no high-frequency market data generated on that day. If no high-frequency market data consistent with the previous size is obtained, it is considered that there is no accurate high-frequency market data generated on that day.
例如,每日在17点开始获取第一次高频行情数据,如获取到一批数据后,间隔第一预设时间1小时之后,根据第一预设时间,也就是18点开始再次获取高频行情数据,再间隔第一预设时间1小时之后,根据第一预设时间,也就是19点开始再次获取高频行情数据,以此类推,直至第二预设时间23点为止最后一次获取高频行情数据。For example, the first high-frequency market data is obtained at 17:00 every day. After a batch of data is obtained, the first preset time is 1 hour later, and the high-frequency market data is obtained again according to the first preset time, that is, 18:00. The high-frequency market data is obtained again after an interval of the first preset time for 1 hour, according to the first preset time, that is, 19:00, and the high-frequency market data is obtained again, and so on, until the second preset time is 23:00. High-frequency market data.
在步骤105中,所述当日K线行情数据包括相应证券的昨收价、开盘价、最新价、最高价、最低价、成交额、成交量以及均价。若出现所述官方K线行情数据缺失的情况,则将错误记录存储在高频数据日常检验表中,并向相应的收件人发送邮件。In
例如,多个交易市场都出现了高频行情数据存在,但官方K线行情数据缺失的情况,生成错误记录:数据类型为K线行情数据,校验结果为0表示高频行情数据为错误的的情况,报错类型描述为:高频行情数据存在,官方K线行情数据缺失。同时,向相应的收件人发送邮件,对所述高频行情数据进行相应的处理。For example, there are high-frequency market data in many trading markets, but the official K-line market data is missing, and an error record is generated: the data type is K-line market data, and the verification result is 0, indicating that the high-frequency market data is wrong. In the case of , the error type is described as: high-frequency market data exists, but the official K-line market data is missing. At the same time, send an email to the corresponding recipient, and perform corresponding processing on the high-frequency market data.
在具体实施中,所述错误记录存储在高频数据日常检验表中,所述高频数据日常检验表中的所述错误记录包括ID、交易市场、交易日、校验时间、校验结果、报错类型、报错类型描述、报错具体内容、发布时间、更新时间以及更新ID。具体如下表所示:In a specific implementation, the error records are stored in the high-frequency data daily inspection table, and the error records in the high-frequency data daily inspection table include ID, trading market, trading day, verification time, verification result, Error type, description of error type, specific content of error, release time, update time, and update ID. The details are shown in the following table:
在具体实施中,若所述快照数据和所述K线行情数据无法对应,表示所述快照数据和日行情成交金额无法对应,则生成错误记录并向相应的收件人发送邮件。In a specific implementation, if the snapshot data cannot correspond to the K-line market data, indicating that the snapshot data cannot correspond to the daily market transaction amount, an error record is generated and an email is sent to the corresponding recipient.
例如,在多个交易市场出现所述快照数据和所述K线行情数据无法对应的情况,生成错误记录:数据类型为逐笔委托数据和逐笔成交数据,校验结果为0表示高频行情数据为错误的情况,报错类型描述为:快照数据和和K线行情数据无法对应。同时,向相应的收件人发送邮件,对所述高频行情数据进行相应的处理。For example, if the snapshot data and the K-line market data cannot be matched in multiple trading markets, an error record is generated: the data type is transaction-by-transaction data and transaction-by-transaction data, and a verification result of 0 indicates a high-frequency market. If the data is wrong, the error type is described as: the snapshot data cannot correspond to the K-line market data. At the same time, send an email to the corresponding recipient, and perform corresponding processing on the high-frequency market data.
基于现有技术存在的问题,如图3所示,本发明还提供一种高频行情数据检验装置30,所述高频行情数据检验装置30包括:Based on the problems existing in the prior art, as shown in FIG. 3 , the present invention also provides a high-frequency market data inspection device 30, and the high-frequency market data inspection device 30 includes:
数据获取模块301,其用于获取高频行情数据,其包括快照数据、逐笔委托数据、逐笔成交数据以及K线行情数据;A
数据判断模块302,其用于判断若所述逐笔委托数据和所述逐笔成交数据中不同频道代码下的最大业务序列号与所述逐笔委托数据和所述逐笔成交数据总条数不对应,则判断所述高频行情数据为错误;The
数据报错模块303,其用于当所述高频行情数据为错误时,生成错误记录并向相应的收件人发送邮件。The data
综上所述,本发明实施例的提供的高频行情数据检验方法及装置,通过比较所述逐笔委托数据和所述逐笔成交数据中不同频道代码下的最大业务序列号与所述逐笔委托数据和所述逐笔成交数据总条数是否对应,来判断所述高频行情数据是否准确,当所述高频行情数据为错误时,生成错误记录并向相应的收件人发送邮件,从而在降低技术难度的同时,大大提高高频行情数据检验正确率;To sum up, the method and device for verifying high-frequency market data provided by the embodiments of the present invention compare the maximum service serial numbers under different channel codes in the transaction-by-transaction data and the transaction-by-transaction data with the transaction-by-transaction data. Whether the entrustment data corresponds to the total number of transaction data one by one, to judge whether the high-frequency market data is accurate, when the high-frequency market data is wrong, generate an error record and send an email to the corresponding recipient , so as to greatly improve the accuracy of high-frequency market data inspection while reducing the technical difficulty;
进一步地,根据所述逐笔成交数据生成当日K线行情数据,将所述当日K线行情数据与官方K线行情数据进行比较,若所述当日K线行情数据与所述官方K线行情数据无法一一对应,表示所述逐笔成交数据存在缺失的情况,则生成错误记录并向相应的收件人发送邮件,从而进一步确保所述高频行情数据检验的正确率;Further, the K-line market data on the current day is generated according to the transaction data, and the K-line market data on the current day is compared with the official K-line market data. If the K-line market data on the current day and the official K-line market data are compared. If there is no one-to-one correspondence, indicating that the transaction data is missing, an error record is generated and an email is sent to the corresponding recipient, thereby further ensuring the correct rate of the high-frequency market data inspection;
进一步地,若所述快照数据和所述K线行情数据无法对应,表示所述快照数据和日行情成交金额无法对应,则生成错误记录并向相应的收件人发送邮件,从而能够及时通知相关收件人,进一步确保所述高频行情数据检验的正确率。Further, if the snapshot data and the K-line market data cannot correspond, indicating that the snapshot data cannot correspond to the daily market transaction amount, an error record will be generated and an email will be sent to the corresponding recipient, so that the relevant recipients can be notified in time. The recipient, further ensure the correct rate of the high-frequency market data inspection.
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, but not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The technical solutions described in the foregoing embodiments can still be modified, or some or all of the technical features thereof can be equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the embodiments of the present invention. scope.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210325792.4A CN114691688B (en) | 2022-03-29 | 2022-03-29 | A high-frequency market data verification method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210325792.4A CN114691688B (en) | 2022-03-29 | 2022-03-29 | A high-frequency market data verification method and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN114691688A true CN114691688A (en) | 2022-07-01 |
| CN114691688B CN114691688B (en) | 2025-02-14 |
Family
ID=82140832
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210325792.4A Active CN114691688B (en) | 2022-03-29 | 2022-03-29 | A high-frequency market data verification method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN114691688B (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116244503A (en) * | 2022-12-26 | 2023-06-09 | 中科亿海微电子科技(苏州)有限公司 | A thousand-level market detection method and device, electronic equipment and storage medium |
| CN119201912A (en) * | 2024-08-16 | 2024-12-27 | 易方达基金管理有限公司 | A high frequency data processing, application method and device |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20050114461A1 (en) * | 2003-09-30 | 2005-05-26 | Fujitsu Limited | Method of data exchange processing for sending server and receiving server |
| US20080147423A1 (en) * | 2006-12-19 | 2008-06-19 | Braun John F | Method and system for confirming/verifying receipt of a mailpiece using radio frequency identification (RFID) |
| KR20170084973A (en) * | 2016-01-13 | 2017-07-21 | 삼성증권주식회사 | Method, apparatus and system for verifying a trade order of a stock market |
| CN109741179A (en) * | 2018-12-25 | 2019-05-10 | 北京字节跳动网络技术有限公司 | Full gear market data real-time computing technique and device |
| CN111666340A (en) * | 2020-05-27 | 2020-09-15 | 中国平安财产保险股份有限公司 | Synchronous data proofreading method and device based on big data and computer equipment |
| CN113064884A (en) * | 2020-12-02 | 2021-07-02 | 上海金融期货信息技术有限公司 | Method and system for deduplication of dual-source market quotations based on custom hash |
| CN114238209A (en) * | 2021-11-16 | 2022-03-25 | 上海金仕达软件科技有限公司 | Test method and device for snapshot market data, electronic equipment and storage medium |
-
2022
- 2022-03-29 CN CN202210325792.4A patent/CN114691688B/en active Active
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20050114461A1 (en) * | 2003-09-30 | 2005-05-26 | Fujitsu Limited | Method of data exchange processing for sending server and receiving server |
| US20080147423A1 (en) * | 2006-12-19 | 2008-06-19 | Braun John F | Method and system for confirming/verifying receipt of a mailpiece using radio frequency identification (RFID) |
| KR20170084973A (en) * | 2016-01-13 | 2017-07-21 | 삼성증권주식회사 | Method, apparatus and system for verifying a trade order of a stock market |
| CN109741179A (en) * | 2018-12-25 | 2019-05-10 | 北京字节跳动网络技术有限公司 | Full gear market data real-time computing technique and device |
| CN111666340A (en) * | 2020-05-27 | 2020-09-15 | 中国平安财产保险股份有限公司 | Synchronous data proofreading method and device based on big data and computer equipment |
| CN113064884A (en) * | 2020-12-02 | 2021-07-02 | 上海金融期货信息技术有限公司 | Method and system for deduplication of dual-source market quotations based on custom hash |
| CN114238209A (en) * | 2021-11-16 | 2022-03-25 | 上海金仕达软件科技有限公司 | Test method and device for snapshot market data, electronic equipment and storage medium |
Non-Patent Citations (1)
| Title |
|---|
| 欧阳元新: "物联网引论", 31 May 2016, 北京航空航天大学出版社, pages: 1 - 14 * |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116244503A (en) * | 2022-12-26 | 2023-06-09 | 中科亿海微电子科技(苏州)有限公司 | A thousand-level market detection method and device, electronic equipment and storage medium |
| CN119201912A (en) * | 2024-08-16 | 2024-12-27 | 易方达基金管理有限公司 | A high frequency data processing, application method and device |
Also Published As
| Publication number | Publication date |
|---|---|
| CN114691688B (en) | 2025-02-14 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN114691688A (en) | A kind of high-frequency market data inspection method and device | |
| CN107730385A (en) | Simulation process method, apparatus, storage medium and the computer equipment of sequence information | |
| WO2019196304A1 (en) | Electronic apparatus, credit feedback message parsing method, and storage medium | |
| CN112860957B (en) | Method, medium and system for checking fixed value list | |
| CN110147378B (en) | Data checking method, device, computer equipment and storage medium | |
| CN108985187A (en) | A kind of method that automatic quality inspection is realized in self verification of digital archive | |
| CN105224542A (en) | A kind of method and apparatus business object data being imported platform | |
| CN106802898A (en) | Data entry method and device | |
| CN114896161A (en) | Artificial intelligence-based file construction method, device, computer equipment and medium | |
| CN113610078B (en) | A method and equipment for calibrating mobile phone number recognition results | |
| CN110472981A (en) | The recognition methods of risk order, device, computer equipment and storage medium | |
| CN114490169A (en) | Data page CRC (Cyclic redundancy check) system | |
| CN117033278B (en) | A data transmission method and system for multiple types of interfaces | |
| CN114077545B (en) | Method, device, equipment and readable storage medium for obtaining verification data | |
| CN118296028A (en) | Data message generation method, device, equipment, medium and program product | |
| CN118966102A (en) | Chip automatic configuration method, device, storage medium and electronic device | |
| CN111786745B (en) | Novel data verification method | |
| CN116701381A (en) | Multistage verification system and method for distributed data acquisition and warehousing | |
| CN116010283A (en) | Test case repairing method, device, computer equipment and storage medium | |
| CN111241082B (en) | Data correction method and device | |
| CN119205395B (en) | A financial data verification and correction system | |
| CN115408300A (en) | Interface test method, device, equipment and computer storage medium | |
| CN114707484A (en) | Method, system, terminal and storage medium for automatically auditing detection report | |
| CN112346973B (en) | Test method, device, equipment and storage medium | |
| CN111625455A (en) | Program testing method, device, equipment and 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 |