CN109062574A - A kind of expansible securities market data transmission display methods and system - Google Patents

A kind of expansible securities market data transmission display methods and system Download PDF

Info

Publication number
CN109062574A
CN109062574A CN201810756706.9A CN201810756706A CN109062574A CN 109062574 A CN109062574 A CN 109062574A CN 201810756706 A CN201810756706 A CN 201810756706A CN 109062574 A CN109062574 A CN 109062574A
Authority
CN
China
Prior art keywords
data
enable bit
client
protocol fields
request
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
CN201810756706.9A
Other languages
Chinese (zh)
Other versions
CN109062574B (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.)
LightHouse Technology Co Ltd
Original Assignee
Wuhan Lighthouse Light 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 Wuhan Lighthouse Light Technology Co Ltd filed Critical Wuhan Lighthouse Light Technology Co Ltd
Priority to CN201810756706.9A priority Critical patent/CN109062574B/en
Publication of CN109062574A publication Critical patent/CN109062574A/en
Application granted granted Critical
Publication of CN109062574B publication Critical patent/CN109062574B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code

Abstract

The invention discloses a kind of expansible securities market datas to transmit display methods, comprising: defines document of agreement using interface description language, includes the protocol fields of securities market data in the document of agreement;The document of agreement is translated into the source code of preset language using translater, the enable bit of each protocol fields is defined in the source code;Client to needing the protocol fields of request data to carry out enabled setting, and initiates request of data to server end using enable bit setting interface, includes the enable bit information of the protocol fields of requested data in the request of data;Request of data described in the received server-side simultaneously obtains the enable bit information;The server end returns to the data of the protocol fields according to enable bit information to the client.The present invention can satisfy multiple terminals, expansion field that is multilingual, and can be convenient, and selection field transmission is arranged by enable bit and reduces transmission bandwidth so as to reduce volume of transmitted data.

Description

A kind of expansible securities market data transmission display methods and system
Technical field
The invention belongs to electronic banking technical fields, transmit more particularly, to a kind of expansible securities market data Display methods and system.
Background technique
Securities market data has very much, however the data for usually needing to transmit and show in different application scenarios are not It is identical, such as the data needed when checking Pan Kou and checking real time data are with regard to different.However in traditional security application software In, same data transmission interface only usually can be provided, same data field, transmission are transmitted by the interface in different scenes A large amount of inessential field, that is, increase data transfer throughput, waste data bandwidth.
Summary of the invention
Aiming at the above defects or improvement requirements of the prior art, the present invention provides a kind of expansible securities market datas Displaying scheme is transmitted, the program is then to use interpretive program by defining agreement idl file, idl file is translated into correspondence The actual code of language.The translation tool, protocol fields are numbered in order;It, can be by field name when client request data The transmission enable bit of the field is set, it is determined whether needs in transmission over networks;Single precision and double-precision floating points are pressed simultaneously The precision specified in idl file is transformed into integer, then carries out inverse operation automatically in client and obtains original value;When needing to show When floating number, the source code that client can be generated according to idl file directly acquires precision, show by precision.
To achieve the above object, according to one aspect of the present invention, a kind of expansible securities market data biography is provided Defeated display methods, comprising:
Document of agreement is defined using interface description language, includes the agreement word of securities market data in the document of agreement Section;
The document of agreement is translated into the source code of preset language using translater, defines each agreement in the source code The enable bit of field, and define enable bit setting interface;
Client using enable bit setting interface to needing the protocol fields of request data to carry out enabled setting, and to Server end initiates request of data, includes the enable bit information of the protocol fields of requested data in the request of data;
Request of data described in the received server-side simultaneously obtains the enable bit information, and the enable bit information is used for institute It states server and determines that the client needs the protocol fields of request data;
The server end determines the data of client institute request protocol field according to the enable bit information, and to The client returns to the data of the protocol fields.
In the method for the present invention, by IDL document of agreement, the protocol fields of securities market data are defined, and provide function Unified request and response structure body is arranged in interface, and body transmits request enable bit in subsequent assistance with this configuration.It then can be with Using interpretive program, idl file is translated into the actual code of corresponding program language.The method of the present invention can be used in multiple terminals (including Android, iOS, Windows, Linux, wechat small routine) and it is multilingual (C, C++, Java, Javascript, ObjectC between), and the expansion field that can be convenient, and selection field transmission is arranged by enable bit.So as to subtract Few volume of transmitted data, reduces transmission bandwidth.
In one embodiment of the present of invention, the display of the floating number of each protocol fields there is also defined in the document of agreement Precision further includes having coding function and decoding functions in the source code, and the coding function is used in server end according to respectively Corresponding floating number is encoded to obtain integer by the display precision of the floating number of protocol fields according to integer mode is snapped to, institute Decoding functions are stated for returning the integer number decoder according to the display precision of the floating number of each protocol fields in client Floating number.
In the embodiment of the present invention, by defining the display precision of each field, thus in server to client transmissions data Before by floating-point encoding at integer, integer is decoded into floating number again after receiving data by client.It thus can be by most The small coding for occupying the characteristics progress securities market data such as position coding, compression, transmission, decoding subtract to reduce volume of transmitted data Few transmission bandwidth.
In one embodiment of the present of invention, the client is received and is decoded after obtaining floating number, according to the display essence Degree shows the floating number in client.
In the embodiment of the present invention, by defining the display precision of each field, when client shows respective field, according to fixed The display precision of justice is shown.So as to define different display precisions for different application scenarios, convenient for application program Follow-up maintenance and extension.
In one embodiment of the present of invention, the enable bit setting interface includes the enable bit setting of respective protocol field Function, client carry out enabled setting to respective protocol field using enable bit setting function.
In the embodiment of the present invention, function can be arranged in number when to server request data in client by enable bit According to corresponding enable bit is arranged in request, which illustrates the data field that client needs to request, thus different visitors Family end can request that different enable bits is arranged according to different data requirementss.Volume of transmitted data can either be reduced, transmission is reduced Bandwidth also facilitates the follow-up maintenance and extension of program.
In one embodiment of the present of invention, the display of the floating number of each protocol fields there is also defined in the document of agreement Precision further includes having Json coding function and Json decoding functions in the source code, and the Json coding function is for taking Corresponding floating-point encoding is converted to Json categorical data, institute according to the display precision of the floating number of each protocol fields by business device end Json decoding functions are stated for the received Json categorical data to be converted into structural body numerical value so as in client in client End display.
Json coding/decoding function is additionally provided in the embodiment of the present invention, in source code, Json type can be carried out to data The coding-decoding operation of data, so as to easily meet the needs that the web terminals such as wechat small routine are shown.
In one embodiment of the present of invention, the document of agreement defines quotation, the field that the quotation includes For one or more below: opening price, closing price, yesterday receive valence, highest price, lowest price, when present value, limit-up valence, limit down valence, at Friendship volume, exchange hand, five grades of buying price lattice, five grades buy quantity, five grades sell price or five grades are sold quantity.
It in the embodiment of the present invention, is defined for securities market data, especially for big in securities market data It measures the single precision floating datum used and double-precision floating points has carried out special optimization, reduce transmission bandwidth, the program is simply easy Understand, suitable for the various scenes for needing to carry out quotation transmission.
In one embodiment of the present of invention, enable bit is defined in the source code and obtains interface, the server end utilizes The enable bit obtains the enable bit information that interface obtains the request of data.
In the embodiment of the present invention, definition has enable bit to obtain interface in source code, to send receiving client Request of data after, can by enable bit obtain interface obtain request of data in enable bit information, so that it is determined that client Need to request the data of which field, so as to return to different numbers to different clients according to the demand of different clients According to.
It is another aspect of this invention to provide that additionally providing a kind of expansible securities market data transfer display system, packet Include client and server end, in which:
The client and server end includes source code, wherein the source code is using translater that agreement is literary Part is translated into preset language and is obtained, and the enable bit of each protocol fields is defined in the source code, and defines enable bit setting interface, The document of agreement is defined using interface description language, includes the protocol fields of securities market data in the document of agreement;
The client is used for, and is enabled using enable bit setting interface to the protocol fields for needing request data Setting, and request of data is initiated to server end, it include the enabled of the protocol fields of requested data in the request of data Position information;
The server end is used for, and is received the request of data and is obtained the enable bit information, the enable bit information Determine that the client needs the protocol fields of request data for the server;
The server end is used for, according to the data of enable bit information acquisition client institute request protocol field, and The data of the protocol fields are returned to the client.
In system provided by the present invention, by IDL document of agreement, the protocol fields of securities market data are defined, and mention Function interface has been supplied, unified request and response structure body are set, body transmits request enable bit in subsequent assistance with this configuration. Then interpretive program can be used, idl file is translated into the actual code of corresponding program language.The method of the present invention can be used in Multiple terminals (including Android, iOS, Windows, Linux, wechat small routine) and it is multilingual (C, C++, Java, Javascript, ObjectC) between, and the expansion field that can be convenient, and selection field is arranged by enable bit and is passed It is defeated.So as to reduce volume of transmitted data, transmission bandwidth is reduced.
In one embodiment of the present of invention, the display of the floating number of each protocol fields there is also defined in the document of agreement Precision further includes having coding function and decoding functions in the source code, and the coding function is used in server end according to respectively Corresponding floating number is encoded to obtain integer by the display precision of the floating number of protocol fields according to integer mode is snapped to, institute Decoding functions are stated for returning the integer number decoder according to the display precision of the floating number of each protocol fields in client Floating number.
In one embodiment of the present of invention, the client is received and is decoded after obtaining floating number, according to the display essence Degree shows the floating number in client.
In general, through the invention it is contemplated above technical scheme is compared with the prior art, have following beneficial to effect Fruit: the present invention can be used in multiple terminals (including Android, iOS, Windows, Linux, wechat small routine) and multilingual (C, C ++, Java, Javascript, ObjectC) between, according to extendible code field, may be selected field transmission, may specify precision Display, coding, compression, transmission, decoding and the display that securities market data can be carried out by characteristics such as minimum occupancy position codings.It is special It is not to have carried out special optimization for the single precision floating datum and double-precision floating points largely used in securities market data, subtracts Few transmission bandwidth.The program is easily understood, suitable for the various scenes for needing to carry out quotation transmission.
Detailed description of the invention
Fig. 1 is a kind of flow diagram of expansible securities market data transmission display methods in the embodiment of the present invention;
Fig. 2 is a kind of flow diagram of expansible securities market data processing in the embodiment of the present invention;
Fig. 3 is a kind of structural schematic diagram of expansible securities market data transfer display system in the embodiment of the present invention.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and It is not used in the restriction present invention.As long as in addition, technical characteristic involved in the various embodiments of the present invention described below Not constituting a conflict with each other can be combined with each other.
Existing quotation software, generallys use same data-interface, needs in different scenes using different fields, However identical field is but transmitted by same data-interface, to transmit a large amount of inessential fields.
To solve the above-mentioned problems, as shown in Figure 1, the present invention provides a kind of expansible securities market data transmission is aobvious Show method, visits method and use interface description language (Interface description language, IDL) document definition security The protocol fields of market data, and enable bit setting interface is defined, idl file is then translated into various programs using translater The source code of language.The enable bit of each field is defined in the source code, while defining the enable bit setting function of each field, side Just code calls the function the field is arranged whether in transmission over networks.Enable bit corresponds to the position of byte, byte each in this way It may include 8 enable bits.If including 32 fields in the data that some interface returns, and in certain scene, I only needs Use 4 fields therein.So client request when, close remaining 28 enable bit.After server-side is requested in receiving end, warp Decoding obtains enable bit, and server-side, according to the setting state of enable bit, only returns to corresponding 4 fields in returned data, from And greatly save flow.
Specifically, as shown in Figure 1, the present invention provides a kind of expansible securities market datas to transmit display methods, packet It includes:
S1, document of agreement is defined using interface description language, include the agreement of securities market data in the document of agreement Field;
IDL is the abbreviation of Interface Description Language, refers to interface description language, is CORBA specification A part, be the basis of Cross-border congestion management.IDL is a kind of computer language for description of software components interface.IDL passes through A kind of mode of neutrality describes interface, so that the object that runs in different platform and the program write with different language can be with It is in communication with each other exchange;For example, a component is write as with C++, another component is write as with Java.IDL is commonly used in far call Software.In this case, the subject component on different operating system is usually called by remote client terminal, and these are right As component may be to be write by different computer languages.IDL establishes the bridge communicated between two different operating systems.
Specifically, in embodiments of the present invention, securities market data can be described by IDL, such as is defined IDL and described language Speech:
The most common request of data that we describe one kind herein in quotation transmission, exactly obtains a collection of stock Present quotation.It can be seen that we are provided with precision to the floating number in structural body.Function interface is provided simultaneously, and setting is unified Request and response structure body, the structural body will subsequent assistance transmit request enable bit.The precision is exactly client simultaneously Display precision.
Specifically, quotation can be defined in the document of agreement, the field that the quotation includes is following One or more: opening price, closing price, yesterday receive valence, highest price, lowest price, when present value, limit-up valence, limit down valence, transaction value, Exchange hand, five grades of buying price lattice, five grades buy quantity, five grades sell price or five grades are sold quantity, it is described certainly in practical application scene Market field is not limited solely to above-mentioned listed field.In embodiments of the present invention, in agreement text in include above-mentioned generation Field shown in code.
S2, the source code that the document of agreement is translated into preset language using translater, definition is each in the source code The enable bit of protocol fields, and define enable bit setting interface;
Specifically, for idl file defined in step S1 using translater to translating, are as follows:
struct SecQuote:public Thoth::protocol::Message
{
public:
static::Thoth::protocol::FieldType I_TYPE(){return::Thoth::protocol:: FT_MESSAGE;}
SecQuote():sDtSecCode(""),sSecName(""),fClose(0),fOpen(0),fMax(0), fMin(0),fNow(0),fAmout(0)
{
}
void SetEnable_sDtSecCode(bool bEnable){xMAP.SetEnable(0,bEnable);}
void SetEnable_sSecName(bool bEnable){xMAP.SetEnable(1,bEnable);}
void SetEnable_fClose(bool bEnable){xMAP.SetEnable(2,bEnable);}
void SetEnable_fOpen(bool bEnable){xMAP.SetEnable(3,bEnable);}
void SetEnable_fMax(bool bEnable){xMAP.SetEnable(4,bEnable);}
void SetEnable_fMin(bool bEnable){xMAP.SetEnable(5,bEnable);}
void SetEnable_fNow(bool bEnable){xMAP.SetEnable(6,bEnable);}
void SetEnable_fAmout(bool bEnable){xMAP.SetEnable(7,bEnable);}
void SetEnable_vBuyp(bool bEnable){xMAP.SetEnable(8,bEnable);}
void SetEnable_vBuyv(bool bEnable){xMAP.SetEnable(9,bEnable);}
void SetEnable_vSellp(bool bEnable){xMAP.SetEnable(10,bEnable);}
void SetEnable_vSellv(bool bEnable){xMAP.SetEnable(11,bEnable);}
PMAP GetEnable(){return xMAP;}
void Encode(Thoth::protocol::BaseOutputStream&os)const
{
::Thoth::protocol::BaseOutputStream ostream(os.getBaseBuffer());
ostream.write((uint16_t)0,sDtSecCode);
ostream.write((uint16_t)1,sSecName);
ostream.write((uint16_t)2,fClose,2);
ostream.write((uint16_t)3,fOpen,2);
ostream.write((uint16_t)4,fMax,2);
ostream.write((uint16_t)5,fMin,2);
ostream.write((uint16_t)6,fNow,2);
ostream.write((uint16_t)7,fAmout,2);
ostream.write((uint16_t)8,vBuyp,2);
ostream.write((uint16_t)9,vBuyv,2);
ostream.write((uint16_t)10,vSellp,2);
ostream.write((uint16_t)11,vSellv,2);
}
void Decode(Thoth::protocol::BaseInputStream&is)
{
::Thoth::protocol::BaseInputStream istream(is.getBaseBuffer());
istream.read((uint16_t)0,sDtSecCode);
istream.read((uint16_t)1,sSecName);
istream.read((uint16_t)2,fClose,2);
istream.read((uint16_t)3,fOpen,2);
istream.read((uint16_t)4,fMax,2);
istream.read((uint16_t)5,fMin,2);
istream.read((uint16_t)6,fNow,2);
istream.read((uint16_t)7,fAmout,2);
istream.read((uint16_t)8,vBuyp,2);
istream.read((uint16_t)9,vBuyv,2);
istream.read((uint16_t)10,vSellp,2);
istream.read((uint16_t)11,vSellv,2);
}
JsonValue EncodeToJson()const
{
JsonValue xJsonValue;
XJsonValue [" sDtSecCode "]=JsonValue::Write (sDtSecCode);
XJsonValue [" sSecName "]=JsonValue::Write (sSecName);
XJsonValue [" fClose "]=JsonValue::Write (fClose, 2);
XJsonValue [" fOpen "]=JsonValue::Write (fOpen, 2);
XJsonValue [" fMax "]=JsonValue::Write (fMax, 2);
XJsonValue [" fMin "]=JsonValue::Write (fMin, 2);
XJsonValue [" fNow "]=JsonValue::Write (fNow, 2);
XJsonValue [" fAmout "]=JsonValue::Write (fAmout, 2);
XJsonValue [" vBuyp "]=JsonValue::Write (vBuyp, 2);
XJsonValue [" vBuyv "]=JsonValue::Write (vBuyv, 2);
XJsonValue [" vSellp "]=JsonValue::Write (vSellp, 2);
XJsonValue [" vSellv "]=JsonValue::Write (vSellv, 2);
return xJsonValue;
}
void DecodeFromJson(const JsonValue&xJsonValue)const
{
xJsonValue.Read(sDtSecCode,2);
xJsonValue.Read(sSecName,2);
xJsonValue.Read(fClose,2);
xJsonValue.Read(fOpen,2);
xJsonValue.Read(fMax,2);
xJsonValue.Read(fMin,2);
xJsonValue.Read(fNow,2);
xJsonValue.Read(fAmout,2);
xJsonValue.Read(vBuyp,2);
xJsonValue.Read(vBuyv,2);
xJsonValue.Read(vSellp,2);
xJsonValue.Read(vSellv,2);
}
public:
PMAP xMAP;
std::string sDtSecCode;
std::string sSecName;
float fClose;
float fOpen;
float fMax;
float fMin;
float fNow;
float fAmout;
vector<float>vBuyp;
vector<float>vBuyv;
vector<float>vSellp;
vector<float>vSellv;
};
In above-mentioned example, the idl file of definition is translated into the source code of C Plus Plus by we, in the c++ file of generation In, we define such as lower interface:
Interface is arranged in enable bit, and the field is arranged whether in network transmission in such as SetEnable_sDtSecCode;
Enable bit obtains interface, and GetEnable obtains the enable bit of total body;
Coding function, Encode, to other ports such as floating number according to snapping to integer mode encoding and decoding;
Decoding functions, Decode carry out inverse operation to floating number and obtain original value;
Json coding, EncodeToJson convert field according to floating number precision, the web terminals such as small routine are facilitated to show;
Json decoding, DecodeFromJson are converted into structural body numerical value from Json categorical data;
From above-mentioned code as it can be seen that enable bit setting interface includes the enable bit setting function of respective protocol field, Client carries out enabled setting to respective protocol field using enable bit setting function.
Meanwhile also definition has enable bit to obtain interface in the source code, the server end utilizes the enable bit Obtain the enable bit information that interface obtains the request of data.
S3, client using enable bit setting interface to needing the protocol fields of request data to carry out enabled setting, And request of data is initiated to server end, it include the enable bit letter of the protocol fields of requested data in the request of data Breath;
Specifically, when client is needed to server request data, request is defined by translater and influences structural body, To which enable bit be arranged.Specifically:
struct QuoteReq:public Thoth::protocol::Message,public Thoth:: protocol::Request
{
public:
QuoteReq()
{
}
void SetRequestPMAP(const PMAP&xPMAP){xMAP.SetRequestPMAP(xPMAP);}
void Encode(Thoth::protocol::BaseOutputStream&os)const
{
::Thoth::protocol::BaseOutputStream ostream(os.getBaseBuffer());
ostream.SetRequestPMAP(xMAP);
ostream.Write((uint16_t)0,vDtSecCode);
}
void Decode(Thoth::protocol::BaseInputStream&is)
{
::Thoth::protocol::BaseInputStream istream(is.getBaseBuffer());
istream.GetRequestPMAP(xMAP);
istream.Read((uint16_t)0,vDtSecCode);
}
public:
PMAP xMAP;
std::vector<std::string>vDtSecCode;
};
struct QuoteRsp:public Thoth::protocol::Message,public Thoth:: protocol::Response{
public:
QuoteRsp()
{
}
void Encode(Thoth::protocol::BaseOutputStream&os)const
{
::Thoth::protocol::BaseOutputStream ostream(os.getBaseBuffer());
ostream.Write((uint16_t)0,vQuote);
}
void Decode(Thoth::protocol::BaseInputStream&is)
{
::Thoth::protocol::BaseInputStream istream(is.getBaseBuffer());
istream.GetRequestPMAP(xMAP);
istream.Read((uint16_t)0,vQuote);
}
public:
std::vector<SecQuote>vQuote;
};
Appealing structure body is inherited in Thoth::protocol::Request, which will carry out volume solution to PMAP enable bit Code facilitates client transmitting enable bit to server-side.Client encodes enable bit by Encode function.
Request of data described in S4, the received server-side simultaneously obtains the enable bit information, and the enable bit information is used Determine that the client needs the protocol fields of request data in the server;
After received server-side to the request of data of client, server-side is obtained from network parameter by Decode function Get PMAP.The enable bit that function GetEnable obtains total body is obtained by enable bit, the enable bit identifies institute State the protocol fields that client needs request data.When data are transmitted, configured transmission is determined according to enable bit.
S5, the server end determine the data of client institute request protocol field according to the enable bit information, And the data of the protocol fields are returned to the client.
The requested data of the client are returned to the client by server end.
Further, in existing quotation software, the data transmission of single precision and double precision is fixed to use 4 bytes With 8 bytes, flow is wasted very much for fractional value floating number.Specifically, in quotation, such as opening price, closing price, Yesterday receives valence, highest price, lowest price, limit-up valence, limit down valence, exchange hand etc. field, is floating point type.But floating number is in network It is fixed to generally require 1 or 2 byte transmission i.e. but if transmitting using integer using 4 bytes or 8 bytes when transmission It can.So server-side is before transmitting the data, and according to the precision specified in agreement, such as numerical value: 12.88, precision: 2, it is converted into Integer 1288, the original number for needing 8 directly to transmit only need 2 bytes now.The coding/decoding function of server-side is automatic After conversion, it is sent to client.Number is automatically converted to 12.88, is restored by client according to specified precision.
To achieve the goals above, as shown in the embodiment in step S1 and S2, the method for the present invention is in the document of agreement In there is also defined each protocol fields floating number display precision, further include having coding function and decoding letter in the source code Number, the coding function be used for server end according to the display precision of the floating number of each protocol fields by corresponding floating number according to It snaps to integer mode to be encoded to obtain integer, the decoding functions are used in client according to each protocol fields The integer number decoder is returned floating number by the display precision of floating number.
In addition it can which Json coding/decoding function is arranged, field can be converted according to floating number precision, facilitate small routine etc. Web terminal is shown.Specifically, to achieve the goals above, the method for the present invention there is also defined each agreement word in the document of agreement The display precision of the floating number of section further includes having Json coding function and Json decoding functions in the source code, the Json Coding function is for converting corresponding floating-point encoding according to the display precision of the floating number of each protocol fields in server end To Json categorical data, the Json decoding functions are used to that the received Json categorical data to be converted into structure in client Body numerical value in client to show.
Further, in existing security software, client floating number display precision is unfavorable for subsequent by making an appointment Extension.To solve the above-mentioned problems, the method for the present invention is shown when showing quotation according to the precision of each field Show, client can call precision to obtain function and obtain the display precision of each field directly from the translated document of IDL at this time, To be shown in client.Specifically, the method for the present invention further include:
S6, the client are received and are decoded after obtaining floating number, shown according to the display precision in client described in Floating number.
Further, as shown in Fig. 2, the process for expansible securities market data processing a kind of in the embodiment of the present invention is shown It is intended to, defines idl file first, define the protocol fields for having securities market data and corresponding display precision in idl file, Then idl file is translated by interpretive program the source file of corresponding language, and realize enable bit handling function, user is in visitor Enable bit is arranged by enable bit handling function in the end of family, and carries out enable bit coding, so that appealing structure body is generated, the request Structural body is decoded appealing structure body by network data transmission to server end, server end, and carries out to enable bit Decoding, to read the initial data of respective field according to enable bit, server end carries out conversion life to floating number according to precision At integer, coding is carried out then to send the data to client.
Further, as shown in figure 3, the present invention also provides a kind of expansible securities market data transmission display systems System, including client and server end, in which:
The client and server end includes source code, wherein the source code is using translater that agreement is literary Part is translated into preset language and is obtained, and the enable bit of each protocol fields is defined in the source code, and defines enable bit setting interface, The document of agreement is defined using interface description language, includes the protocol fields of securities market data in the document of agreement;
The client is used for, and is enabled using enable bit setting interface to the protocol fields for needing request data Setting, and request of data is initiated to server end, it include the enabled of the protocol fields of requested data in the request of data Position information;
The server end is used for, and is received the request of data and is obtained the enable bit information, the enable bit information Determine that the client needs the protocol fields of request data for the server;
The server end is used for, according to the data of enable bit information acquisition client institute request protocol field, and The data of the protocol fields are returned to the client.
Further, the display precision of the floating number of each protocol fields, the source be there is also defined in the document of agreement It further include having coding function and decoding functions in code, the coding function is used in server end according to the floating of each protocol fields Corresponding floating number is encoded to obtain integer by the display precision of points according to integer mode is snapped to, and the decoding functions are used In the integer number decoder is returned floating number according to the display precision of the floating number of each protocol fields in client.
Further, the client is received and is decoded after obtaining floating number, aobvious in client according to the display precision Show the floating number.
As it will be easily appreciated by one skilled in the art that the foregoing is merely illustrative of the preferred embodiments of the present invention, not to The limitation present invention, any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should all include Within protection scope of the present invention.

Claims (10)

1. a kind of expansible securities market data transmits display methods characterized by comprising
Document of agreement is defined using interface description language, includes the protocol fields of securities market data in the document of agreement;
The document of agreement is translated into the source code of preset language using translater, defines each protocol fields in the source code Enable bit, and define enable bit setting interface;
Client using enable bit setting interface to needing the protocol fields of request data to carry out enabled setting, and to service Request of data is initiated at device end, includes the enable bit information of the protocol fields of requested data in the request of data;
Request of data described in the received server-side simultaneously obtains the enable bit information, and the enable bit information is used for the clothes Business device determines that the client needs the protocol fields of request data;
The server end determines the data of client institute request protocol field according to the enable bit information, and to described Client returns to the data of the protocol fields.
2. expansible securities market data as described in claim 1 transmits display methods, which is characterized in that in the agreement It there is also defined the display precision of the floating number of each protocol fields in file, further include having coding function and decoding in the source code Function, the coding function is for pressing corresponding floating number according to the display precision of the floating number of each protocol fields in server end It is encoded to obtain integer according to integer mode is snapped to, the decoding functions are used in client according to each protocol fields Floating number display precision by the integer number decoder return floating number.
3. expansible securities market data as claimed in claim 2 transmits display methods, which is characterized in that the client It receives and decodes after obtaining floating number, the floating number is shown in client according to the display precision.
4. expansible securities market data as claimed in claim 1 or 2 transmits display methods, which is characterized in that described to make Setting interface in energy position includes the enable bit setting function of respective protocol field, and function pair is arranged using the enable bit in client Respective protocol field carries out enabled setting.
5. expansible securities market data as described in claim 1 transmits display methods, which is characterized in that in the agreement There is also defined the display precision of the floating number of each protocol fields in file, further include in the source code have Json coding function and Json decoding functions, the Json coding function is used for will according to the display precision of the floating number of each protocol fields in server end Corresponding floating-point encoding is converted to Json categorical data, and the Json decoding functions are used for will be received described in client Json categorical data is converted into structural body numerical value to show in client.
6. expansible securities market data as claimed in claim 1 or 2 transmits display methods, which is characterized in that the association Document definition quotation is discussed, the field that the quotation includes is one or more below: opening price, closing price, yesterday Receipts valence, highest price, lowest price, when present value, limit-up valence, limit down valence, transaction value, exchange hand, five grades of buying price lattice, five grades buy quantity, Five grades are sold price or five grades are sold quantity.
7. expansible securities market data as claimed in claim 1 or 2 transmits display methods, which is characterized in that the source Enable bit is defined in code and obtains interface, and the server end obtains interface using the enable bit and obtains the request of data Enable bit information.
8. a kind of expansible securities market data transfer display system, which is characterized in that including client and server end, In:
The client and server end includes source code, wherein the source code is to be turned over document of agreement using translater It is translated into preset language to obtain, the enable bit of each protocol fields is defined in the source code, and define enable bit setting interface, it is described Document of agreement is defined using interface description language, includes the protocol fields of securities market data in the document of agreement;
The client is used for, using enable bit setting interface to needing the protocol fields of request data to carry out enabled set It sets, and initiates request of data to server end, include the enable bit of the protocol fields of requested data in the request of data Information;
The server end is used for, and is received the request of data and is obtained the enable bit information, the enable bit information is used for The server determines that the client needs the protocol fields of request data;
The server end is used for, according to the data of enable bit information acquisition client institute request protocol field, and to institute State the data that client returns to the protocol fields.
9. expansible securities market data transfer display system as claimed in claim 8, which is characterized in that in the agreement It there is also defined the display precision of the floating number of each protocol fields in file, further include having coding function and decoding in the source code Function, the coding function is for pressing corresponding floating number according to the display precision of the floating number of each protocol fields in server end It is encoded to obtain integer according to integer mode is snapped to, the decoding functions are used in client according to each protocol fields Floating number display precision by the integer number decoder return floating number.
10. expansible securities market data transfer display system as claimed in claim 8 or 9, which is characterized in that the visitor Family end receives and decodes after obtaining floating number, shows the floating number in client according to the display precision.
CN201810756706.9A 2018-07-11 2018-07-11 Extensible securities market data transmission display method and system Active CN109062574B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810756706.9A CN109062574B (en) 2018-07-11 2018-07-11 Extensible securities market data transmission display method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810756706.9A CN109062574B (en) 2018-07-11 2018-07-11 Extensible securities market data transmission display method and system

Publications (2)

Publication Number Publication Date
CN109062574A true CN109062574A (en) 2018-12-21
CN109062574B CN109062574B (en) 2022-02-18

Family

ID=64815891

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810756706.9A Active CN109062574B (en) 2018-07-11 2018-07-11 Extensible securities market data transmission display method and system

Country Status (1)

Country Link
CN (1) CN109062574B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111104776A (en) * 2019-12-23 2020-05-05 苏州思必驰信息科技有限公司 Floating point number processing method and device and electronic equipment
CN112291041A (en) * 2020-10-22 2021-01-29 山东云海国创云计算装备产业创新中心有限公司 Data decoding device and method based on FPGA
CN112583878A (en) * 2019-09-30 2021-03-30 北京百度网讯科技有限公司 Vehicle information checking method, device, equipment and medium
CN114124878A (en) * 2022-01-27 2022-03-01 深圳华锐金融技术股份有限公司 Market data issuing method, device, system, equipment and medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101267281A (en) * 2008-04-25 2008-09-17 北京中企开源信息技术有限公司 A transmission method and system for securities market data
CN103297186A (en) * 2012-02-29 2013-09-11 富士通株式会社 Data transmission apparatus, data transmission system and data transmission method
CN103812878A (en) * 2014-03-17 2014-05-21 哈尔滨理工大学 Android-based road condition information interaction system
WO2014100725A1 (en) * 2012-12-21 2014-06-26 Micronics, Inc. Portable fluorescence detection system and microassay cartridge
CN105373556A (en) * 2014-08-26 2016-03-02 凌群电脑股份有限公司 Quick data acquisition method with high transmission property and correctness
CN106502932A (en) * 2016-09-20 2017-03-15 中国科学院自动化研究所 The method of interconnecting interface and its write operation and read operation between the piece based on hierarchy
CN107301098A (en) * 2017-06-15 2017-10-27 搜易贷(北京)金融信息服务有限公司 A kind of remote procedure call device based on Thrift agreements, method and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101267281A (en) * 2008-04-25 2008-09-17 北京中企开源信息技术有限公司 A transmission method and system for securities market data
CN103297186A (en) * 2012-02-29 2013-09-11 富士通株式会社 Data transmission apparatus, data transmission system and data transmission method
WO2014100725A1 (en) * 2012-12-21 2014-06-26 Micronics, Inc. Portable fluorescence detection system and microassay cartridge
CN103812878A (en) * 2014-03-17 2014-05-21 哈尔滨理工大学 Android-based road condition information interaction system
CN105373556A (en) * 2014-08-26 2016-03-02 凌群电脑股份有限公司 Quick data acquisition method with high transmission property and correctness
CN106502932A (en) * 2016-09-20 2017-03-15 中国科学院自动化研究所 The method of interconnecting interface and its write operation and read operation between the piece based on hierarchy
CN107301098A (en) * 2017-06-15 2017-10-27 搜易贷(北京)金融信息服务有限公司 A kind of remote procedure call device based on Thrift agreements, method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
KIVEN_ANDROID: "性能优化二十之数据传输效率优化-FlatBuffers", 《HTTPS://BLOG.CSDN.NET/HPC19950723/ARTICLE/DETAILS/70834926》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112583878A (en) * 2019-09-30 2021-03-30 北京百度网讯科技有限公司 Vehicle information checking method, device, equipment and medium
CN112583878B (en) * 2019-09-30 2023-03-14 阿波罗智能技术(北京)有限公司 Vehicle information checking method, device, equipment and medium
CN111104776A (en) * 2019-12-23 2020-05-05 苏州思必驰信息科技有限公司 Floating point number processing method and device and electronic equipment
CN112291041A (en) * 2020-10-22 2021-01-29 山东云海国创云计算装备产业创新中心有限公司 Data decoding device and method based on FPGA
CN112291041B (en) * 2020-10-22 2022-05-27 山东云海国创云计算装备产业创新中心有限公司 Data decoding device and method based on FPGA
CN114124878A (en) * 2022-01-27 2022-03-01 深圳华锐金融技术股份有限公司 Market data issuing method, device, system, equipment and medium
CN114124878B (en) * 2022-01-27 2022-04-22 深圳华锐金融技术股份有限公司 Market data issuing method, device, system, equipment and medium

Also Published As

Publication number Publication date
CN109062574B (en) 2022-02-18

Similar Documents

Publication Publication Date Title
CN109062574A (en) A kind of expansible securities market data transmission display methods and system
US8010889B2 (en) Techniques for efficient loading of binary XML data
CN110417783B (en) Data transmission method and device based on Internet of things, storage medium and terminal
EP2352269B1 (en) Service access method and system
CN108616606B (en) Internet of things communication method and device
CN113489805B (en) Butt joint method, device, equipment and storage medium of cloud desktop system
WO2003055141A3 (en) Method for transmitting objects between a server and a client terminal using cache management
CN111865493A (en) Data processing method and related equipment
CN109309599A (en) A method of the communication of internet of things equipment high concurrent is realized based on street lamp hardware platform
US20100211867A1 (en) Processing module, a device, and a method for processing of xml data
CN114338827A (en) Internet of things protocol adaptation gateway, method and readable storage medium
Sapozhnykov et al. A low-rate data transfer technique for compressed voice channels
CN111104776A (en) Floating point number processing method and device and electronic equipment
CN108876628A (en) Financial quantitative analysis data transmission method
CN109150977A (en) The method for automatically generating global serial number based on trade link
CN114492316A (en) Data exchange coding and decoding method and system
WO2022063058A1 (en) Netconf protocol-based transmission method, device and storage medium
CN106790201B (en) A kind of method and apparatus for transmitting data
CN114244912B (en) Data transmission method, device, computer equipment and storage medium
CN113992641A (en) Data processing method, device, equipment and storage medium
CN112367294A (en) Network communication method between multiple hosts adapting to edge computing architecture
US7132962B1 (en) Methods and apparatuses for character conversion control
US11363101B2 (en) Using existing servers in a wellbore environment as data sources for streaming servers
CN102891837B (en) Message conversion processing method, bridging device and communication system
CN117336380B (en) Network communication system, method, apparatus and medium for communication

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
CB03 Change of inventor or designer information

Inventor after: Zhu Liufeng

Inventor after: Tian Shuning

Inventor after: Rong Qiang

Inventor before: Tian Shuning

Inventor before: Zhu Liufeng

Inventor before: Rong Qiang

CB03 Change of inventor or designer information
TR01 Transfer of patent right

Effective date of registration: 20240318

Address after: 430000 Taizhong Avenue, Gaoqiao Industrial Park, Taiwan investment zone, Dongxihu District, Wuhan City, Hubei Province

Patentee after: Lighthouse Technology Co.,Ltd.

Country or region after: China

Address before: Room 08, 15 / F, building 2, phase I, modern international design city, 41 Guanggu Avenue, Donghu New Technology Development Zone, Wuhan City, Hubei Province, 430000

Patentee before: WUHAN DENGTA ZHIGUANG TECHNOLOGY Co.,Ltd.

Country or region before: China

TR01 Transfer of patent right