CN107231347B - A kind of method and system of data streaming services - Google Patents
A kind of method and system of data streaming services Download PDFInfo
- Publication number
- CN107231347B CN107231347B CN201710310725.4A CN201710310725A CN107231347B CN 107231347 B CN107231347 B CN 107231347B CN 201710310725 A CN201710310725 A CN 201710310725A CN 107231347 B CN107231347 B CN 107231347B
- Authority
- CN
- China
- Prior art keywords
- service
- parameter
- sds
- type
- primitive
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 47
- 230000004044 response Effects 0.000 claims description 16
- 241000208340 Araliaceae Species 0.000 claims description 12
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 claims description 12
- 235000003140 Panax quinquefolius Nutrition 0.000 claims description 12
- 235000008434 ginseng Nutrition 0.000 claims description 12
- 230000005540 biological transmission Effects 0.000 claims description 8
- 238000004458 analytical method Methods 0.000 claims description 7
- 239000000203 mixture Substances 0.000 claims description 3
- 230000003993 interaction Effects 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 8
- 238000004590 computer program Methods 0.000 description 7
- 238000012545 processing Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 101150093826 par1 gene Proteins 0.000 description 2
- 101100406879 Neurospora crassa (strain ATCC 24698 / 74-OR23-1A / CBS 708.71 / DSM 1257 / FGSC 987) par-2 gene Proteins 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/03—Protocol definition or specification
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/06—Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]
Abstract
The present invention relates to a kind of method and system of data streaming services.Firstly, defining the format of server data stream: SDS type+SDS corresponding with service primitive+SDS parameter;Then, according to service request service primitive, service parameter is encoded into server data stream;Finally, receiving end receives server data stream, server data stream need to be decoded, to obtain service parameter.The present invention be " generic service agreement " standard described in data flow exchange method invented one kind can concrete methods of realizing and system, solve the problems, such as that the standard does not solve specifically to be previously mentioned in the standard to pass through data streaming services;The present invention can also solve to need to carry out the whole interaction of multinomial complex data progress or expression problem.
Description
Technical field
The invention belongs to technical field of electric power automation, and it is double to be related to information exchange of service-oriented (SOA) structure system etc.
Side needs to carry out the information exchange occasion of complex data exchange, specially a kind of method and system of data streaming services.
Background technique
With the development of computer and network technology, the intelligent level of power grid and requirement are constantly promoted, and traditional is directed to
Communication protocol designed by the certain specific applications of electric system and information exchange mechanism have been unable to meet needs, need constantly be
These agreements make off-gauge expansion, cause system that cannot interoperate, and are handed over using the information of service-oriented (SOA) structure system
Mutual mechanism has become a developing direction, and China has issued " electric system simple services interface specification " (DL/T thus
1233) it lays a good foundation for this development, " electric system generic service agreement " standard to be released and to solve this problem
Solution is proposed, but " electric system generic service agreement " does not have the specific solution party that service transmission is realized by data flow
Case.The present invention proposes on the basis of " electric system generic service agreement " to the problem of how realizing service transmission by data flow
Solution.
Summary of the invention
It solves " generic service agreement " standard the purpose of the present invention is to provide one kind not solve specifically in the standard
It is previously mentioned the method and system of the data streaming services for the problem of passing through data streaming services.
To achieve the above object, it the technical scheme is that a kind of method of data streaming services, including walks as follows
Suddenly,
S1, the format for defining server data stream: SDS type+SDS corresponding with service primitive+SDS parameter;
S2, foundation service request service primitive, are encoded into server data stream for service parameter, it may be assumed that first, it is determined that needing to be formed
Service data stream type;Then, service request service primitive corresponding with service data stream type is obtained;Again and, according to need
The service data stream type of formation carries out assignment to SDS type;Then, SDS is written into the Service name of service request service primitive
In corresponding with service primitive;Finally, type and sequence according to service request parameter in service request service primitive, query service ginseng
Number encoder table, and according to the coding method found, it is written in SDS parameter after corresponding service request parameter is encoded,
Form server data stream;
S3, receiving end receive server data stream, need to decode server data stream, to obtain service parameter, it may be assumed that firstly, solution
Server data stream first byte is analysed, the SDS type of server data stream is obtained;Then, by STRING type format analysis service data
Stream obtains the Service name of service request service primitive, and then obtains service request service primitive;Finally, according to SDS type, clothes
Business request service primitive parses server data stream, obtains corresponding service parameter.
In an embodiment of the present invention, the service parameter coding schedule includes basic parameter type coding table and combination parameter
Type coding table, wherein basic parameter type coding table is by basic parameter type, the corresponding coding method of basic parameter type
And account for the byte number composition of data flow;Combination parameter type coding table is corresponding by combination parameter type, the combination parameter type
Coding method and account for data flow byte number constitute.
In an embodiment of the present invention, the length of the SDS type is a byte;The length of SDS corresponding with service primitive
Variable, format is STRING type;SDS parameter includes multistage, the number of section by parameter in service request service primitive
Number determines that each section of format is determined by the type of parameters in service request service primitive.
In an embodiment of the present invention, the SDS type value includes I, D, O, wherein I indicates IN parameter, is client
To service extreme direction;O indicate OUT parameter, be server-side to client-side to;D indicates no IN, the data block of OUT parameter mark.
In an embodiment of the present invention, the number of the section of the SDS parameter determines in the following way:
If SDS type value is I, the number of the section of SDS parameter is that the ginseng of IN is identified as in service request service primitive
Several numbers;
If SDS type value is O, the number of the section of SDS parameter is that the ginseng of OUT is identified as in service request service primitive
Several numbers;
If SDS type value is D, the number of the section of SDS parameter is of all parameters in service request service primitive
Number.
In an embodiment of the present invention, it in the step S2, if client sends out service request to server-side, that is, needs to be formed
When service data stream, the concrete mode that service parameter is encoded into server data stream is as follows:
1) the corresponding service request service primitive of service data stream is obtained;
It 2) is I by SDS type assignment;
3) by the Service name of service request service primitive, by STRING type format write-in SDS corresponding with service primitive;
4) query service parameter coding table will successively be identified as the correspondence parameter of IN in service request service primitive, write-in
In SDS parameter, until in all parameters for being identified as IN all write-in SDS parameter.
In an embodiment of the present invention, it in the step S2, if server-side sends out service response to client, that is, needs to be formed
When service response data flow, the concrete mode that service parameter is encoded into server data stream is as follows:
1) the corresponding service request service primitive of service response data flow is obtained;
It 2) is O by SDS type assignment;
3) by the Service name of service request service primitive, by STRING type format write-in SDS corresponding with service primitive;
4) query service parameter coding table will successively be identified as the correspondence parameter of OUT in service request service primitive, write-in
In SDS parameter, until in all parameters for being identified as OUT all write-in SDS parameter.
In an embodiment of the present invention, in the step S2, if complex data transmission need to be formed in use, by service parameter
The concrete mode for being encoded into server data stream is as follows:
1) the corresponding service request service primitive of service response data flow is obtained;
It 2) is D by SDS type assignment;
3) by the Service name of service request service primitive, by STRING type format write-in SDS corresponding with service primitive;
4) query service parameter coding table is written in SDS parameter successively by parameter in service request service primitive.
The present invention also provides a kind of systems of data streaming services, comprising:
Server data stream definition unit, for defining the format of server data stream, the format of server data stream: SDS type+
SDS corresponding with service primitive+SDS parameter;
Service parameter coding unit, according to clothes defined in service request service primitive and server data stream definition unit
Business data stream format, is encoded into server data stream for service parameter, specifically i.e.: first, it is determined that the server data stream class that need to be formed
Type;Then, service request service primitive corresponding with service data stream type is obtained;Again and, according to the service data that need to be formed
Stream type carries out assignment to SDS type;It then, will be in the Service name write-in SDS corresponding with service primitive of service request service primitive;
Finally, query service parameter coding table, foundation service request service primitive, SDS type will be corresponding in service parameter coding schedule
Parameter is written in SDS parameter, forms server data stream;
Server data stream decoding unit, server data stream is decoded, to obtain service parameter, specifically i.e.: firstly, parsing clothes
Business data flow first byte, obtains the SDS type of server data stream;Then, it by STRING type format analysis service data flow, obtains
The Service name of service request service primitive is taken, and then obtains service request service primitive;Finally, according to SDS type, service request
Service primitive parses server data stream, obtains corresponding service parameter.
In an embodiment of the present invention, the length of the SDS type is a byte;The length of SDS corresponding with service primitive
Variable, format is STRING type;SDS parameter includes multistage, the number of section by parameter in service request service primitive
Number determines that each section of format is determined by the type of parameters in service request service primitive.
In an embodiment of the present invention, the SDS type value includes I, D, O, wherein I indicates IN parameter, is client
To service extreme direction;O indicate OUT parameter, be server-side to client-side to;D indicates no IN, the data block of OUT parameter mark;
The number of the section of the SDS parameter determines in the following way:
If SDS type value is I, the number of the section of SDS parameter is that the ginseng of IN is identified as in service request service primitive
Several numbers;
If SDS type value is O, the number of the section of SDS parameter is that the ginseng of OUT is identified as in service request service primitive
Several numbers;
If SDS type value is D, the number of the section of SDS parameter is of all parameters in service request service primitive
Number.
Compared to the prior art, the invention has the following advantages: the present invention is " electric system generic service agreement "
Data flow exchange method described in standard invented one kind can concrete methods of realizing, solve the standard without specifically solve should
The problem of passing through data streaming services is previously mentioned in standard;The present invention can also solve to need to carry out multinomial complex data carry out it is whole
Body interaction or expression problem.
Detailed description of the invention
Fig. 1 is the conversion method schematic diagram of the invention by service describing primitive to SDS.
Specific embodiment
With reference to the accompanying drawing, technical solution of the present invention is specifically described.
As shown in Figure 1, a kind of data flow forming method for being used for transmission service of the invention, includes the following steps,
S1, the format for defining server data stream: SDS type+SDS corresponding with service primitive+SDS parameter, wherein SDS type
Length be a byte;The length of SDS corresponding with service primitive is variable, and format is STRING type;SDS parameter includes more
Section, the number of section are determined that each section of format is by service request service primitive by the number of parameter in service request service primitive
The type of middle parameters determines.
S2, foundation service request service primitive, are encoded into server data stream for service parameter, it may be assumed that first, it is determined that needing to be formed
Service data stream type;Then, service request service primitive (service request service corresponding with service data stream type is obtained
Primitive is stored in service management center, and transmitting terminal, receiving end can transfer corresponding service request clothes by service management center
Business primitive);And, assignment is carried out to SDS type according to the service data stream type that need to be formed again;Then, service request is serviced
In the Service name write-in SDS corresponding with service primitive of primitive;Finally, the class according to service request parameter in service request service primitive
Type and sequence, query service parameter coding table, and according to the coding method found, corresponding service request parameter is compiled
It is written in SDS parameter after code, forms server data stream;
S3, receiving end receive server data stream, need to decode server data stream, to obtain service parameter, it may be assumed that firstly, solution
Server data stream first byte is analysed, the SDS type of server data stream is obtained;Then, by STRING type format analysis service data
Stream obtains the Service name of service request service primitive, and then obtains service request service primitive;Finally, according to SDS type, clothes
Business request service primitive parses server data stream, obtains corresponding service parameter.
In the above process, in the case where communicating pair uses and makes an appointment transport-type and service request service primitive,
Data flow can simplify " SDS type+SDS corresponding with service primitive " part, is transmitted and is serviced using pure " SDS parameter " form;I.e.
It is equivalent to and thinks that " SDS type+SDS corresponding with service primitive " is known;
In an embodiment of the present invention, the service parameter coding schedule includes basic parameter type coding table and combination parameter
Type coding table, wherein basic parameter type coding table is by basic parameter type, the corresponding coding method of basic parameter type
And account for the byte number composition of data flow;Combination parameter type coding table is corresponding by combination parameter type, the combination parameter type
Coding method and account for data flow byte number constitute;Combination parameter type is the parameter type for being not belonging to basic parameter type
(specific table example can be found in table 2, table 3, wherein table 2 is basic parameter type coding table, and table 3 is combination parameter type coding
Table).
The SDS type value includes I, D, O, wherein I indicates IN parameter, for client to service extreme direction;O is indicated
OUT parameter, be server-side to client-side to;D indicates no IN, the data block of OUT parameter mark;The section of the SDS parameter
Number determines in the following way:
If SDS type value is I, the number of the section of SDS parameter is that the ginseng of IN is identified as in service request service primitive
Several numbers;
If SDS type value is O, the number of the section of SDS parameter is that the ginseng of OUT is identified as in service request service primitive
Several numbers;
If SDS type value is D, the number of the section of SDS parameter is of all parameters in service request service primitive
Number.
It, i.e., will when need to form service data stream if client sends out service request to server-side in the step S2
The concrete mode that service parameter is encoded into server data stream is as follows:
1) the corresponding service request service primitive of service data stream is obtained;
It 2) is I by SDS type assignment;
3) by the Service name of service request service primitive, by STRING type format write-in SDS corresponding with service primitive;
4) it will successively be identified as the correspondence parameter of IN in service request service primitive, be written in SDS parameter, until all marks
Know the parameter for being IN to be all written in SDS parameter.
It, i.e., will when need to form service response data flow if server-side sends out service response to client in the step S2
The concrete mode that service parameter is encoded into server data stream is as follows:
1) the corresponding service request service primitive of service response data flow is obtained;
It 2) is O by SDS type assignment;
3) by the Service name of service request service primitive, by STRING type format write-in SDS corresponding with service primitive;
4) it will successively be identified as the correspondence parameter of OUT in service request service primitive, be written in SDS parameter, until all
The parameter for being identified as OUT is all written in SDS parameter.
In the step S2, if complex data transmission need to be formed in use, service parameter is encoded into server data stream
Concrete mode is as follows:
1) the corresponding service request service primitive of service response data flow is obtained;
It 2) is D by SDS type assignment;
3) by the Service name of service request service primitive, by STRING type format write-in SDS corresponding with service primitive;
4) successively parameter in service request service primitive is written in SDS parameter.
The present invention also provides a kind of systems of data streaming services, comprising:
Server data stream definition unit, for defining the format of server data stream, the format of server data stream: SDS type+
SDS corresponding with service primitive+SDS parameter;
Service parameter coding unit, according to clothes defined in service request service primitive and server data stream definition unit
Business data stream format, is encoded into server data stream for service parameter, specifically i.e.: first, it is determined that the server data stream class that need to be formed
Type;Then, service request service primitive corresponding with service data stream type is obtained;Again and, according to the service data that need to be formed
Stream type carries out assignment to SDS type;It then, will be in the Service name write-in SDS corresponding with service primitive of service request service primitive;
Finally, query service parameter coding table, foundation service request service primitive, SDS type will be corresponding in service parameter coding schedule
Parameter is written in SDS parameter, forms server data stream;
Server data stream decoding unit, server data stream is decoded, to obtain service parameter, specifically i.e.: firstly, parsing clothes
Business data flow first byte, obtains the SDS type of server data stream;Then, it by STRING type format analysis service data flow, obtains
Take the Service name of service request service primitive;Finally, being parsed according to SDS type assignment to server data stream, obtain corresponding
Parameter.
The length of the SDS type is a byte;The length of SDS corresponding with service primitive is variable, format STRING
Type;SDS parameter includes multistage, and the number of section is determined by the number of parameter in service request service primitive, each section of format
It is determined by the type of parameters in service request service primitive.
The SDS type value includes I, D, O, wherein I indicates IN parameter, for client to service extreme direction;O is indicated
OUT parameter, be server-side to client-side to;D indicates no IN, the data block of OUT parameter mark;The section of the SDS parameter
Number determines in the following way:
If SDS type value is I, the number of the section of SDS parameter is that the ginseng of IN is identified as in service request service primitive
Several numbers;
If SDS type value is O, the number of the section of SDS parameter is that the ginseng of OUT is identified as in service request service primitive
Several numbers;
If SDS type value is D, the number of the section of SDS parameter is of all parameters in service request service primitive
Number.
The solution of the present invention is described in detail below.
The invention proposes DL/T 1233(" electric system simple services interface specification ") (referred to as: S language) description
Abstract service interface primitive, the method for being transformed into data flow.Summary of the invention includes data flow (the Service Data of service
Stream, abbreviation SDS) format and according to service S language primitive, parameter coding formed SDS method.Solves " power train
System generic service agreement " it does not solve the problems, such as specifically to be previously mentioned in the standard to pass through data streaming services.
1) server data stream (SDS) format
SDS format is as shown in table 1, is described as follows:
Data flow (SDS) format that table 1 services
S | ServiceName | Par-1 | Par-2 | …… | Par-n |
(1) SDS type: S sections, one byte ASCII character of length, meaning is as follows:
A) S=" I ": indicating IN parameter, for client to service extreme direction;
B) S=" O ": indicate OUT parameter, be server-side to client-side to;
C) no IN, the data block of OUT parameter mark S=" D ": are indicated;
D) S can also be other values, to stay extension to use.
(2) SDS corresponding with service primitive: ServiceName sections, variable-length, format is the same as STRING type parameter;
(3) SDS parameter: Par-1 to Par-n sections, the number of section and each section of format are retouched depending on corresponding S language
The number of parameters and type stated:
A) when S=I, the number of parameter section is that the number of parameters of IN is identified as in service describing;
B) when S=O, the number of parameter section is that the number of parameters of OUT is identified as in service describing;
C) when S=D, the number of parameter section is the number of all parameters in service describing;
2) according to service describing primitive, service parameter is encoded the method to form SDS
(Fig. 1) is the conversion method schematic diagram that SDS is formed according to service describing primitive, the method is as follows:
A, service data stream need to be formed when client sends out service request to server-side, coding method is as follows:
(1) corresponding service request service primitive is obtained;
(2) assigning (data flow head byte) data stream type S is " I " (in Fig. 1 1.);
(3) the Service name of service request primitive, data flow (in Fig. 1 2.) is incorporated by (table 2) STRING type format;
(4) successively the correspondence parameter that IN is identified as in service primitive is incorporated into according to the coded format of (table 2) and (table 3)
Data flow, until all parameters for being identified as IN are all incorporated into data flow (in Fig. 1 3.);
The data flow that above-mentioned (1)-(3) are formed is service data stream.
B, service response data flow need to be formed when server-side sends out service response to client, coding method is as follows:
(1) corresponding service request service primitive is obtained;
(2) assigning (data flow head byte) data stream type S is " O " (in Fig. 1 4.);
(3) the Service name of service request primitive, data flow (in Fig. 1 5.) is incorporated by (table 2) STRING type format;
(4) successively the correspondence parameter that OUT is identified as in service primitive is incorporated into according to the coded format of (table 2) and (table 3)
Data flow, until all parameters for being identified as OUT are all incorporated into data flow (in Fig. 1 6.);
The data flow that above-mentioned (1)-(3) are formed is service response data flow.
C, it is transmitted as complex data when data flow in use, coding method is similar, only data stream type is " D ", is compiled
IN or OUT mark is not judged when code (without IN and OUT in usual primitive).
3) according to service describing primitive, SDS is decoded, method getparms
It is as follows from data flow decoding process getparms after receiving end receives data flow:
(1) data flow first byte is parsed, data stream type is obtained;
(2) data flow is parsed by STRING type format, obtains service primitive name;
(3) corresponding service request service primitive is obtained;
(4) according to data stream type, according to (" I " corresponding IN parameter, " O " corresponding OUT join mark accordingly in service primitive
Number) parameter type and sequence data stream is parsed, obtain corresponding parameter.
4) data format of parameter section
The coded format of the data format of parameter section i.e. each parameter, is described in a manner of code database.Code database
The coding method of service parameter comprising all S description, is divided into basic parameter type and special (combination) parameter class from type
Type.
A) basic parameter type
Basic parameter type, corresponding coding method and byte number such as (the table 2) (reference for accounting for data flow that need to be supported
The definition of GSP basic data type, can expand as needed):
(table 2) basic parameter type coding table
B) special (combination) parameter type
Support special (combination) parameter type, corresponding coding method and account for data flow byte number such as (table 3) (can
Expand as needed):
(table 3) special (combination) parameter type coding schedule
5) expansion of S language
(DLT 1233 can only describe simple parameter description to S language, be unable to satisfy the need for describing special (combination) parameter type
It wants, expands as follows:
1, service request input parameter (parameter of the client to service extreme direction) is indicated with IN;
2, service response return parameters (server-side to client-side to parameter) is indicated with OUT;
3, increase special parameter type;
4, structured data type;
5, increase array and structural array parameter.
Example 1: the service primitive with special parameter type
< GetSubstationChIEDSCDFile (// Service name
IN STRING:IEDName, //IED title
OUT STRING:fileName, // filename
OUT FILEDATA:fileDate, the SCD file content of //IED, special parameter type
) " SCD file for obtaining variation IED "/>
Example 2: the service primitive with expanded structure array
< GetSubstationIEDlist (// Service name
IN STRING:SubstationName, // power transformation station name
OUT int16:IEDnumber, //IED quantity
OUT struct IEDlist { STRING:IEDname, STRING:IEDdesc } [], //IED inventory, structure number
Group
) " obtaining IED inventory "/>
Example 3: the primitive used is expressed as complex data
< authPara(// authentication parameter
STRING Identity, // identity
INT8U signType, // signature type
TIME currentTime, // current time
STRING signValue, // signature value
) " parameters for authentication "/>.
Technical solution of the present invention concrete application is as follows:
(1) " generic service agreement " is combined to realize the application service transmission under Service-Oriented Architecture Based;
(2) for encryption and safety certification, multinomial data or parameter are encoded into, with reality by SDS by a data flow
Encrypted and digitally signed disposably now is carried out to multinomial data;
(3) be used as a kind of information frame format, be embedded in existing application communication agreement, with realize transport protocol provide outside data
SDS is such as embedded in 476 communication protocol of DL/T634.5104, DL/T by transmission.
It should be understood by those skilled in the art that, embodiments herein can provide as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the application
Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the application, which can be used in one or more,
The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces
The form of product.
The application is referring to method, the process of equipment (system) and computer program product according to the embodiment of the present application
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
The above are preferred embodiments of the present invention, all any changes made according to the technical solution of the present invention, and generated function is made
When with range without departing from technical solution of the present invention, all belong to the scope of protection of the present invention.
Claims (10)
1. a kind of method of data streaming services, it is characterised in that: include the following steps,
S1, the format for defining server data stream SDS: SDS type+SDS corresponding with service primitive+SDS parameter;
S2, foundation service request service primitive, are encoded into server data stream for service parameter, it may be assumed that first, it is determined that the clothes that need to be formed
Business data stream type;Then, service request service primitive corresponding with service data stream type is obtained;And, to be formed again according to needing
Service data stream type to SDS type carry out assignment;Then, the Service name write-in SDS of service request service primitive is corresponding
In service primitive;Finally, type and sequence according to service request parameter in service request service primitive, query service parameter is compiled
Code table, and according to the coding method found, it is written in SDS parameter, is formed after corresponding service request parameter is encoded
Server data stream;
S3, receiving end receive server data stream, need to decode server data stream, to obtain service parameter, it may be assumed that firstly, parsing clothes
Business data flow first byte, obtains the SDS type of server data stream;Then, it by STRING type format analysis service data flow, obtains
The Service name of service request service primitive is taken, and then obtains service request service primitive;Finally, according to SDS type, service request
Service primitive parses server data stream, obtains corresponding service parameter.
2. according to the method described in claim 1, it is characterized by: the service parameter coding schedule includes that basic parameter type is compiled
Code table and combination parameter type coding table, wherein basic parameter type coding table is by basic parameter type, the basic parameter type
Corresponding coding method and the byte number for accounting for data flow are constituted;Combination parameter type coding table is by combination parameter type, the group
It closes the corresponding coding method of parameter type and accounts for the byte number composition of data flow.
3. according to the method described in claim 1, it is characterized by: the length of the SDS type is a byte;SDS is corresponding
The length of service primitive is variable, and format is STRING type;SDS parameter includes multistage, and the number of section is by service request service
The number of parameter determines in primitive, and each section of format is determined by the type of parameters in service request service primitive.
4. according to the method described in claim 2, it is characterized by: the SDS type value includes I, D, O, wherein I is indicated
IN parameter, for client to service extreme direction;O indicate OUT parameter, be server-side to client-side to;D indicates no IN, OUT ginseng
The data block of number mark;The number of the section of the SDS parameter determines in the following way:
If SDS type value is I, the number of the section of SDS parameter is that the parameter of IN is identified as in service request service primitive
Number;
If SDS type value is O, the number of the section of SDS parameter is that the parameter of OUT is identified as in service request service primitive
Number;
If SDS type value is D, the number of the section of SDS parameter is the number of all parameters in service request service primitive.
5. according to the method described in claim 3, it is characterized by: being serviced in the step S2 if client is sent out to server-side
When request, i.e., when need to form service data stream, the concrete mode that service parameter is encoded into server data stream is as follows:
1) the corresponding service request service primitive of service data stream is obtained;
It 2) is I by SDS type assignment;
3) by the Service name of service request service primitive, by STRING type format write-in SDS corresponding with service primitive;
4) query service parameter coding table will successively be identified as the correspondence parameter of IN, write-in SDS ginseng in service request service primitive
In number, until in all parameters for being identified as IN all write-in SDS parameter.
6. according to the method described in claim 3, it is characterized by: being serviced in the step S2 if server-side is sent out to client
When response, i.e., when need to form service response data flow, the concrete mode that service parameter is encoded into server data stream is as follows:
1) the corresponding service request service primitive of service response data flow is obtained;
It 2) is O by SDS type assignment;
3) by the Service name of service request service primitive, by STRING type format write-in SDS corresponding with service primitive;
4) query service parameter coding table will successively be identified as the correspondence parameter of OUT in service request service primitive, SDS is written
In parameter, until in all parameters for being identified as OUT all write-in SDS parameter.
7. according to the method described in claim 3, it is characterized by: in the step S2, if need to form complex data transmission makes
Used time, the concrete mode that service parameter is encoded into server data stream are as follows:
1) the corresponding service request service primitive of service response data flow is obtained;
It 2) is D by SDS type assignment;
3) by the Service name of service request service primitive, by STRING type format write-in SDS corresponding with service primitive;
4) query service parameter coding table is written in SDS parameter successively by parameter in service request service primitive.
8. a kind of system of data streaming services, it is characterised in that: include:
Server data stream definition unit, for defining the format of server data stream, the format of server data stream SDS: SDS type+
SDS corresponding with service primitive+SDS parameter;
Service parameter coding unit, according to service number defined in service request service primitive and server data stream definition unit
According to stream format, service parameter is encoded into server data stream, specifically i.e.: first, it is determined that the service data stream type that need to be formed;And
Afterwards, service request service primitive corresponding with service data stream type is obtained;Again and, according to the service data stream type that need to be formed
Assignment is carried out to SDS type;It then, will be in the Service name write-in SDS corresponding with service primitive of service request service primitive;Finally,
Query service parameter coding table writes parameter corresponding in service parameter coding schedule according to service request service primitive, SDS type
Enter in SDS parameter, forms server data stream;
Server data stream decoding unit, server data stream is decoded, to obtain service parameter, specifically i.e.: firstly, analysis service number
According to stream first byte, the SDS type of server data stream is obtained;Then, by STRING type format analysis service data flow, clothes are obtained
The Service name of business request service primitive, and then obtain service request service primitive;Finally, according to SDS type, service request service
Primitive parses server data stream, obtains corresponding service parameter.
9. system according to claim 8, it is characterised in that: the length of the SDS type is a byte;SDS is corresponding
The length of service primitive is variable, and format is STRING type;SDS parameter includes multistage, and the number of section is by service request service
The number of parameter determines in primitive, and each section of format is determined by the type of parameters in service request service primitive.
10. system according to claim 9, it is characterised in that: the SDS type value includes I, D, O, wherein I is indicated
IN parameter, for client to service extreme direction;O indicate OUT parameter, be server-side to client-side to;D indicates no IN, OUT ginseng
The data block of number mark;The number of the section of the SDS parameter determines in the following way:
If SDS type value is I, the number of the section of SDS parameter is that the parameter of IN is identified as in service request service primitive
Number;
If SDS type value is O, the number of the section of SDS parameter is that the parameter of OUT is identified as in service request service primitive
Number;
If SDS type value is D, the number of the section of SDS parameter is the number of all parameters in service request service primitive.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710310725.4A CN107231347B (en) | 2017-05-05 | 2017-05-05 | A kind of method and system of data streaming services |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710310725.4A CN107231347B (en) | 2017-05-05 | 2017-05-05 | A kind of method and system of data streaming services |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107231347A CN107231347A (en) | 2017-10-03 |
CN107231347B true CN107231347B (en) | 2019-09-27 |
Family
ID=59934096
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710310725.4A Active CN107231347B (en) | 2017-05-05 | 2017-05-05 | A kind of method and system of data streaming services |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107231347B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112422560A (en) * | 2020-11-17 | 2021-02-26 | 中国电力科学研究院有限公司 | Lightweight substation secure communication method and system based on secure socket layer |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1254151A (en) * | 1998-11-13 | 2000-05-24 | 特克特朗尼克公司 | Multimedia data flow code conversion system |
CN105553967A (en) * | 2015-12-11 | 2016-05-04 | 邦彦技术股份有限公司 | Method and device for network meeting |
CN105978893A (en) * | 2016-06-27 | 2016-09-28 | 深圳云创车联网有限公司 | Data communication method of mobile terminal as well as mobile terminal and communication system thereof |
-
2017
- 2017-05-05 CN CN201710310725.4A patent/CN107231347B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1254151A (en) * | 1998-11-13 | 2000-05-24 | 特克特朗尼克公司 | Multimedia data flow code conversion system |
CN105553967A (en) * | 2015-12-11 | 2016-05-04 | 邦彦技术股份有限公司 | Method and device for network meeting |
CN105978893A (en) * | 2016-06-27 | 2016-09-28 | 深圳云创车联网有限公司 | Data communication method of mobile terminal as well as mobile terminal and communication system thereof |
Also Published As
Publication number | Publication date |
---|---|
CN107231347A (en) | 2017-10-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106656919B (en) | A kind of session analytic method and system based on Telnet agreement | |
CN102056188B (en) | Data generation method, data transmission method and related equipment | |
CN104486396A (en) | Cross-platform network data transmission method | |
CN105068854A (en) | Method for controlling different products by using same rule | |
CN107046559A (en) | A kind of device encoding method and server | |
CN105022619A (en) | Code processing method and device | |
CN105302564A (en) | Online office software service control and implementation method | |
CN107231347B (en) | A kind of method and system of data streaming services | |
CN102104894A (en) | Mobile service protocol testing device and method | |
CN101631093A (en) | Method and system for realizing real-time data exchange interface | |
CN110098959A (en) | Modeling method, device, system and the storage medium of industry control protocol interaction behavior | |
CN104767710B (en) | The transmission payload extracting method of HTTP block transmissions coding based on DFA | |
CN102932474B (en) | Method, device and system for analyzing message | |
Shin et al. | The CoAP-based M2M gateway for distribution automation system using DNP3. 0 in smart grid environment | |
CN109525550B (en) | Data message processing method, device and system | |
CN105979003A (en) | File downloading method, device and system | |
CN100401671C (en) | Method for transmitting files | |
CN107615810A (en) | Header compression system and method for online network code | |
CN109921875A (en) | Data transmission method, system and equipment | |
CN113114465B (en) | Method and device for processing attribution authority, storage medium and electronic device | |
CN110475370A (en) | The derivative structure's variable method of intelligence in data modeling | |
CN105959263B (en) | Aged caring institutions data interactive method and system based on JSON | |
CN106533715B (en) | A kind of data analysing method and system | |
CN104391928B (en) | The device and method that dynamic construction multidimensional model defines | |
CN102843345A (en) | Remote communication method and computer program product thereof |
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 |