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

Data transmission method, device and equipment Download PDF

Info

Publication number
CN114422608A
CN114422608A CN202111584984.9A CN202111584984A CN114422608A CN 114422608 A CN114422608 A CN 114422608A CN 202111584984 A CN202111584984 A CN 202111584984A CN 114422608 A CN114422608 A CN 114422608A
Authority
CN
China
Prior art keywords
data
target
shaping
sample
transmission
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111584984.9A
Other languages
Chinese (zh)
Other versions
CN114422608B (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

Images

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 data transmission device and data transmission equipment, wherein the method comprises the following steps: acquiring financial market data to be transmitted and corresponding security 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 to the packet header position of the financial market 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 market data, the certificate codes are mapped and compressed independently and then transmitted, so that the size of packet header transmission is saved, peak market bandwidth is saved, and 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, to a data transmission method, apparatus, and device.
Background
In the financial industry, the market data volume of a stock exchange in the stock market is usually large, and in the field of existing market data distribution and transmission application, the theory of incremental data compression 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 methods, the quotation security code is relied on to identify the increment, and in the process of the quotation increment transmission of the securities, the header part of the protocol packet contains the securities code, so that the data volume is particularly large in the transmission process, a certain bandwidth is occupied, and the transmission delay is increased.
Disclosure of Invention
The embodiment of the application provides a data transmission method, a data transmission device and data transmission equipment, and can solve the problems.
In a first aspect, an embodiment of the present application provides a data transmission method, including:
acquiring financial market data to be transmitted and corresponding security 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 to the packet header position of the financial market data to obtain target transmission data;
and sending the target transmission data to target equipment.
Further, the obtaining of the target truing data according to the preset mapping table and the security codes 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 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 coding each byte sequence to obtain target shaping data.
Further, before obtaining the target shaping data according to the preset mapping relation table and the security codes, the method further comprises the following steps:
obtaining a sample security code;
carrying out Hash mapping on the sample security codes to obtain unique sample reshaping data;
and establishing a preset mapping relation table according to the sample security codes and the corresponding sample shaping data thereof.
Further, after the establishing a preset mapping relation table according to the sample security code and the sample truing data corresponding to the sample security code, 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, an embodiment of the present application provides a multiple data transmission apparatus, including:
the system comprises a first acquisition unit, a second acquisition unit and a processing unit, wherein the first acquisition unit is used for acquiring financial market data to be transmitted and security codes corresponding to the financial market data;
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 to the packet header position of the financial market data to obtain target transmission data;
and the sending unit is used for sending the target transmission data to the 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 coding each byte sequence to obtain target shaping data.
Further, the data transmission apparatus further includes:
a second obtaining unit for obtaining a sample security code;
the third processing unit is used for carrying out Hash mapping on the sample security codes to obtain unique sample reshaping 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 apparatus further includes:
the fifth processing unit is used for acquiring a newly 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 thereof.
In a third aspect, an embodiment of the present application provides a data transmission device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the data transmission method according to the first aspect is implemented.
In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the data transmission method according to the first aspect.
In a fifth aspect, embodiments of the present application provide a computer program product, where the computer program product includes a non-transitory computer-readable storage medium storing a computer program, where the computer program is operable to cause a computer to perform some or all of the steps as 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, the financial market data to be transmitted and the corresponding security codes thereof are obtained; 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 to the packet header position of the financial market 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 market data, the certificate codes are mapped and compressed independently and then transmitted, so that the size of packet header transmission is saved, peak market bandwidth is saved, and transmission delay is reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
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 structures, 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 will 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 and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this 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 present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated 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 embodiment of the present application may be a device having a data transmission function, for example, the device may include a smart Phone (e.g., an Android Phone, an iOS Phone, a Windows Phone, etc.), a tablet computer, a palm computer, a car data recorder, a server, a notebook computer, a Mobile Internet device (MID, Mobile Internet Devices), or a wearable device (e.g., a smart watch, a bluetooth headset), which are merely examples, and are not exhaustive, and include but not limited to the data transmission device described above.
Financial data, data records relating to stocks, options, futures, and the like from opening to closing every trading day in the financial field. The original financial data record is usually in millisecond level, and the main record content is the volume of a specific variety at a certain moment, the price of the specific variety, and more specifically, ten-gear listing data near the price of the specific variety. The historical cardinality and daily increment of the data are relatively huge.
The security code refers to a code owned by each listed security, the security corresponds to the code one by one, and the code of the security is not changed once being determined. Previously, the security code of deep exchanges was 4 digits, but now, as with the trade, is 6 digits.
In the financial data, the security code is a unique identifier that can identify a product, and therefore, the security code is highly correlated with the financial data. Taking stocks as an example, the security code may be used to represent the model number of a stock product, e.g., Guizhou thatch, with the security code "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 to not only domestic financial data but also international financial data, such as the us stock market, the japanese stock market, and the like, which is not limited herein.
When the financial data are transmitted, the financial data corresponding to different financial products can be clearly distinguished through the security codes. In the existing transmission process of financial data, security codes are put into a protocol header part, but because the security codes are generally characterized by digital character strings, the data volume is large, so that certain bandwidth is occupied, and data delay occurs.
In order to solve the above problem, an embodiment of the present application provides a data transmission method.
Referring to fig. 1, fig. 1 is a schematic flow chart of a data transmission method according to a first embodiment of the present application. The execution subject of the 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 the financial market data to be transmitted and the corresponding security codes thereof.
In this embodiment, the initial financial data may include security codes and corresponding financial market data to be transmitted. The device can split the initial financial data and split the security codes from the corresponding financial market data to be transmitted. In this embodiment, the key point is to process the certificate code, the processing mode of the financial market data to be transmitted is not limited, and the financial market data to be transmitted can be compressed, encrypted, and the like, and all are within the protection scope of the present application.
In particular implementations, the financial market data may include at least one of: stock price, K-line graph, volume of trade, market profitability, amplitude, hand-off rate, total market value, current capitalization, price growth, maximum price, minimum price, market messages, stock review information, and the like, without limitation.
The equipment acquires the financial market data to be transmitted and the corresponding security codes thereof. The number of digits and the form of the acquired security code in this embodiment are not limited, and may be adjusted according to the market conditions.
At present, each security product in the stock trade of securities exchange corresponds to a code with 6 digits, which is convenient for investors to check quotations and is a necessary element in the securities trade.
For example, commonly used security codes that can be obtained are as follows:
A. hu A: 60 ×; sealing the base: 50 x; capital for upper syndrome foundation and ETF: 51****
B. Depth A: 00 ×; sealing the base: 18 x; lofs: 16 x; ETF: 15****
C. Hu B: 90****
D. Depth B: 20****
E. Common three-plate A strand 40; three plates, strand B: 42 ×; the new three panels: 43****
In addition, under the conditions of stock purchase, stock allocation payment and the like, specific purchase application codes, stock allocation codes and the like which are different from those of the trades on the market are generated, and all the codes are 6-digit codes.
S102: and obtaining target shaping data according to a preset mapping relation table and the security codes.
The data with larger data volume is analyzed by analyzing the regularity of the security codes, the data is the codes of the Shanghai and Shenshen markets, the codes are all the expression methods of numeric character strings at present, and the data characteristics have the following obvious characteristics that the deep certificate codes begin with 000, the data characteristics begin with 600, and the codes of the futures markets also have the characteristics. INTEGER (INTEGER) data is numerical data that does not contain a fractional part and is denoted by the letter I. Integer data is used to represent integers only and is stored in binary form. Therefore, the certificate code can be subjected to shaping mapping to obtain the corresponding shaping data.
The device stores a preset mapping relation table, wherein the preset mapping relation table may include a corresponding relation between a preset security code and preset shaping data. That is, the device can obtain the target shaping data corresponding to the security codes by presetting the mapping relation table.
The device obtains the target shaping data according to the preset mapping relation table and the security codes, wherein the type of shaping of the target shaping data is not limited here and depends on the preset mapping relation table. In order to ensure the uniqueness of the target integer data, the target integer data may be a 4-byte integer.
Optionally, before obtaining the target truing data according to the preset mapping table and the security codes, the method may further include the following steps:
obtaining a sample security code;
carrying out Hash mapping on the sample security codes to obtain unique sample reshaping data;
and establishing a preset mapping relation table according to the sample security codes and the corresponding sample shaping data thereof.
And when a preset mapping relation expression is established, the equipment can obtain the sample security code, and the sample security code is subjected to Hash mapping to obtain unique sample reshaping data. And establishing a preset mapping relation table according to the sample security codes and the corresponding sample shaping data. Wherein, the sample security code is a security code commonly found in the existing market. It can be understood that, the larger the number of sample security codes is, the wider the application range of the obtained preset mapping relation table is, and the higher the probability of obtaining accurate shaping data is 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 the uniqueness of the sample shaping data, a second hash mapping may be performed if two different sample security codes get the same sample shaping data when the first hash mapping is performed. This ensures that each sample security code corresponds to unique sample shaping data.
Optionally, after the preset mapping relationship table is established according to the sample security code and the sample shaping data corresponding to the sample security code, the method may further include 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 on 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, 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, the preset mapping relationship table is updated and maintained by other devices, and the local device directly receives the updated preset mapping relationship table sent by the server.
Optionally, the obtaining of the target shaping data according to the preset mapping 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 the delay, the device may encode the mapped shaped data. The equipment maps the security codes into initial shaping data according to a preset mapping relation table, and carries out stop bit coding processing on the initial shaping data to obtain target shaping data.
Data encoding refers to a technology of representing database information to be processed by close-up numbers, and is a technology of converting data into codes or encoding characters according to certain data structures and qualitative characteristics of objects, representing data composition in data transmission, and serving as a set of rules and conventions for transmission, acceptance and processing. Because the data information processed by the computer is very complicated, the meaning represented by some databases is difficult to remember. For ease of use and ease of memory, the object being processed is often encoded with a code symbol representing a message or a series of data. Encoding data is very important in the management of computers, and information classification, checking, aggregation, retrieval and other operations can be conveniently performed. Different information records should use different codes, and a code point may represent an information record. Each record can be identified through coding, the processing method is distinguished, and classification and checking are carried out, so that the defect of uneven projects is overcome, the storage space is saved, and the processing speed is increased.
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 coding each byte sequence to obtain target shaping data.
In this embodiment, a stop bit encoding mode is adopted, and the initial shaping data may be encoded according to a preset stop bit position. Specifically, the device divides the initial shaping data according to a preset stop bit to obtain a plurality of byte sequences; and coding each byte sequence to obtain target shaping data. One Stop Bit code corresponds to one byte sequence, the most significant Bit of each byte sequence is a Stop Bit, and when the Stop Bit is 0, the next byte group 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 complete. As shown in fig. 2, bit 7 is a stop bit, then the device may treat 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 specific implementation, a compression algorithm is stored in the device in advance, the device compresses the target shaping data according to the pre-stored compression algorithm, and various redundancies can be compressed while the data volume is reduced to obtain target compressed data. In this embodiment, the compression algorithm is not limited. Specifically, the target compressed data may be obtained by compressing using an LZF compression algorithm.
Optionally, in the step S103, compressing the target shaping data to obtain target compressed data, the method 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 preset mapping relation between the 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 size;
and compressing the target shaping data according to the target compression algorithm and the target compression control parameter to obtain the target compressed data.
In the embodiment of the present application, the target importance degree corresponding to the share of the stock of the security code may be determined based on the share of the stock, for example, the higher the share of the stock, the higher the target importance degree, and in addition, the target importance degree may also be determined based on the hand-off rate or the market popularity of the security code, for example, the higher the hand-off rate, the higher the importance degree, or the higher the market popularity, the higher the importance degree. The data transmission channel is a data transmission channel formed between the data transmission device and the target device.
In specific implementation, the mapping relationship between the preset importance and the compression algorithm may be pre-stored, that is, different importance may be selected. The target network parameter may include at least one of: network rate, network bandwidth, network latency, packet loss rate, network security, etc., without limitation. The target data size may be a data bit or a memory size of data. Different compression algorithms can correspond to different compression control parameters, the compression control parameters are used for controlling the compression degree or the compression proportion, and if the compression degrees are different, the loss caused by the different compression degrees is different.
Specifically, a target network parameter of a data transmission channel can be obtained, a target data volume of target shaping data can be determined, a compression control parameter of a target compression algorithm is determined according to the target network parameter and the target data volume, that is, a compression control parameter related to a network and a data attribute can be obtained, and the target shaping data is compressed according to the target compression algorithm and the target compression control parameter to obtain target compressed data.
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 preset mapping relation between the 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 parameter according to the target optimization factor to obtain the compression control parameter of the target compression algorithm.
In the 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, and 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, and then a target optimization factor corresponding to the 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 is (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 size of the shaping data, and the data transmission rate can be improved while the compression effect is ensured.
S104: and filling the target compressed data to the packet header position of the financial market data to obtain target transmission data.
And the equipment fills the target compressed data to the packet header position of the financial market data to obtain target transmission data. As shown in fig. 3, Fast data is financial market data, the device fills the target compressed data, i.e. the stop bit coding mapping portion, to the position of the communication packet header to obtain target transmission data, and the communication packet header may include: message command, full packet length, message type, and special encoding of the code map (i.e., stop bit encoding mapping). Therefore, the header in the target transmission does not contain the codes 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 a device for receiving data and can be a client device.
When receiving target transmission data, the client device may extract target compressed data in the packet header, decompress the target compressed data by using a corresponding compression algorithm, decode the stop bit encoded data to obtain shaping data, and obtain security codes corresponding to the shaping data according to a preset mapping relation table. The obtained security code can be used as the identification of the financial market data.
In the embodiment of the application, the financial market data to be transmitted and the corresponding security codes thereof are obtained; 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 to the packet header position of the financial market 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 market data, the certificate codes are mapped and compressed independently and then transmitted, so that the size of packet header transmission is saved, peak market bandwidth is saved, transmission delay is reduced, and transmission efficiency is improved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
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 are included for performing the steps in the corresponding embodiment of fig. 1. Please refer to fig. 4 for a related description of the embodiment. For convenience of explanation, only the portions related to the present embodiment are shown. Referring to fig. 4, the data transmission device 4 includes:
a first obtaining unit 410, configured to obtain financial market data to be transmitted and security codes corresponding to the financial market data;
the first processing unit 420 is configured to obtain target shaping data according to a preset mapping table and the security codes;
a compressing unit 430, configured to compress the target shaping data to obtain target compressed data;
the second processing unit 440 is configured to fill the target compressed data to a packet header position of the financial market data to obtain target transmission data;
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 coding each byte sequence to obtain target shaping data.
Further, the data transmission apparatus 4 further includes:
a second obtaining unit for obtaining a sample security code;
the third processing unit is used for carrying out Hash mapping on the sample security codes to obtain unique sample reshaping 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 apparatus 4 further includes:
the fifth processing unit is used for acquiring a newly 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 thereof.
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 preset mapping relation between the 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 size;
and compressing the target shaping data according to the target compression algorithm and the target compression control parameter to obtain the target compressed 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 transfer program, stored in said memory 51 and executable on said processor 50. The processor 50, when executing the computer program 52, implements the steps in the above-described embodiments of the data transmission method, such as the steps 101 to 105 shown in fig. 1. Alternatively, the processor 50, when executing the computer program 52, implements the functions of the modules/units in the above-mentioned device embodiments, such as the functions of the modules 410 to 450 shown in fig. 4.
Illustratively, the computer program 52 may be partitioned into one or more modules/units, which are stored in the memory 51 and executed by the processor 50 to accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe 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 acquiring unit, a first processing unit, a compressing unit, a second processing unit, and a transmitting unit, and the specific functions of each unit are as follows:
the system comprises a first acquisition unit, a second acquisition unit and a processing unit, wherein the first acquisition unit is used for acquiring financial market data to be transmitted and security codes corresponding to the financial market data;
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 to the packet header position of the financial market data to obtain target transmission data;
and the sending unit is used for sending the target transmission data to the 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 those shown, or some components may be combined, or different components, for example, 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 (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. 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), and 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, and in an embodiment of the present application, the programs include instructions for performing the following steps:
acquiring financial market data to be transmitted and corresponding security 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 to the packet header position of the financial market data to obtain target transmission data;
and sending the target transmission data to target equipment.
Optionally, in the aspect of obtaining the target truing data according to the preset mapping table and the security codes, 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 executing the following steps:
dividing the initial shaping data according to a preset stop bit to obtain a plurality of byte sequences;
and coding each byte sequence to obtain target shaping data.
Optionally, before obtaining the target truing data according to the preset mapping table and the security codes, the program further includes instructions for executing the following steps:
obtaining a sample security code;
carrying out Hash mapping on the sample security codes to obtain unique sample reshaping 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 relationship table is established according to the sample security code and the sample shaping data corresponding to the sample security code, 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 executing the following steps:
acquiring the target importance of the security code;
determining a target compression algorithm corresponding to the target importance according to a preset mapping relation between the 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 size;
and compressing the target shaping data according to the target compression algorithm and the target compression control parameter to obtain the target compressed data.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.
An embodiment of the present application further provides a network device, where the network device includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, the processor implementing the steps of any of the various method embodiments described above when executing the computer program.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the above-mentioned method embodiments.
The embodiments of the present application provide a computer program product, which when running on a mobile terminal, enables the mobile terminal to implement the steps in the above method embodiments when executed.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an 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 apparatus/terminal apparatus, a recording medium, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
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 implementation. 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 ways. For example, the above-described apparatus/network device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed 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 can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; 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 solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A method of data transmission, comprising:
acquiring financial market data to be transmitted and corresponding security 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 to the packet header position of the financial market data to obtain target transmission data;
and sending the target transmission data to target equipment.
2. The data transmission method as claimed in claim 1, wherein said obtaining target truing data from a predetermined mapping table and said security codes comprises:
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 according to claim 2, wherein the performing stop-bit encoding processing on the 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 coding each byte sequence to obtain target shaping data.
4. The data transmission method according to claim 1, wherein before said obtaining target profile data based on a preset mapping table and said security code, further comprising:
obtaining a sample security code;
carrying out Hash mapping on the sample security codes to obtain unique sample reshaping 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, wherein after said building a predetermined mapping table based on said sample security codes and corresponding sample shaping data, further comprising:
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 the compressing the target shaped data to obtain target compressed data comprises:
acquiring the target importance of the security code;
determining a target compression algorithm corresponding to the target importance according to a preset mapping relation between the 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 size;
and compressing the target shaping data according to the target compression algorithm and the target compression control parameter to obtain the target compressed data.
7. A data transmission apparatus, comprising:
the system comprises a first acquisition unit, a second acquisition unit and a processing unit, wherein the first acquisition unit is used for acquiring financial market data to be transmitted and security codes corresponding to the financial market data;
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 to the packet header position of the financial market data to obtain target transmission data;
and the sending unit is used for sending the target transmission data to the target equipment.
8. The data transmission apparatus according to 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, in which a computer program is stored which, when being executed by a processor, carries out 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 true CN114422608A (en) 2022-04-29
CN114422608B 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 (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010018676A1 (en) * 2000-01-24 2001-08-30 Tatsuhide Iida Method for compressing stock price data and method for transmitting compressed stock price data
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

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010018676A1 (en) * 2000-01-24 2001-08-30 Tatsuhide Iida Method for compressing stock price data and method for transmitting compressed stock price data
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
CN114422608B (en) 2024-01-26
CN113411307A (en) 2021-09-17

Similar Documents

Publication Publication Date Title
WO2019095416A1 (en) Information pushing method and apparatus, and terminal device and storage medium
CN110445860B (en) Message sending method, device, terminal equipment and storage medium
AU2007336337B2 (en) System and method for optimizing changes of data sets
CN110830437B (en) Data compression method, device, equipment and storage medium for high-frequency service data
CN111756522A (en) Data processing method and system
CN108733317B (en) Data storage method and device
CN112003814B (en) Market data processing method and device, terminal equipment and storage medium
CN111563109A (en) Radix statistics method, apparatus, system, device and computer readable storage medium
CN114422608B (en) Data transmission method, device and equipment
CN112468532A (en) Credit investigation data sending method, device, system, equipment and computer storage medium
CN115296862A (en) Network data secure transmission method based on data coding
CN106227881A (en) A kind of information processing method and server
WO2020258942A1 (en) Data compression method and device
CN111695077A (en) Asset information pushing method, terminal equipment and readable storage medium
CN114726480A (en) Data encoding method and related device, electronic equipment and storage medium
CN108573069B (en) Twins method for accelerating matching of regular expressions of compressed flow
CN104866535A (en) Compression method and device of number segment records
CN110119337B (en) Data analysis method and device and server
CN111064560B (en) Data encryption transmission method and device, terminal and data encryption transmission system
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
CN110120987B (en) WiFi connection method and device
CN113283215B (en) Data confusion method and device based on UTF-32 coding
CN118152368A (en) Data migration method between databases of multiple types of relations

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