Summary of the invention
To the problem that exists in the above-mentioned prior art; The object of the present invention is to provide the system of device and a kind of distributed demonstration vector data of a kind of method of distributed demonstration vector data, a kind of distributed demonstration vector data; It can effectively reduce the data volume of Network Transmission and the data volume of the vector graphics that display end need be drawn, and improves the display efficiency of vector graphics.
For achieving the above object, the present invention adopts following technical scheme:
A kind of method of distributed demonstration vector data comprises step:
Receive and draw instruction and vector data bag;
Go out the screen coordinate scope that each display end shows according to the position calculation of each display end in whole combination, and convert the screen coordinate scope that each display end shows the geographic coordinate scope of corresponding reality into;
Said vector data bag is unpacked, and carry out the spatial relationship screening, filter out the vector data that each display end need show according to the geographic coordinate scope that each display end need show;
The vector data that need show each display end respectively carries out package, and the data behind the package are sent to corresponding display end draws and show;
The mode that the said geographic coordinate scope that need show according to each display end carries out spatial relationship screening, filter out the vector data that each display end need show specifically comprises:
Be respectively each vector data and generate corresponding management handle, be respectively each display end and generate corresponding vector data chained list;
Whether each vector data of judging said vector data bag intersects with the geographic coordinate scope that display end need show; If; Judge the vector data that this vector data need show for this display end, and the management handle and the coordinate figure of this vector data joined in the corresponding vector data chained list of this display end.
A kind of device of distributed demonstration vector data comprises:
The Data Receiving unit is used for receiving drawing and instructs and the vector data bag;
Coordinate transformation unit is used for going out the screen coordinate scope that each display end shows according to each display end in the position calculation of whole combination, and converts the screen coordinate scope that each display end shows the geographic coordinate scope of corresponding reality into;
The space screening unit is used for said vector data bag is unpacked, and carries out the spatial relationship screening according to the geographic coordinate scope that each display end need show, filters out the vector data that each display end need show;
Data transmission unit, the vector data that is used for need showing each display end respectively carries out package, and the data behind the package are sent to corresponding display end draws and show;
Said space screening unit specifically comprises:
The unit of unpacking is used for said vector data bag is unpacked;
Management handle generation unit is used to each vector data and generates corresponding management handle;
Vector data chained list generation unit is used to be respectively each display end and generates corresponding vector data chained list;
Said screening unit; Be used for when judgement learns that geographic coordinate scope that vector data and this display end need show intersects; Judge the vector data that this vector data need show for this display end, and the management handle and the coordinate figure of this vector data joined in the corresponding vector data chained list of this display end.
A kind of system of distributed demonstration vector data comprises the device of aforesaid distributed demonstration vector data also comprising each said display end that each said display end is formed said combination.
According to the scheme of the invention described above, it is the geographic coordinate scope that converts corresponding reality through the screen coordinate scope that each display end is shown into, and in view of the above the vector data bag that receives is carried out the spatial relationship screening; Filter out the vector data that each display end need show, thereby, when each display end sends vector data; Just can only send to its vector data that need show of display end, rather than whole vector datas, reduce the data volume of Network Transmission to greatest extent; Offered load is little; In addition, drawing when showing at display end, also can be only to draw and show the vector data that this display end need show; Greatly reduce the data volume that each display end need be handled, improved the display efficiency of vector graphics.
Embodiment
Below with the mode of specific embodiment the present invention program is set forth in detail.
Referring to shown in Figure 1, be the schematic flow sheet of the method embodiment of distributed demonstration vector data of the present invention, it comprises step:
Step S101: receive and draw instruction and vector data bag, get into step S102;
Step S102: go out the screen coordinate scope that each display end shows according to the position calculation of each display end in whole combination; Carry out coordinate conversion; The screen coordinate scope that each display end is shown converts the geographic coordinate scope of corresponding reality into, gets into step S103;
Step S103: said vector data bag is unpacked, and carry out the spatial relationship screening, filter out the vector data that each display end need show, get into step S104 according to the geographic coordinate scope that each display end need show;
Step S104: the vector data that need show each display end respectively carries out package, and the data behind the package are sent to corresponding display end draws and show.
According to the method for the invention described above, it is through filtering out the vector data that each display end need show, thereby; When each display end sends vector data, just can only send to its vector data that need show of display end, rather than whole vector datas; Reduced the data volume of Network Transmission to greatest extent, offered load is little, in addition; When display end is drawn demonstration; Also can be only to draw and show the vector data that this display end need show, greatly reduce the data volume that each display end need be handled, improve the display efficiency of vector graphics.
The above-mentioned concrete mode of obtaining the screen coordinate scope that the position of each display end in combination, each display end show can adopt variety of way; For example in advance the position of each display end in whole combination, the screen coordinate scope that each display end shows are stored; When carrying out above-mentioned steps, directly reading those information and get final product, also can be not store in advance; When carrying out above-mentioned steps, from combination, acquire those information again, concrete implementation does not repeat them here.
Wherein, in above-mentioned steps S103, carry out spatial relationship screening, when filtering out the vector data that each display end need show, a kind of concrete implementation wherein can be:
Be respectively each vector data and generate corresponding management handle, and be respectively the vector data chained list that each display end generates correspondence;
Judge the vector data whether each vector data of vector data bag need show for this display end; If judge that certain vector data is the vector data that this display end need show, then management handle and the coordinate figure with this vector data joins in the corresponding vector data chained list of this display end.When specifically judging; Can be after earlier some vector datas being judged completion to the relation of all display ends; Get into judgement again to next vector data; Perhaps also can be after all vector datas are judged completion to the relation of some display ends, to get into the judgement to next display end again, concrete mode can be different according to actual needs.At this moment, as far as each display end, the data that comprise in its corresponding vector data chained list are the vector data that this display end need show.
Wherein, When judging the vector data whether certain vector data need show for certain display end; Can judge through judging that geographic coordinate scope that whether this vector data need show with this display end intersects,, then can judge the vector data that this vector data need show for this display end if intersect; Otherwise, judge that then this vector data is not the vector data that this display end need show.
When whether judgement intersects; Can adopt multiple mode to judge; In a kind of therein implementation; Can be the geographic coordinate envelope rectangle that generates each vector data according to the coordinate figure of each vector data, when judging that whether certain vector data intersects with certain display end, can be whether the geographic coordinate scope of geographic coordinate envelope rectangle and the demonstration of this display end through judging this vector data intersects and judge; If the geographic coordinate scope that the geographic coordinate envelope rectangle of this vector data and this display end show intersects, can judge that then the geographic coordinate scope that this vector data and this display end need show intersects.
As a kind of optimal way, the above-mentioned vector data bag that receives can be the overall data bag that comprises all vector figure datas, thereby when sending the vector data bag; Be not with the package transmission respectively of each vector graphics; Avoided vector data asynchronous, reduced the number of times of transmitted data on network simultaneously owing to gradation arrives the demonstration that causes, and because package repeatedly; Thereby reduced the data volume of Network Transmission on the whole, further improved display efficiency.
According to the method for the distributed demonstration vector data of the invention described above, the present invention also provides a kind of device of distributed demonstration vector data, below just each embodiment of the device of this distributed demonstration vector data is elaborated.
Embodiment one:
As shown in Figure 2, be the structural representation of the device embodiment one of distributed demonstration vector data of the present invention, it comprises:
The Data Receiving unit is used for receiving drawing and instructs and the vector data bag;
Coordinate transformation unit is used for going out the screen coordinate scope that each display end shows according to each display end in the position calculation of whole combination, carries out coordinate conversion, the screen coordinate scope of each display end demonstration is converted into the geographic coordinate scope of corresponding reality;
The space screening unit is used for said vector data bag is unpacked, and carries out the spatial relationship screening according to the geographic coordinate scope that each display end need show, filters out the vector data that each display end need show;
Data transmission unit, the vector data that is used for need showing each display end respectively carries out package, and the data behind the package are sent to corresponding display end draws and show.
According to the device in the present embodiment, it is through filtering out the vector data that each display end need show, thereby; When each display end sends vector data, just can only send to its vector data that need show of display end, rather than whole vector datas; Reduced the data volume of Network Transmission to greatest extent, offered load is little, in addition; When display end is drawn demonstration; Also can be only to draw and show the vector data that this display end need show, greatly reduce the data volume that each display end need be handled, improve the display efficiency of vector graphics.
The concrete mode that above-mentioned coordinate transformation unit obtains the screen coordinate scope that the position of each display end in combination, each display end show can adopt variety of way; For example in advance the position of each display end in whole combination, the screen coordinate scope that each display end shows are stored; When carrying out above-mentioned steps; Directly reading those information gets final product; Can be not store in advance yet, when carrying out above-mentioned steps, from combination, acquire those information again, concrete implementation repeat them here.
Wherein, The space screening unit is when judging the vector data whether certain vector data need show for certain display end; Can judge through judging that geographic coordinate scope that whether this vector data need show with this display end intersects,, then can judge the vector data that this vector data need show for this display end if intersect; Otherwise, judge that then this vector data is not the vector data that this display end need show.
When whether judgement intersects; Can adopt multiple mode to judge; In a kind of therein implementation; Can be the geographic coordinate envelope rectangle that generates each vector data according to the coordinate figure of each vector data, when judging that whether certain vector data intersects with certain display end, can be whether the geographic coordinate scope of geographic coordinate envelope rectangle and the demonstration of this display end through judging this vector data intersects and judge; If the geographic coordinate scope that the geographic coordinate envelope rectangle of this vector data and this display end show intersects, can judge that then the geographic coordinate scope that this vector data and this display end need show intersects.
As a kind of optimal way, the above-mentioned vector data bag that receives can be the overall data bag that comprises all vector figure datas, thereby when sending the vector data bag; Be not with the package transmission respectively of each vector graphics; Avoided vector data asynchronous, reduced the number of times of transmitted data on network simultaneously owing to gradation arrives the demonstration that causes, and because package repeatedly; Thereby reduced the data volume of Network Transmission on the whole, further improved display efficiency.
Embodiment two:
As shown in Figure 3, be the structural representation of the device embodiment two of distributed demonstration vector data of the present invention, in the present embodiment, the space screening unit in the foregoing description one has been carried out further qualification, this space screening unit specifically comprises:
The unit of unpacking is used for said vector data bag is unpacked;
Screening unit, the geographic coordinate scope that is used for need showing according to each display end are carried out the spatial relationship screening, filter out the vector data that each display end need show.
At this moment; After screening unit screening obtains vector data that each display end need show; Data transmission unit can obtain the vector data that each display end need show from this screening unit, and sends to corresponding display end behind the vector data package that respectively each display end need be shown and show.
Identical in other technologies characteristic in the present embodiment and the foregoing description one do not repeat them here.
Embodiment three:
As shown in Figure 4; Be the structural representation of the device embodiment three of distributed demonstration vector data of the present invention, in the present embodiment, for the scheme among the embodiment two; Be the mode of screening, this space screening unit has been carried out further qualification through a kind of concrete space.
As shown in Figure 4, the space screening unit in the present embodiment also comprises:
Management handle generation unit is used to each vector data and generates corresponding management handle;
The vector data linked list units is used to be respectively each display end and generates corresponding vector data chained list;
At this moment; Said screening unit; When the vector data that vector data need show for this display end is learnt in judgement, the management handle and the coordinate figure of this vector data joined in the corresponding vector data chained list of this display end, at this moment; As far as each display end, the data that comprise in its corresponding vector data chained list are the vector data that this display end need show.
In this case; After obtaining the vector data that each display end need show; Data transmission unit can be directly obtains the vector data that each display end need show from the vector data linked list units, and sends to corresponding display end behind the vector data package that respectively each display end need be shown and show.
Identical in other technologies characteristic in the present embodiment and the foregoing description two do not repeat them here.
Device according to the distributed demonstration vector data of the invention described above; The present invention also provides a kind of system of distributed demonstration vector data; This system comprises the device of aforesaid distributed demonstration vector data, also comprises each said display end, and each said display end has been formed a combination jointly; The common demonstration work of accomplishing integral body does not repeat them here.
Above-described embodiment of the present invention only is the explanation to the present invention program's specific embodiment, does not constitute the qualification to protection domain of the present invention.Any modification of within spirit of the present invention and principle, being done, be equal to replacement and improvement etc., all should be included within the claim protection domain of the present invention.