Embodiment
Below in conjunction with accompanying drawing, the preferred embodiments of the present invention are described, should be appreciated that preferred embodiment described herein is only for instruction and explanation of the present invention, is not intended to limit the present invention.
Embodiment of the method
Fig. 1 is embodiment one flow chart of space data network progressive transmission method of the present invention.As shown in Figure 1, the present embodiment comprises:
Step S102: user end to server sends the request of profile spatial data, and the profile spatial data that reception server returns; In detail see the explanation explanation of Fig. 3;
Step S104: client is when judging that profile spatial data does not meet display precision requirement, the request of increment spatial data is sent to server, and the increment spatial data comprising integrated reconstruction information that reception server returns, and integrated reconstruction operation is carried out to profile spatial data and increment spatial data; In detail see the explanation explanation of Fig. 4.
The present embodiment is by the spatial data structure based on hierarchy, client and server carry out gradation to the spatial data of layering to be transmitted as required, make client can control the Internet Transmission of vector data, avoid the waste of transfer resource and computational resource, what it also avoid data repeats transmission, thus improve the effective rate of utilization of the network bandwidth, and then improve the effective efficiency of transmission of network of spatial data.
Fig. 2 is the embodiment two of space data network progressive transmission method of the present invention, and for explaining explanation, client sets up with server the flow process communicated.As shown in Figure 2, the present embodiment comprises:
Step 201, client-requested OPEN transmission channel, connection server;
Step 202, client judges whether successfully to be connected to server, if so, performs step 203, if not, performs step 204; Wherein, the conditional code that client returns according to server judges connection status, in each embodiment of the present invention, conditional code (can be called state information or feedback information) performs the state of client-requested instruction for illustration of server end, client is according to server side instructions implementation status, take corresponding behavior, conditional code is the amount of an expansion, can the definition of extended mode code as required; As shown in table 1:
Table 1 conditional code
Conditional code |
Coding |
STATUS_OK (state is not made mistakes) |
0 |
STATUS_ERROR (state is not made mistakes) |
127 |
Step 203, client opens data transmission channel;
Step 204, client exits;
It should be noted that, the present embodiment adopts single channel or double-channel to transmit, wherein, two-channel mode transmits data for a kind of preferred mode, and two-channel mode mainly considers that vector data progressive transmission is a kind of interactively data transfer mode, except transfer of data, vector data progressive transmission also wants the interactive instruction between transmission client and server, the feature of user interactions director data is that data volume is little, takies the transmission channel time short, but requires real-time; The feature of transfer of data is that data volume is comparatively large, and take the transmission channel time long, therefore this command channel is used for the interactive instruction of client and server end, this data transmission channel is used for transmitting real space data between server end and client.Instruction control channel is separated with data transmission channel, the realization of the agreement also simplified, and avoiding on the same channel should processing instruction data, again process transmission data.During concrete operations, vector data progressive transmission agreement in various embodiments of the present invention can be based upon transmission control protocol (Transmission ControlProtocol, be called for short TCP) etc. on basis, adopt text mode or binary data transfer mode, be preferably binary data transfer mode.
Control command of the present invention is as shown in table 2:
Table 2 control command table
Fig. 3 is embodiment three flow chart of space data network progressive transmission method of the present invention, for explaining the interaction flow that user end to server request profile spatial data is described.As shown in Figure 3, the present embodiment comprises:
Step 301, client sends the request of profile spatial data to server end on command channel, and the response of waiting for server end; During concrete operations, the coding of profile spatial data request can be shown in Table 3:
The request of table 3 profile spatial data is encoded
Step 302, server end responds this server end profile spatial data request; Specifically can comprise: server carries out acquisition operation according to the request of profile spatial data, when obtaining successfully, send and comprise the conditional code run succeeded, and return profile spatial data; When obtaining unsuccessfully, send and comprise the failed conditional code of execution, and do not send data to data transmission channel; During concrete operations, server can be as shown in table 4 according to the coding of the response of profile spatial data request:
Table 4 outline data request response coding
During concrete operations, profile spatial data can common coded system be encoded, following coding method is preferably adopted to encode, be explained as follows: the terminal shown as data due to client, do not need to safeguard Multi-scale model, only need the vector data structure safeguarded, logical construction (transmission structure) (the Part n indicated object n as shown in Figure 6 of outline data, identical with the structure of object 1 and other object, Geometry is structure), corresponding to the coding key of the outline data of Fig. 6 in table 5;
The coding of table 5 outline data
Step 303, client according to the response of server (namely server return conditional code) judge whether server runs succeeded, if so, perform step 304, otherwise, perform step 305;
Step 304, the client profile spatial data that reception server sends on data transmission channel;
Step 305, client receives error code, carries out error handle, and concrete error handle mode can be defined by client, such as ejects dialog box, write error daily record etc.;
The present embodiment sends the request of profile spatial data by user end to server, and then receive profile spatial data, achieve client in request msg first or only need data general view time (such as Eagle-eye Map) transmission the most coarse layer data, avoid the waste of resource, improve efficiency of transmission.
Fig. 4 is embodiment four flow chart of space data network progressive transmission method of the present invention, for explaining the interaction flow request that user end to server request increment spatial data is described.As shown in Figure 4, the present embodiment comprises:
Step 401, client sends increment spatial data to server end on command channel, and the response of waiting for server end; During concrete operations, the coding of increment spatial data can be shown in Table 6:
The request of table 6 increment spatial data is encoded
Step 402, server end responds this server end increment spatial data request; Specifically can comprise: server carries out acquisition operation (as the layer of the client-requested that comprises according to the request of increment spatial data, Scaling interval and querying condition obtain corresponding increment spatial data) according to the request of increment spatial data, when obtaining successfully, send and comprise the conditional code run succeeded, and return increment spatial data; When obtaining unsuccessfully, send and comprise the failed conditional code of execution, and do not send data to data transmission channel; During concrete operations, server can be as shown in table 7 according to the coding of the response of increment spatial data request:
Table 7 increment spatial data request response coding
Step 403, client according to the response of server (namely server return conditional code) judge whether server runs succeeded, if so, perform step 405, otherwise, perform step 404;
Step 404, client receives error code, carries out error handle, and concrete error handle mode can be defined by client, such as ejects wrong frame, write error daily record etc.;
Step 405, the client increment spatial data that reception server sends on data transmission channel, this increment spatial data comprises the integrated reconstruction information with client data with existing;
During concrete operations, the logical construction of increment spatial data is as shown in Fig. 7 (Root represents raw information): can generate a multiple dimensioned hierarchy Model through Map Generalization process High-precision Vector data, article one, the complete curve curve of the top (in the Fig. 7) can be divided into and is multiplely positioned at (Level_i on different scale, Level_i+1 etc.) curved section (Block), by the part that dotted line frame is lived, wherein topmost one deck (corresponding Level_i) forms the most coarse outline data, other each layers then form the detail data of different levels, vector data can be realized layering thus to express, according to level by detail data and outline data progressively integrated, just asperity data can be returned to gradually the reset condition of high accuracy data,
Because the point on Block has identical character, therefore form an orderly point set; For orderly point set, the mode of Run-Length Coding can be adopted to encode; As shown in Figure 8, for orderly point set, first recording the sequence number 13 on first summit, next record the number of vertices 7 of this section, is then the coordinate figure on these 7 summits successively; Therefore, the Run-Length Coding (RunLengthBlock) of orderly point set can be expressed as:
Table 8 is point set Run-Length Coding in order
Wherein node (Point) structure is defined as:
Typedef struct Point (i.e. the definition of node structure)
{
Double x, y; (wherein double refers to type double precision, and x, y are parameter)
};
Can find out, the Run-Length Coding of orderly point set is a kind of compact coded system, not redundant data;
Increment spatial data can be divided into simple curve increment spatial data and pel increment spatial data, makes an explanation below with regard to the coding of two kinds of increment spatial datas based on the run length encoding method of above-mentioned orderly point set:
(1) simple curve (SimpleLine) increment spatial data transmission coding
Simple curve refers to the curve only having a curved section, and simple curve forms multi-thread, the polygonal basic element with multiple part; So-called increment spatial data, refers to and to be deleted from spatial object, to the unessential point of spatial object geometry through the process of map abbreviation; Therefore the integrated reconstruction of abbreviation curve and increment spatial data is exactly reinsert on curve by increment spatial data points according to original position on curve, carrys out the original form of recovery curve thus; Therefore, to realize the reduction of increment spatial data, increment spatial data must remember its position on original curve, is anchor point (Anchor); Therefore incremental rate curve section needs anchor point (Anchor), the tlv triple that incremental rate curve segment length (some number Offset) and point coordinates array (Points) are formed is described: <Anchor, Offset, Points> (the reconstruction schematic diagram according to incremental data and outline data as shown in Figure 9 in detail, wherein, the top on the left side is incremental data, and centre is outline data, below be integrated after data; The right is integrated schematic diagram); Because simple curve may be split into multiple sections through integrated treatment, therefore, increment spatial data logical construction can for the structure shown in Figure 10 (wherein, the upper part of Figure 10 is the logical construction of outline data, lower part is the binary form of the outline data that upper part is corresponding), the transfer encoding of simple curve increment spatial data can be shown in Table 9;
The transfer encoding of table 9 simple curve increment spatial data
(2) pel increment spatial data encoding
For composite curve and polygon, each spatial object forming by several Part, each Part is formed by a simple curve, its logical construction refers to Figure 11 (wherein, the upper part of Figure 11 is the logical construction of increment spatial data, and lower part is the binary form of the increment spatial data that upper part is corresponding); The coding of pel increment spatial data is in table 10;
The coding of table 10 pel increment spatial data
Step 406, this increment spatial data and data with existing (the increment spatial data received before can comprising and profile spatial data), after receiving increment spatial data, are carried out integrated reconstruction, to recover high accuracy data by client.
Various embodiments of the present invention send the request of increment spatial data by client, and and then receive increment spatial data and carry out integrated operation, the data realizing having when client precision cannot meet the demands, when needing more high-precision data, to the details increment spatial data of client transmissions current data, then integrated reconstruction is carried out with client data with existing, to recover high accuracy data, until all increment spatial datas are all after end of transmission, return to the original precision state of data, layering gradation based on the dimensional properties implementation space data of spatial data is transmitted, transmit as required, avoid the waste of transfer resource and computational resource, solve the large and network bandwidth of space data quantity limited between contradiction, what it also avoid data repeats transmission, thus improve the effective rate of utilization of the network bandwidth, and then improve the network transmission efficiency of spatial data, the response time of shortening system is (as the data volume when outline data is compressible to 20% of initial data, and substantially do not affect display effect, when map show first only need outline data when, the data volume of Internet Transmission is original 20% in theory, therefore system response time can improve 5 times), and be convenient to the control realizing transmission.
Fig. 5 is embodiment five flow chart of space data network progressive transmission method of the present invention, illustrates that user end to server request stops the interaction flow of transfer of data for explaining.As shown in Figure 2, the present embodiment comprises:
Step 501, client sends data transfer termination request; During concrete operations, the coding of this data transfer termination request can see table 11:
The request of table 11 data transfer termination is encoded
Step 502, server end, after receiving this data transfer termination request, checks whether and has data to carry out transmitting (whether the figure layer data that namely client is asked sends); If so, then perform step 504, if not, then perform step 503;
Step 503, returns the countless information reportedly sent to client;
Step 504, returns the information client that data transmit, and notifies that client transmissions stops; During concrete operations, server can be as shown in table 12 according to the coding of the response of this data transfer termination request:
Table 12 data transfer termination request response coding
Step 505, server executive termination transmission operation; During concrete operations, consider that pel is the most basic unit of Vector spatial data, for ensureing the data integrity that client receives, after receiving data transfer termination request, servers' data transmission channel does not stop transfer of data at once, but continues the primitive data transmitted to be sent to client;
Step 506, server sends " end of transmission character " after the transmission completing the primitive data transmitted in client data transmission channel;
It should be noted that, above-mentioned steps 502-506 is the preferred implementation that server end responds this request after receiving this data transfer termination request, according to current status transmission, determine the scheme whether stopping immediately transmitting, achieve the integrality of transfer of data, if do not consider the integrality of transfer of data, current transmission status can be judged, directly stop transfer of data; Simultaneously, following explanation is carried out for this end of transmission character, no matter be complete outline data or incomplete increment spatial data, before each primitive data, 32bit is the length in the space shared by this primitive data, therefore this length position can be used as the end of transmission character, and during concrete operations, server end can after transferring a complete primitive data, the length of the data of next pel is set to-1, in this, as the full stop of the end of transmission
Step 507, client, after receiving " end of transmission character ", terminates the data receiver on data transmission channel, after length is the pel of-1 as received when client, then thinks that current transmission terminates, no longer carries out the reception of data.
It should be noted that, each embodiment of the present invention based on the dimensional properties of spatial data solve the large and network bandwidth of space data quantity limited between contradiction, need the details increment spatial data under server end is generated more coarse profile spatial data and a series of different scale in advance by high accuracy data, (Figure 12 is referred to the multi-Scale Data structure formed, Figure 12 is mainly used in illustrating that client and server carries out gradation transmitting procedure as required based on the data of layering, detailed process is shown in the explanation explanation of above-mentioned Fig. 2-Fig. 5, repeat no more), and the multiple dimensioned data structure of this generation same as the prior art (see " a kind of multiresolution curve model for progressive transmission " computer engineering .34 (8): 25-28.2008 "), according to each embodiment of the present invention, achieve the data of the precision met the demands to client transmissions, specifically can be as: first transmit the most coarse layer data, when map amplifies the more detailed data of needs, transmit details increment spatial data again, and carry out integrated with client data with existing, to recover high accuracy data, vector data network progressive transmission is a reversible process, and when all increment spatial data transmission and integrated complete, data return to original precision state completely.
The present embodiment is by adopting the transmission means of increment type, first to the data that client transmissions is more coarse, then gradually to client transmissions details incremental data, data with existing and details incremental data are carried out integrated reconstruction and progressively recover high-precision data by client, client sends data transfer termination request, and server responds this data transfer termination request, achieve in data transmission procedure, when the paid-in data of client can meet application demand, client can stop the transmission of data, when client data precision cannot meet the demands, can resume data transmission at any time, combine the above-mentioned transfer process according to the request of profile spatial data and the request of increment spatial data, the embodiment of Fig. 3-Fig. 5 achieves that user drives, active, interactive transmission mode, the process of user's control data transmission, the data of its permissible accuracy are only met to client transmissions, thus reduce the transmission of " useless " data, achieve and transmit as required, user only needs to obtain the data meeting current application precision, therefore current data precision meet user require time, user can stop transfer of data at any time, when current data precision cannot meet the demands, user can recover the transmission of data at any time, to obtain more high-precision data.
System embodiment
Figure 13 is the example structure figure of spatial data network progressive transmission system of the present invention.Each embodiment of the method shown in Fig. 1-Figure 12 is all applicable to the present embodiment.The present embodiment comprises: client 32, for sending the request of profile spatial data, receive the profile spatial data corresponding with the request of profile spatial data, when judging that profile spatial data does not meet display precision requirement, send the request of increment spatial data, receive the increment spatial data that comprise integrated reconstruction information corresponding with the request of increment spatial data, and integrated reconstruction operation is carried out to profile spatial data and increment spatial data; Server 34, for according to the profile spatial data request received, obtains and sends corresponding profile spatial data, and according to the increment spatial data request received, obtains and send the corresponding increment spatial data comprising integrated reconstruction information.
During concrete operations, this client 32 can comprise: the first transceiver module 320, for sending the request of profile spatial data, receives corresponding profile spatial data; Whether judge module 321, meet display precision requirement for profile spatial data, and judge whether the data received meet application precision; Second transceiver module 322, for when judge module 321 judges that profile spatial data does not meet display precision requirement, sends the request of increment spatial data, receives the increment spatial data that comprise integrated reconstruction information corresponding with the request of increment spatial data; 3rd transceiver module 323, during for judging at judge module 321 to meet application precision, sends data transfer termination request; Integration module 324, for carrying out integrated reconstruction operation to profile spatial data and increment spatial data.
This server 34 can comprise: receiver module 340, for receiving the request of profile spatial data, the request of increment spatial data and data transfer termination request; Acquisition module 341, for the profile spatial data corresponding according to profile spatial data acquisition request, and the increment spatial data that comprise integrated reconstruction information corresponding according to increment spatial data acquisition request; Sending module 342, for sending corresponding profile spatial data, the corresponding increment spatial data comprising integrated reconstruction information; Processing module 343, for the request of response data transmission ending; Coding module 344, encode for the profile spatial data of coded system to correspondence according to table 5, and encode according to the increment spatial data of coded system to correspondence of the orderly point set based on Run-Length Coding, and send the increment spatial data after the profile spatial data after coding and coding by sending module 342.
During concrete operations, this processing module 343 can comprise: determine submodule (not shown), for whether completing the transmission of the primitive data of current transmission; Process submodule (not shown), for after the transmission of primitive data completing current transmission, sends the end of transmission character to client.
The present invention sends the request of increment spatial data by client 32, and and then reception server 34 send increment spatial data and carry out integrated operation, the data realizing having when client 32 precision cannot meet the demands, when needing more high-precision data, server 34 is to the details increment spatial data of client transmissions current data, then integrated reconstruction is carried out with client 32 data with existing, to recover high accuracy data, until all increment spatial datas are all after end of transmission, return to the original precision state of data, the layering gradation transmission of implementation space data, transmit as required, avoid the waste of transfer resource and computational resource, what it also avoid data repeats transmission, thus improve the effective rate of utilization of the network bandwidth, and then improve the network transmission efficiency of spatial data.
Last it is noted that these are only the preferred embodiments of the present invention, be not limited to the present invention, although with reference to previous embodiment to invention has been detailed description, for a person skilled in the art, it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein portion of techniques feature.Within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.