CN114422608B - Data transmission method, device and equipment - Google Patents

Data transmission method, device and equipment Download PDF

Info

Publication number
CN114422608B
CN114422608B CN202111584984.9A CN202111584984A CN114422608B CN 114422608 B CN114422608 B CN 114422608B CN 202111584984 A CN202111584984 A CN 202111584984A CN 114422608 B CN114422608 B CN 114422608B
Authority
CN
China
Prior art keywords
data
target
shaping
sample
shaping data
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.)
Active
Application number
CN202111584984.9A
Other languages
Chinese (zh)
Other versions
CN114422608A (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.)
Shenzhen Xishima Data Technology Co ltd
Original Assignee
Shenzhen Xishima Data 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 Shenzhen Xishima Data Technology Co ltd filed Critical Shenzhen Xishima Data Technology Co ltd
Publication of CN114422608A publication Critical patent/CN114422608A/en
Application granted granted Critical
Publication of CN114422608B publication Critical patent/CN114422608B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Economics (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Development Economics (AREA)
  • Computer Security & Cryptography (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The application is applicable to the technical field of computers, and provides a data transmission method, a device and equipment, wherein the method comprises the following steps: acquiring financial quotation data to be transmitted and corresponding stock codes thereof; obtaining target shaping data according to a preset mapping relation table and security codes; compressing the target shaping data to obtain target compressed data; filling the target compressed data into the packet head position of the financial quotation data to obtain target transmission data; and sending the target transmission data to the target equipment. In the method, the certificate codes are mapped and compressed independently in the incremental transmission process of the financial quotation data and then transmitted, so that the size of packet head transmission is saved, the peak quotation bandwidth is saved, and the transmission delay is reduced.

Description

Data transmission method, device and equipment
Technical Field
The present application belongs to the field of computers, and in particular, relates to a data transmission method, apparatus, and device.
Background
In the financial industry and the securities market, the market data volume of securities exchanges is usually larger, and in the existing market data distribution and transmission application field, the theory of incremental compressed data is adopted, and compression transmission is carried out through a Fix protocol or a Fast protocol, so that the purpose of incremental transmission is achieved, and the data transmission volume is reduced. However, in the existing data transmission method, the increment is identified by relying on the stock code, and in the stock increment transmission process, the data volume is particularly large in the transmission process, a certain bandwidth is occupied and the transmission delay is increased because the stock code is contained in the protocol header part.
Disclosure of Invention
The embodiment of the application provides a data transmission method, a data transmission device and data transmission equipment, which can solve the problems.
In a first aspect, an embodiment of the present application provides a data transmission method, including:
acquiring financial quotation data to be transmitted and corresponding stock codes thereof;
obtaining target shaping data according to a preset mapping relation table and the security codes;
compressing the target shaping data to obtain target compressed data;
filling the target compressed data into the packet head position of the financial quotation data to obtain target transmission data;
and sending the target transmission data to target equipment.
Further, the obtaining the target shaping data according to the preset mapping relation table and the security code includes:
mapping the security codes into initial shaping data according to a preset mapping relation table;
and carrying out stop bit coding processing on the initial shaping data to obtain target shaping data.
Further, the step of performing stop bit encoding processing on the initial shaping data to obtain target shaping data includes:
dividing the initial shaping data according to a preset stop bit to obtain a plurality of byte sequences;
And carrying out coding processing on each byte sequence to obtain target shaping data.
Further, before the target shaping data is obtained according to the preset mapping relation table and the security code, the method further includes:
acquiring a sample security code;
hash mapping is carried out on the sample security codes to obtain unique sample shaping data;
and establishing a preset mapping relation table according to the sample security codes and the corresponding sample shaping data thereof.
Further, after the preset mapping relation table is established according to the sample security code and the corresponding sample shaping data, the method further includes:
if the sample security code is detected to be updated, acquiring a newly added sample security code and corresponding sample shaping data thereof;
and updating a preset mapping relation table according to the newly added sample security codes and the corresponding sample shaping data.
In a second aspect, embodiments of the present application provide a data transmission device, including:
the first acquisition unit is used for acquiring financial quotation data to be transmitted and corresponding security codes thereof;
the first processing unit is used for obtaining target shaping data according to a preset mapping relation table and the security codes;
The compression unit is used for compressing the target shaping data to obtain target compressed data;
the second processing unit is used for filling the target compressed data into the packet head position of the financial quotation data to obtain target transmission data;
and the sending unit is used for sending the target transmission data to target equipment.
Further, the first processing unit is specifically configured to:
mapping the security codes into initial shaping data according to a preset mapping relation table;
and carrying out stop bit coding processing on the initial shaping data to obtain target shaping data.
Further, the first processing unit is specifically configured to:
dividing the initial shaping data according to a preset stop bit to obtain a plurality of byte sequences;
and carrying out coding processing on each byte sequence to obtain target shaping data.
Further, the data transmission device further includes:
the second acquisition unit is used for acquiring the sample security codes;
the third processing unit is used for carrying out hash mapping on the sample security codes to obtain unique sample shaping data;
and the fourth processing unit is used for establishing a preset mapping relation table according to the sample security codes and the corresponding sample shaping data thereof.
Further, the data transmission device further includes:
a fifth processing unit, configured to obtain a new added sample security code and corresponding sample shaping data if the sample security code is detected to be updated;
and the sixth processing unit is used for updating the preset mapping relation table according to the newly added sample security codes and the corresponding sample shaping data.
In a third aspect, an embodiment of the present application provides a data transmission device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the data transmission method according to the first aspect when executing the computer program.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium storing a computer program, which when executed by a processor implements a data transmission method as described in the first aspect above.
In a fifth aspect, embodiments of the present application provide a computer program product, wherein the computer program product comprises a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps described in the first aspect of the embodiments of the present application. The computer program product may be a software installation package.
In the embodiment of the application, financial quotation data to be transmitted and corresponding security codes are acquired; obtaining target shaping data according to a preset mapping relation table and security codes; compressing the target shaping data to obtain target compressed data; filling the target compressed data into the packet head position of the financial quotation data to obtain target transmission data; and sending the target transmission data to the target equipment. In the method, the certificate codes are mapped and compressed independently in the incremental transmission process of the financial quotation data and then transmitted, so that the size of packet head transmission is saved, the peak quotation bandwidth is saved, and the transmission delay is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required for the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a data transmission method according to a first embodiment of the present application;
Fig. 2 is a schematic diagram of stop bit encoding in a data transmission method according to a first embodiment of the present application;
fig. 3 is a schematic diagram of target transmission data in a data transmission method according to a first embodiment of the present application;
fig. 4 is a schematic diagram of a data transmission device according to a second embodiment of the present application;
fig. 5 is a schematic diagram of a data transmission device according to a third embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system configurations, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in this specification and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
In addition, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used merely to distinguish between descriptions and are not to be construed as indicating or implying relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
The data transmission device described in the embodiments of the present application may be a device with a data transmission function, for example, the device may include a smart Phone (such as an Android mobile Phone, an iOS mobile Phone, a Windows Phone mobile Phone, etc.), a tablet computer, a palm computer, a vehicle recorder, a server, a notebook computer, a mobile internet device (MID, mobile Internet Devices), or a wearable device (such as a smart watch, a bluetooth headset), etc., which are merely examples, but not exhaustive, including but not limited to the data transmission device described above.
Financial data, relating to stocks, options, futures, and data records from opening to closing per trading day, etc. in the financial field. The original financial data record is usually in millisecond level, and the main record content is the volume of a certain time of a specific variety, the price of the specific variety, and more detailed ten-grade bill data near the price of the specific variety. The historical base and daily gain of the data are relatively huge.
The securities codes are codes owned by each on-market securities, the securities correspond to the codes one by one, and the codes of the securities are not changed once being determined. Previously, the stock code was 4 digits, but now, as with the stock, it was 6 digits.
In financial data, the security code is a unique identifier capable of identifying a product, so that the association between the security code and the financial data is large. Taking stock as an example, a stock code may be used to represent the model of a stock product, e.g., guizhou Maotai, with a stock code of "600519". The form of the security code may be different in different countries or regions, and the financial data in the embodiment of the present application may refer not only to domestic financial data but also international financial data, for example, united states stock market, japan stock market, etc., which are not limited herein.
When the financial data is transmitted, the financial data corresponding to different financial products can be clearly distinguished through the security codes. In the existing financial data transmission process, security codes are placed in a protocol header part, but the data volume is larger because the security codes are usually the characteristics of digital character strings, so that a certain bandwidth is occupied, and data delay can occur.
In order to solve the above-mentioned problem, a data transmission method is proposed in the embodiments of the present application.
Referring to fig. 1, fig. 1 is a schematic flowchart of a data transmission method according to a first embodiment of the present application. An execution body of a data transmission method in this embodiment is a device having a data transmission function, for example, a server or the like. The data transmission method as shown in fig. 1 may include:
S101: and acquiring financial quotation data to be transmitted and the corresponding stock code.
In this embodiment, the initial financial data may include a security code and corresponding financial quotation data to be transmitted. The device may split the initial financial data, and split the security code and its corresponding financial quotation data to be transmitted. In this embodiment, emphasis is placed on processing the coupon code, and the processing manner of the financial quotation data to be transmitted is not limited, so that the financial quotation data to be transmitted can be compressed, encrypted and the like, which are all within the protection scope of the present application.
In a specific implementation, the financial market data may include at least one of: stock price, K-line graph, volume of exchange, market rate, amplitude, hand exchange rate, total market value, running stock, fluctuation amplitude, highest price, lowest price, market message, stock comment information, etc., are not limited herein.
The device acquires financial quotation data to be transmitted and a corresponding stock code. The number and form of bits of the security code obtained in this embodiment are not limited, and can be adjusted according to market conditions.
At present, each securities product of the securities exchange on-hand trade corresponds to a 6-digit code, which is convenient for investors to check quotations and is a necessary filling element in securities exchange.
For example, commonly available security codes are as follows:
A. shanghai: 60 x; and (3) sealing base: 50; the fund is complete, ETF:51****
B. Deep a: 00; and (3) sealing base: 18; lofs: 16; ETF:15****
C. Shanghai B:90****
D. Deep B:20****
E. Common three plate a strands 40; three plate B strands: 42; three new plates: 43****
In addition, in the case of stock purchase, payment of stock allocation, etc., specific purchase code, stock allocation code, etc. different from the market transaction are generated, and the specific purchase code, stock allocation code, etc. are also 6-bit digital codes.
S102: and obtaining the target shaping data according to a preset mapping relation table and the security codes.
The regularity of the security code is analyzed, the data with larger data quantity is analyzed and found, the code is the code of the Hushen market, the code is the representation method of the digital character string at present, the data characteristics are that the obvious characteristic of the code is that the code of the deep evidence starts with 000, the code of the prior evidence starts with 600, and the code of the futures market also has the characteristic. INTEGER (inter) data is numeric data that does not contain a fractional portion, indicated by letter I. Integer data is used only to represent integers and is stored in binary form. Therefore, a shaping map can be performed on the certificate code to obtain the corresponding shaping data.
The device stores a preset mapping relation table, wherein the preset mapping relation table can comprise a corresponding relation between preset security codes and preset shaping data. That is, the device can obtain the target shaping data corresponding to the security code through the preset mapping relation table.
The device obtains the target shaping data according to the preset mapping relation table and the security code, wherein the type of shaping of the target shaping data is not limited here, and depends on the preset mapping relation table. To ensure the uniqueness of the target integer data, the target integer data may be an integer of 4 bytes.
Optionally, before the target shaping data is obtained according to the preset mapping relation table and the security code, the method further includes the following steps:
acquiring a sample security code;
hash mapping is carried out on the sample security codes to obtain unique sample shaping data;
and establishing a preset mapping relation table according to the sample security codes and the corresponding sample shaping data thereof.
When the preset mapping relation is established, the device can acquire the sample security codes, hash-map the sample security codes, and obtain unique sample shaping data. And establishing a preset mapping relation table according to the sample security codes and the corresponding sample shaping data thereof. The sample security code is a common security code on the existing market. It can be understood that the larger the number of sample security codes, the wider the application range of the obtained preset mapping relation table, and the higher the probability of obtaining accurate shaping data when data mapping is performed.
In performing the hash mapping, the device may map the sample security code into a 4-byte sample shaping data. To ensure uniqueness of the sample shaped data, a secondary hash mapping may be performed if two different sample security codes get the same sample shaped data when performing the primary hash mapping. This ensures that each sample security code corresponds to unique sample shaping data.
Optionally, after the preset mapping relation table is established according to the sample security code and the corresponding sample shaping data thereof, the method further includes the following steps:
if the sample security code is detected to be updated, acquiring a newly added sample security code and corresponding sample shaping data thereof;
and updating a preset mapping relation table according to the newly added sample security codes and the corresponding sample shaping data.
Products in the market are continuously updated, in order to ensure the wide applicability of the method, a preset mapping relation table can be updated and maintained, and if the equipment detects that the sample security codes are updated, the newly added sample security codes and corresponding sample shaping data thereof are obtained; and updating a preset mapping relation table according to the newly added sample security codes and the corresponding sample shaping data. Or in another embodiment, other devices update and maintain the preset mapping relation table, and the local device directly receives the updated preset mapping relation table sent by the server.
Optionally, the obtaining the target shaping data according to the preset mapping relation table and the security code may include the following steps:
mapping the security codes into initial shaping data according to a preset mapping relation table;
and carrying out stop bit coding processing on the initial shaping data to obtain target shaping data.
In one embodiment, to further reduce the bandwidth occupied by the transmission and reduce latency, the device may encode the mapped shaping data. The equipment maps the security codes into initial shaping data according to a preset mapping relation table, and performs stop bit coding processing on the initial shaping data to obtain target shaping data.
Data coding refers to a technique of representing database information to be processed by a close-up number, which is to convert data into codes or code characters according to a certain data structure and qualitative characteristics of a target, represent the data composition in data transmission, and serve as a set of rules and conventions for transmission, acceptance and processing. Because the data information to be processed by the computer is very complex, some databases represent meanings that are difficult for people to memorize. For ease of use and ease of storage, the object to be processed is often encoded with a code that corresponds to a piece of information or a string of data. Encoding data is important in computer management, and information classification, verification, aggregation, retrieval and other operations can be conveniently performed. Different information records should be encoded differently, and a code point may represent a single information record. Each record can be identified through coding, and the processing method is distinguished for classification and checking, so that the defect of irregular project is overcome, the storage space is saved, and the processing speed is improved.
Optionally, the performing stop bit encoding processing on the initial shaping data to obtain target shaping data includes:
dividing the initial shaping data according to a preset stop bit to obtain a plurality of byte sequences;
and carrying out coding processing on each byte sequence to obtain target shaping data.
In this embodiment, a stop bit encoding manner is adopted, and the initial shaping data may be encoded according to a preset position of a stop bit. Specifically, the device divides the initial shaping data according to a preset stop bit to obtain a plurality of byte sequences; and carrying out coding processing on each byte sequence to obtain the target shaping data. Wherein, one Stop Bit code corresponds to one byte sequence, the most significant Bit of each byte sequence is a Stop Bit, when Stop Bit is 0, the next byte tuple belongs to the same byte sequence; if the Stopbit bit is 1, the end of the byte sequence is identified. Namely: each byte represents the data to be transmitted by 7 bits, the most significant bit of the byte identifying whether the sequence is over. As shown in fig. 2, bit 7 is a stop bit, then the device may take bits 0-7 as a byte sequence and encode the byte sequence.
S103: and compressing the target shaping data to obtain target compressed data.
In the specific implementation, the device stores the compression algorithm in advance, compresses the target shaping data according to the pre-stored compression algorithm, reduces the data quantity, and can compress various redundancies to obtain the target compression data. In this embodiment, the compression algorithm is not limited. Specifically, the target compressed data may be obtained by compression using an LZF compression algorithm.
Optionally, in the step S103, compressing the target shaping data to obtain target compressed data may include the following steps:
acquiring the target importance of the security code;
determining a target compression algorithm corresponding to the target importance according to a mapping relation between the preset importance and the compression algorithm;
acquiring target network parameters of a data transmission channel;
determining a target data size of the target shaping data;
determining a compression control parameter of the target compression algorithm according to the target network parameter and the target data volume;
and compressing the target shaping data according to the target compression algorithm and the target compression control parameter to obtain the target compression data.
In this embodiment of the present application, the target importance corresponding to the stock of the security code may be determined based on the fund ratio of the stock, for example, the higher the fund ratio, the higher the target importance, and the target importance may be determined based on the hand change rate or the market heat of the security code, for example, the higher the hand change rate, the higher the importance, or the higher the market heat, the higher the importance. The data transmission channel is a data transmission channel formed between the data transmission device and the target device.
In a specific implementation, a mapping relationship between a preset importance degree and a compression algorithm, that is, different importance degrees may be stored in advance, and then different compression algorithms may be selected. The target network parameters may include at least one of: network rate, network bandwidth, network delay, packet loss rate, network security, etc., are not limited herein. The target data size may be a data bit or a memory size of data, etc. Different compression algorithms can correspond to different compression control parameters, the compression control parameters are used for controlling the compression degree or compression proportion, and the compression degree is different, so that the losses caused by different compression degrees are different.
Specifically, the target network parameters of the data transmission channel can be obtained, the target data size of the target shaping data can be determined, the compression control parameters of the target compression algorithm can be determined according to the target network parameters and the target data size, the compression control parameters related to the network and the data attributes can be obtained, and the target shaping data can be compressed according to the target compression algorithm and the target compression control parameters to obtain the target compression data, so that the decompressed data quality and network safety can be ensured, the data can be compressed to the greatest extent, and the data transmission rate can be ensured.
Optionally, the step of determining the compression control parameter of the target compression algorithm according to the target network parameter and the target data size may include the following steps:
determining a reference compression control parameter corresponding to the target network parameter according to a mapping relation between a preset network parameter and the compression control parameter;
determining a target optimization factor corresponding to the target data size according to a mapping relation between the preset data size and the optimization factor;
and optimizing the reference compression control parameters according to the target optimization factors to obtain the compression control parameters of the target compression algorithm.
In this embodiment of the present application, a mapping relationship between a preset network parameter and a compression control parameter and a mapping relationship between a preset data size and an optimization factor may be stored in advance, a value range of the optimization factor may be-0.12 to 0.12, further, a reference compression control parameter corresponding to a target network parameter may be determined according to the mapping relationship between the preset network parameter and the compression control parameter, then, a target optimization factor corresponding to a target data size may be determined according to the mapping relationship between the preset data size and the optimization factor, and finally, the reference compression control parameter may be optimized according to the target optimization factor to obtain a compression control parameter of a target compression algorithm, which is specifically as follows:
compression control parameter of target compression algorithm= (1+target optimization factor) ×reference compression control parameter
Therefore, the compression control parameters can be dynamically adjusted based on the network condition and the data quantity of the shaping data, so that the data transmission rate can be improved while the compression effect is ensured.
S104: and filling the target compressed data into the packet head position of the financial quotation data to obtain target transmission data.
And the device fills the target compressed data into the packet head position of the financial quotation data to obtain target transmission data. As shown in fig. 3, fast data is financial market data, and the device fills the target compressed data, that is, the stop bit code mapping part, into the position of the communication packet header to obtain the target transmission data, where the communication packet header may include: message command, full packet length, message type, and special coding of the code map (i.e., stop bit code map). Therefore, the header in the target transmission does not contain the code of the complete securities, but only contains the target compressed data obtained after mapping compression, so that the bandwidth can be saved, and the data delay can be reduced.
S105: and sending the target transmission data to target equipment.
Finally, the device sends the target transmission data to the target device, wherein the target device is the device for receiving the data, and may be the client device.
When receiving the target transmission data, the client device can extract the target compression data in the packet header, decompress the target compression data by adopting a corresponding compression algorithm, decode the data coded by the stop bit to obtain shaping data, and obtain the security code corresponding to the shaping data according to a preset mapping relation table. The obtained stock code can be used as the identification of financial quotation data.
In the embodiment of the application, financial quotation data to be transmitted and corresponding security codes are acquired; obtaining target shaping data according to a preset mapping relation table and security codes; compressing the target shaping data to obtain target compressed data; filling the target compressed data into the packet head position of the financial quotation data to obtain target transmission data; and sending the target transmission data to the target equipment. According to the method, in the incremental transmission process of the financial quotation data, the certificate codes are mapped and compressed independently and then transmitted, so that the size of packet head transmission is saved, the peak quotation bandwidth is saved, the transmission delay is reduced, and the transmission efficiency is improved.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic of each process, and should not limit the implementation process of the embodiment of the present application in any way.
Referring to fig. 4, fig. 4 is a schematic diagram of a data transmission device according to a second embodiment of the present application. The units included are for performing the steps in the corresponding embodiment of fig. 1. Refer specifically to the description of the corresponding embodiment in fig. 4. For convenience of explanation, only the portions related to the present embodiment are shown. Referring to fig. 4, the data transmission apparatus 4 includes:
a first obtaining unit 410, configured to obtain financial quotation data to be transmitted and a security code corresponding to the financial quotation data;
the first processing unit 420 is configured to obtain target shaping data according to a preset mapping relation table and the security code;
a compression unit 430, configured to compress the target shaping data to obtain target compressed data;
a second processing unit 440, configured to fill the target compressed data into a packet header position of the financial market data, to obtain target transmission data;
and a sending unit 450, configured to send the target transmission data to a target device.
Further, the first processing unit 420 is specifically configured to:
mapping the security codes into initial shaping data according to a preset mapping relation table;
and carrying out stop bit coding processing on the initial shaping data to obtain target shaping data.
Further, the first processing unit 420 is specifically configured to:
dividing the initial shaping data according to a preset stop bit to obtain a plurality of byte sequences;
and carrying out coding processing on each byte sequence to obtain target shaping data.
Further, the data transmission device 4 further includes:
the second acquisition unit is used for acquiring the sample security codes;
the third processing unit is used for carrying out hash mapping on the sample security codes to obtain unique sample shaping data;
and the fourth processing unit is used for establishing a preset mapping relation table according to the sample security codes and the corresponding sample shaping data thereof.
Further, the data transmission device 4 further includes:
a fifth processing unit, configured to obtain a new added sample security code and corresponding sample shaping data if the sample security code is detected to be updated;
and the sixth processing unit is used for updating the preset mapping relation table according to the newly added sample security codes and the corresponding sample shaping data.
Optionally, in the aspect of compressing the target shaping data to obtain target compressed data, the compressing unit 430 is specifically configured to:
acquiring the target importance of the security code;
determining a target compression algorithm corresponding to the target importance according to a mapping relation between the preset importance and the compression algorithm;
acquiring target network parameters of a data transmission channel;
determining a target data size of the target shaping data;
determining a compression control parameter of the target compression algorithm according to the target network parameter and the target data volume;
and compressing the target shaping data according to the target compression algorithm and the target compression control parameter to obtain the target compression data.
Fig. 5 is a schematic diagram of a data transmission device according to a third embodiment of the present application. As shown in fig. 5, the data transmission device 5 of this embodiment includes: a processor 50, a memory 51 and a computer program 52, such as a data transmission program, stored in the memory 51 and executable on the processor 50. The processor 50, when executing the computer program 52, implements the steps of the various data transmission method embodiments described above, such as steps 101 through 105 shown in fig. 1. Alternatively, the processor 50, when executing the computer program 52, performs the functions of the modules/units of the apparatus embodiments described above, such as the functions of the modules 410-450 shown in fig. 4.
By way of example, the computer program 52 may be partitioned into one or more modules/units that are stored in the memory 51 and executed by the processor 50 to complete the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing the specified functions describing the execution of the computer program 52 in the data transmission device 5. For example, the computer program 52 may be divided into a first acquisition unit, a first processing unit, a compression unit, a second processing unit, and a transmission unit, each unit having the following specific functions:
the first acquisition unit is used for acquiring financial quotation data to be transmitted and corresponding security codes thereof;
the first processing unit is used for obtaining target shaping data according to a preset mapping relation table and the security codes;
the compression unit is used for compressing the target shaping data to obtain target compressed data;
the second processing unit is used for filling the target compressed data into the packet head position of the financial quotation data to obtain target transmission data;
and the sending unit is used for sending the target transmission data to target equipment.
The data transmission device may include, but is not limited to, a processor 50, a memory 51. It will be appreciated by those skilled in the art that fig. 5 is merely an example of the data transmission device 5 and does not constitute a limitation of the data transmission device 5, and may include more or less components than illustrated, or may combine certain components, or different components, e.g., the data transmission device may also include an input-output device, a network access device, a bus, etc.
The processor 50 may be a central processing unit (Central Processing Unit, CPU), other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 51 may be an internal storage unit of the data transmission device 5, such as a hard disk or a memory of the data transmission device 5. The memory 51 may also be an external storage device of the data transmission device 5, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the data transmission device 5. Further, the data transmission device 5 may also include both an internal storage unit and an external storage device of the data transmission device 5. The memory 51 is used for storing the computer program and other programs and data required by the data transmission device. The memory 51 may also be used to temporarily store data that has been output or is to be output.
In an embodiment of the present application, the one or more programs are stored in the memory and configured to be executed by the processor, where the program includes instructions for performing the following steps:
acquiring financial quotation data to be transmitted and corresponding stock codes thereof;
obtaining target shaping data according to a preset mapping relation table and the security codes;
compressing the target shaping data to obtain target compressed data;
filling the target compressed data into the packet head position of the financial quotation data to obtain target transmission data;
and sending the target transmission data to target equipment.
Optionally, in the aspect of obtaining the target shaping data according to the preset mapping relation table and the security code, the program includes instructions for executing the following steps:
mapping the security codes into initial shaping data according to a preset mapping relation table;
and carrying out stop bit coding processing on the initial shaping data to obtain target shaping data.
Optionally, in the aspect of performing stop bit encoding processing on the initial shaping data to obtain target shaping data, the program includes instructions for performing the following steps:
Dividing the initial shaping data according to a preset stop bit to obtain a plurality of byte sequences;
and carrying out coding processing on each byte sequence to obtain target shaping data.
Optionally, before the target shaping data is obtained according to the preset mapping relation table and the security code, the program further includes instructions for executing the following steps:
acquiring a sample security code;
hash mapping is carried out on the sample security codes to obtain unique sample shaping data;
and establishing a preset mapping relation table according to the sample security codes and the corresponding sample shaping data thereof.
Optionally, after the preset mapping relation table is established according to the sample security code and the corresponding sample shaping data thereof, the program further includes instructions for executing the following steps:
if the sample security code is detected to be updated, acquiring a newly added sample security code and corresponding sample shaping data thereof;
and updating a preset mapping relation table according to the newly added sample security codes and the corresponding sample shaping data.
Optionally, in the aspect of compressing the target shaping data to obtain target compressed data, the program further includes instructions for:
Acquiring the target importance of the security code;
determining a target compression algorithm corresponding to the target importance according to a mapping relation between the preset importance and the compression algorithm;
acquiring target network parameters of a data transmission channel;
determining a target data size of the target shaping data;
determining a compression control parameter of the target compression algorithm according to the target network parameter and the target data volume;
and compressing the target shaping data according to the target compression algorithm and the target compression control parameter to obtain the target compression data.
It should be noted that, because the content of information interaction and execution process between the above devices/units is based on the same concept as the method embodiment of the present application, specific functions and technical effects thereof may be referred to in the method embodiment section, and will not be described herein again.
The embodiment of the application also provides a network device, which comprises: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, which when executed by the processor performs the steps of any of the various method embodiments described above.
Embodiments of the present application also provide a computer readable storage medium storing a computer program which, when executed by a processor, implements steps that may implement the various method embodiments described above.
Embodiments of the present application provide a computer program product which, when run on a mobile terminal, causes the mobile terminal to perform steps that may be performed in the various method embodiments described above.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application implements all or part of the flow of the method of the above embodiments, and may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, where the computer program, when executed by a processor, may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing device/terminal apparatus, recording medium, computer Memory, read-Only Memory (ROM), random access Memory (RAM, random Access Memory), electrical carrier signals, telecommunications signals, and software distribution media. Such as a U-disk, removable hard disk, magnetic or optical disk, etc. In some jurisdictions, computer readable media may not be electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other manners. For example, the apparatus/network device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical functional division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (10)

1. A data transmission method, comprising:
acquiring financial quotation data to be transmitted and corresponding stock codes thereof;
obtaining target shaping data according to a preset mapping relation table and the security codes;
Compressing the target shaping data to obtain target compressed data;
filling the target compressed data into the packet head position of the financial quotation data to obtain target transmission data;
and sending the target transmission data to target equipment.
2. The data transmission method according to claim 1, wherein the obtaining the target shaping data according to the preset mapping relation table and the security code includes:
mapping the security codes into initial shaping data according to a preset mapping relation table;
and carrying out stop bit coding processing on the initial shaping data to obtain target shaping data.
3. The data transmission method as claimed in claim 2, wherein said performing stop bit encoding processing on said initial shaping data to obtain target shaping data comprises:
dividing the initial shaping data according to a preset stop bit to obtain a plurality of byte sequences;
and carrying out coding processing on each byte sequence to obtain target shaping data.
4. The data transmission method according to claim 1, further comprising, before the target shaping data is obtained from the preset mapping relation table and the security code:
Acquiring a sample security code;
hash mapping is carried out on the sample security codes to obtain unique sample shaping data;
and establishing a preset mapping relation table according to the sample security codes and the corresponding sample shaping data thereof.
5. The data transmission method according to claim 4, further comprising, after said creating a predetermined mapping table according to said sample security codes and corresponding sample shaping data thereof:
if the sample security code is detected to be updated, acquiring a newly added sample security code and corresponding sample shaping data thereof;
and updating a preset mapping relation table according to the newly added sample security codes and the corresponding sample shaping data.
6. The data transmission method according to any one of claims 1 to 5, wherein compressing the target shaping data to obtain target compressed data includes:
acquiring the target importance of the security code;
determining a target compression algorithm corresponding to the target importance according to a mapping relation between the preset importance and the compression algorithm;
acquiring target network parameters of a data transmission channel;
determining a target data size of the target shaping data;
Determining a compression control parameter of the target compression algorithm according to the target network parameter and the target data volume;
and compressing the target shaping data according to the target compression algorithm and the target compression control parameter to obtain the target compression data.
7. A data transmission apparatus, comprising:
the first acquisition unit is used for acquiring financial quotation data to be transmitted and corresponding security codes thereof;
the first processing unit is used for obtaining target shaping data according to a preset mapping relation table and the security codes;
the compression unit is used for compressing the target shaping data to obtain target compressed data;
the second processing unit is used for filling the target compressed data into the packet head position of the financial quotation data to obtain target transmission data;
and the sending unit is used for sending the target transmission data to target equipment.
8. The data transmission device of claim 7, wherein the first processing unit is specifically configured to:
mapping the security codes into initial shaping data according to a preset mapping relation table;
and carrying out stop bit coding processing on the initial shaping data to obtain target shaping data.
9. A data transmission device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 6 when executing the computer program.
10. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the method according to any one of claims 1 to 6.
CN202111584984.9A 2021-05-17 2021-12-22 Data transmission method, device and equipment Active CN114422608B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110535134.3A CN113411307A (en) 2021-05-17 2021-05-17 Data transmission method, device and equipment
CN2021105351343 2021-05-17

Publications (2)

Publication Number Publication Date
CN114422608A CN114422608A (en) 2022-04-29
CN114422608B true CN114422608B (en) 2024-01-26

Family

ID=77678732

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202110535134.3A Pending CN113411307A (en) 2021-05-17 2021-05-17 Data transmission method, device and equipment
CN202111584984.9A Active CN114422608B (en) 2021-05-17 2021-12-22 Data transmission method, device and equipment

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202110535134.3A Pending CN113411307A (en) 2021-05-17 2021-05-17 Data transmission method, device and equipment

Country Status (1)

Country Link
CN (2) CN113411307A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114418771B (en) * 2022-03-28 2022-08-09 深圳希施玛数据科技有限公司 Data transmission method and related device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105224326A (en) * 2015-09-30 2016-01-06 北京恒华伟业科技股份有限公司 A kind of incremental deploying method of system code and device
CN106991165A (en) * 2017-03-31 2017-07-28 北京京东金融科技控股有限公司 Method, device and the electronic equipment of processing financial data based on block chain
DE102017130591A1 (en) * 2016-12-20 2018-06-21 Hyperstone Gmbh Method and apparatus for error correction coding based on data compression
CN112306974A (en) * 2019-07-30 2021-02-02 深信服科技股份有限公司 Data processing method, device, equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3307909B2 (en) * 2000-01-24 2002-07-29 ケンテックス株式会社 Method of compressing stock price data and method of compressing and sending stock price data

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105224326A (en) * 2015-09-30 2016-01-06 北京恒华伟业科技股份有限公司 A kind of incremental deploying method of system code and device
DE102017130591A1 (en) * 2016-12-20 2018-06-21 Hyperstone Gmbh Method and apparatus for error correction coding based on data compression
CN106991165A (en) * 2017-03-31 2017-07-28 北京京东金融科技控股有限公司 Method, device and the electronic equipment of processing financial data based on block chain
CN112306974A (en) * 2019-07-30 2021-02-02 深信服科技股份有限公司 Data processing method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN113411307A (en) 2021-09-17
CN114422608A (en) 2022-04-29

Similar Documents

Publication Publication Date Title
WO2021082757A1 (en) Blockchain system-based data processing method and apparatus
CN108768929B (en) Electronic device, credit investigation feedback message analysis method and storage medium
CN110445860B (en) Message sending method, device, terminal equipment and storage medium
US20180336632A1 (en) System and Method for Providing Market Data in an Electronic Trading Environment
CN110830437B (en) Data compression method, device, equipment and storage medium for high-frequency service data
CN112953550B (en) Data compression method, electronic device and storage medium
CN109981111A (en) A kind of method, apparatus and storage electronic equipment of data compression coding
CN111262876B (en) Data processing method, device and equipment based on block chain and storage medium
CN112003814B (en) Market data processing method and device, terminal equipment and storage medium
CN111756522A (en) Data processing method and system
CN114422608B (en) Data transmission method, device and equipment
CN107577432A (en) A kind of security bargain data compression method and device
CN113129150A (en) Transaction data processing method and device, terminal device and readable storage medium
CN108880559B (en) Data compression method, data decompression method, compression equipment and decompression equipment
WO2021097624A1 (en) File processing method, file processing apparatus, and terminal device
CN114726480A (en) Data encoding method and related device, electronic equipment and storage medium
CN116303297A (en) File compression processing method, device, equipment and medium
CN116074408A (en) Quotation data recovery method and device
CN113162628B (en) Data encoding method, data decoding method, terminal and storage medium
CN113315793B (en) Data transmission method, device, equipment and medium based on intelligent compression
CN111414341B (en) Data normalization description method in Internet of things environment
US20130318093A1 (en) Short string compression
US10742783B2 (en) Data transmitting apparatus, data receiving apparatus and method thereof having encoding or decoding functionalities
CN115374462B (en) Storage management system based on financial service data
CN110852083A (en) Method and device for generating short message template

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