CN111586053B - Websocket technology-based GIS application remote screen sharing method - Google Patents
Websocket technology-based GIS application remote screen sharing method Download PDFInfo
- Publication number
- CN111586053B CN111586053B CN202010384831.9A CN202010384831A CN111586053B CN 111586053 B CN111586053 B CN 111586053B CN 202010384831 A CN202010384831 A CN 202010384831A CN 111586053 B CN111586053 B CN 111586053B
- Authority
- CN
- China
- Prior art keywords
- screen sharing
- websocket
- remote screen
- gis application
- message
- 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
Images
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/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/161—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
- H04L69/162—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/29—Geographical information databases
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/08—Protocols specially adapted for terminal emulation, e.g. Telnet
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Abstract
The invention discloses a GIS application remote screen sharing method based on a Websocket technology, which adopts the Websocket technology to realize screen sharing between different regions and networks by transferring the processes of screenshot, encoding, compressing, transmitting, decoding and the like of the operation result of GIS application in a screen. The screen sharing method provided by the invention has the advantages that when the GIS application scene of the high-hardware configuration computer screen is shared by the low-hardware configuration equipment, the situation that the GIS application scene cannot be perfectly displayed due to low configuration of the receiving end can be avoided; and meanwhile, the screen sharing display effect is better when the intelligent large-screen application scene is used.
Description
Technical Field
The invention belongs to the technical field of GIS application use, and particularly relates to a GIS application remote screen sharing method based on a WebSocket technology.
Background
A GIS (Geographic Information System) is a specific and very important spatial Information System, which is a technical System for collecting, storing, managing, computing, analyzing, displaying and describing relevant Geographic distribution data in the whole or part of the space of the earth's surface layer (including the atmosphere) under the support of a computer hardware and software System.
The existing GIS application, particularly the GIS application in a three-dimensional scene, has high requirements on hardware environment and needs high-performance display card support, and when all equipment needing to be displayed is configured with the same high-hardware configuration, a certain resource waste is brought by transient GIS map display.
The scenario of the GIS application requires support of many data and models, and the amount of data is huge, and additional cost and time increase are generated for different regions due to limitation, migration, configuration and debugging of the scenario, and the like of the data.
With the widespread development of big data applications such as smart cities, smart parks and smart traffic, the application of GIS on a smart large screen is a basic condition, all smart large screen applications need to use GIS application as a basis, and users have higher and higher requirements on the interaction of the GIS application of the smart large screen.
Disclosure of Invention
Aiming at the defects in the prior art, the GIS application remote screen sharing method based on the WebSocket technology solves the problem that the existing GIS application screen is limited by hardware performance during sharing.
In order to achieve the purpose of the invention, the invention adopts the technical scheme that: a GIS application remote screen sharing method based on a WebSocket technology comprises the following steps:
s1, recording the operation of the remote screen sharing initiating terminal on the GIS application in real time, carrying out graphic coding on the operation process to generate shared content, and sending the shared content to a message bus server in a WebSocket message packet mode;
s2, identifying the received WebSocket message packet through the message bus server, and forwarding the WebSocket message packet to the remote screen sharing receiving end;
s3, displaying the shared content in the received WebSocket message packet on a screen of a remote screen sharing receiving end, and completing remote screen sharing.
Further, the remote screen sharing initiating terminal and the remote screen sharing receiving terminal have the same map engine, and the remote screen sharing initiating terminal and the remote screen sharing receiving terminal complete registration in the message bus server.
Further, the step S1 is specifically:
s11, operating and monitoring GIS application in the remote screen sharing initiating terminal;
s12, recording the graph after each step of operation when the GIS application operation is monitored;
s13, carrying out graphic coding on the graphics after each step of operation to generate shared content;
s14, converting the shared content into binary codes and compressing the binary codes to form json packages serving as WebSocket message bodies;
and S15, forming a WebSocket message packet by the WebSocket message body and the WebSocket message header corresponding to the current shared content, and sending the WebSocket message packet to the message bus server.
Further, in step S12, the operations applied to the GIS include moving, rotating, zooming in, zooming out, and clicking.
Further, the WebSocket message body and the WebSocket message header in the WebSocket message packet in step S15 each include a field name, a data type, and a length that are in one-to-one correspondence;
the field names in the WebSocket message body comprise an operation Type number Type _ ID, an operation result Info and a GIS application number App _ ID; the data Type corresponding to the operation Type number Type _ ID is Int, and the length is 4; the data type corresponding to the operation result Info is String, and the length is 2000; the data type corresponding to the GIS application number App _ ID is String, and the length is 4; the field name in the WebSocket message header comprises a message packet length PackLength, a Command word Command and an initiator identifier Sponsor; the data types corresponding to the message packet length, the Command word and the initiator identifier Sponsor are Int and 4.
Further, the step S2 is specifically:
s21, receiving the WebSocket message packet through the message bus server, and analyzing the WebSocket message packet to determine the validity of the shared content;
s22, when the shared content is valid, judging whether a remote screen sharing receiving end which is consistent with App _ ID and is on line exists in a registration list in the message bus server;
if yes, go to step S23;
if not, go to step S24;
s23, the WebSocket message packet is forwarded to the corresponding remote screen sharing receiving end through the message bus server, and the step S3 is carried out;
s24, returning the information of the failure of the forwarding of the shared content to the remote screen sharing initiating terminal, and returning to the step S1.
Further, in step S21, when the message packet length in the parsed WebSocket message header is consistent with the received WebSocket message packet length, the Command word Command is a remote screen sharing Command word, and the remote screen sharing originating terminal represented by the initiator identifier Sponsor completes registration and is satisfied at the same time, the shared content received by the message bus server is valid.
Further, the step S3 is specifically:
s31, receiving the WebSocket message packet through the remote screen sharing receiving terminal;
s32, analyzing the Websocket message packet to obtain a Websocket message body;
s33, determining an operation Type according to the Type _ ID in the WebSocket message body, decompressing a compressed json packet, and converting the Info into a corresponding graph;
s34, calculating the display scale according to the screen size of the remote screen sharing receiving end;
and S35, sequentially displaying the graphs corresponding to the determined Type _ ID on a screen of a remote screen sharing receiving end based on the calculated display proportion, and finishing remote screen sharing.
The invention has the beneficial effects that:
the GIS application remote screen sharing method based on the WebSocket technology provided by the invention adopts the WebSocket technology to realize screen sharing among different regions and networks by transferring the processes of screenshot, encoding, compressing, transmitting, decoding and the like of the operation result of GIS application in the screen. When the receiving end is too late or inconvenient to install and deploy the GIS application, remote screen sharing can be realized through the GIS application of the initiating end, and the GIS application can be watched and previewed in a cross-region and cross-network mode. When the receiving end is the GIS application with lower hardware performance requirement, the initiating end can use the GIS application with higher hardware performance requirement to share the remote screen with the receiving end, so that the GIS application operated by the transmitting end of the high-performance large screen can be displayed through low hardware equipment. Therefore, when the low-hardware configuration equipment shares the GIS application scene of the high-hardware configuration computer screen, the situation that the GIS application scene cannot be perfectly displayed due to low configuration of the receiving end can be avoided; and meanwhile, the screen sharing display effect is better when the intelligent large-screen application scene is used.
Drawings
Fig. 1 is a flowchart of a GIS application remote screen sharing method based on the WebSocket technology provided by the present invention.
Detailed Description
The following description of the embodiments of the present invention is provided to facilitate the understanding of the present invention by those skilled in the art, but it should be understood that the present invention is not limited to the scope of the embodiments, and it will be apparent to those skilled in the art that various changes may be made without departing from the spirit and scope of the invention as defined and defined in the appended claims, and all matters produced by the invention using the inventive concept are protected.
As shown in fig. 1, the GIS application remote screen sharing method based on the WebSocket technology includes the following steps:
s1, recording the operation of the remote screen sharing initiating terminal on the GIS application in real time, carrying out graphic coding on the operation process to generate shared content, and sending the shared content to a message bus server in a WebSocket message packet mode;
s2, identifying the received WebSocket message packet through the message bus server, and forwarding the WebSocket message packet to a remote screen sharing receiving end;
and S3, displaying the shared content in the received WebSocket message packet in the GIS application of the remote screen sharing receiving end to complete remote screen sharing.
The remote screen sharing initiating terminal and the remote screen sharing receiving terminal in the invention have the same map engine, but the GIS application developed based on the map engine can be different; and the remote screen sharing initiating terminal and the remote screen sharing receiving terminal complete registration in the message bus server, and the registration table records the connection information of the initiating terminal and the receiving terminal and the corresponding App _ ID, so that the target receiving terminal of the initiating terminal can be conveniently searched in the message bus server in the follow-up process.
The step S1 is specifically:
s11, operating and monitoring GIS application in the remote screen sharing initiating terminal;
s12, recording the graph after each step of operation when the GIS application operation is monitored;
the operation of the user on the GIS application in the remote screen sharing initiating terminal comprises moving, rotating, amplifying, zooming out and clicking; based on the operation, the formed operation result comprises map level, position, direction and the like; the graph after each operation can be respectively processed into screen graphs in different areas through multiple threads, so that the graph can be conveniently converted into a json packet in the later period;
s13, carrying out graphic coding on the graphics after each step of operation to generate shared content;
s14, converting the shared content into binary codes and compressing the binary codes to form json packages serving as WebSocket message bodies;
and S15, forming a WebSocket message packet by the WebSocket message body and the WebSocket message header corresponding to the current shared content, and sending the WebSocket message packet to the message bus server.
The WebSocket message body and the WebSocket message header in the WebSocket message packet in step S15 each include a field name, a data type, and a length that correspond one to one;
as shown in table 1, the field name in the WebSocket message body includes an operation Type number Type _ ID, an operation result Info, and a GIS application number App _ ID; the data Type corresponding to the operation Type number Type _ ID is Int, and the length is 4; the data type corresponding to the operation result Info is String, and the length is 2000; the data type corresponding to the GIS application number App _ ID is String, and the length is 4;
table 1: websocket message body structure
The specific operation corresponding to the operation Type _ ID in the present invention is shown in table 2:
table 2: operation Type _ ID comparison table
As shown in table 3, the field name in the WebSocket message header includes a packet length, a Command word, and an initiator identifier, Sponsor; the data types corresponding to the message packet length PackLength, the Command word Command and the initiator identifier Sponsor are all Int and 4;
table 3: websocket message header structure
The step S2 is specifically:
s21, receiving the WebSocket message packet through the message bus server, and analyzing the WebSocket message packet to determine the validity of the shared content;
s22, when the shared content is valid, judging whether a remote screen sharing receiving end which is consistent with App _ ID and is on line exists in a registration list in the message bus server;
if yes, go to step S23;
if not, go to step S24;
s23, the WebSocket message packet is forwarded to the corresponding remote screen sharing receiving end through the message bus server, and the step S3 is carried out;
s24, returning the information of the failure of the forwarding of the shared content to the remote screen sharing initiating terminal, and returning to the step S1.
In step S21, when the parsed message packet length PackLength in the WebSocket message header is consistent with the received WebSocket message packet length, the Command word Command is a remote screen sharing Command word, and the remote screen sharing initiator represented by the initiator identifier Sponsor completes registration and registration in the message bus server and is satisfied, it determines that the shared content received by the message bus server is valid, and then forwards the shared content according to App _ ID.
The step S3 is specifically:
s31, receiving the WebSocket message packet through the remote screen sharing receiving terminal;
s32, analyzing the WebSocket message packet to obtain a WebSocket message body;
s33, determining an operation Type according to the Type _ ID in the WebSocket message body, decompressing a compressed json packet, and converting the Info into a corresponding graph;
s34, calculating the display scale according to the screen size of the remote screen sharing receiving end;
and S35, sequentially displaying the graphs corresponding to the determined Type _ ID on the screen of the remote screen sharing receiving end based on the calculated display proportion, and completing remote screen sharing.
The invention has the beneficial effects that:
the GIS application remote screen sharing method based on the Websocket technology provided by the invention adopts the Websocket technology to realize screen sharing between different regions and networks by transferring the processes of screenshot, encoding, compressing, transmitting, decoding and the like of the operation result of the GIS application in the screen. When the receiving end is too late or inconvenient to install and deploy the GIS application, remote screen sharing can be realized through the GIS application of the initiating end, and the GIS application can be watched and previewed in a cross-region and cross-network mode. When the receiving end is the GIS application with lower hardware performance requirement, the initiating end can use the GIS application with higher hardware performance requirement to share the remote screen with the receiving end, so that the GIS application operated by the transmitting end of the high-performance large screen can be displayed through low hardware equipment. Therefore, when the low-hardware configuration equipment shares the GIS application scene of the high-hardware configuration computer screen, the situation that the GIS application scene cannot be perfectly displayed due to low configuration of the receiving end can be avoided; and meanwhile, the screen sharing display effect is better when the intelligent large-screen application scene is used.
Claims (4)
1. The GIS application remote screen sharing method based on the WebSocket technology is characterized by comprising the following steps of:
s1, recording the operation of the remote screen sharing initiating terminal on the GIS application in real time, carrying out graphic coding on the operation process to generate shared content, and sending the shared content to a message bus server in a WebSocket message packet mode;
s2, identifying the received WebSocket message packet through the message bus server, and forwarding the WebSocket message packet to a remote screen sharing receiving end;
s3, displaying the shared content in the received WebSocket message packet on a screen of a remote screen sharing receiving end to finish remote screen sharing;
the step S1 specifically includes:
s11, operating and monitoring GIS application in the remote screen sharing initiating terminal;
s12, recording the graph after each step of operation when the GIS application operation is monitored;
s13, carrying out graphic coding on the graphics after each step of operation to generate shared content;
s14, converting the shared content into binary codes and compressing the binary codes to form a json package as a WebSocket message body;
s15, forming a WebSocket message packet by the WebSocket message body and the WebSocket message header corresponding to the current shared content, and sending the WebSocket message packet to the message bus server;
the WebSocket message body and the WebSocket message header in the WebSocket message packet in step S15 each include a field name, a data type, and a length that correspond one to one;
the field names in the WebSocket message body comprise an operation Type number Type _ ID, an operation result Info and a GIS application number App _ ID; the data Type corresponding to the operation Type number Type _ ID is Int, and the length is 4; the data type corresponding to the operation result Info is String, and the length is 2000; the data type corresponding to the GIS application number App _ ID is String, and the length is 4; the field name in the WebSocket message header comprises a message packet length PackLength, a Command word Command and an initiator identifier Sponsor; the data types corresponding to the message packet length PackLength, the Command word Command and the initiator identifier Sponsor are all Int, and the lengths are all 4;
the step S2 specifically includes:
s21, receiving the WebSocket message packet through the message bus server, and analyzing the WebSocket message packet to determine the validity of the shared content;
s22, when the shared content is valid, judging whether a remote screen sharing receiving end which is consistent with App _ ID and is on line exists in a registration list in the message bus server;
if yes, go to step S23;
if not, go to step S24;
s23, the WebSocket message packet is forwarded to the corresponding remote screen sharing receiving end through the message bus server, and the step S3 is carried out;
s24, returning the information of the sharing content forwarding failure to the remote screen sharing initiating terminal, and returning to the step S1;
in step S21, when the message packet length in the WebSocket message header obtained by parsing is consistent with the received WebSocket message packet length, the Command word Command is a remote screen sharing Command word, and the remote screen sharing initiator represented by the initiator identifier Sponsor completes registration and satisfies the registration at the message bus server, the shared content received by the message bus server is valid.
2. The GIS application remote screen sharing method based on the WebSocket technology as claimed in claim 1, wherein the remote screen sharing initiating terminal and the remote screen sharing receiving terminal have the same map engine, and the remote screen sharing initiating terminal and the remote screen sharing receiving terminal complete registration in the message bus server.
3. The method for sharing the GIS application remote screen based on the WebSocket technology as claimed in claim 1, wherein in the step S12, the operation on the GIS application comprises moving, rotating, zooming in, zooming out and clicking.
4. The GIS application remote screen sharing method based on the WebSocket technology as claimed in claim 1, wherein the step S3 is specifically:
s31, receiving the WebSocket message packet through the remote screen sharing receiving terminal;
s32, analyzing the Websocket message packet to obtain a Websocket message body;
s33, determining an operation Type according to the Type _ ID in the WebSocket message body, decompressing a compressed json packet, and converting the Info into a corresponding graph;
s34, calculating the display scale according to the screen size of the remote screen sharing receiving end;
and S35, sequentially displaying the graphs corresponding to the determined Type _ ID on the screen of the remote screen sharing receiving end based on the calculated display proportion, and completing remote screen sharing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010384831.9A CN111586053B (en) | 2020-05-09 | 2020-05-09 | Websocket technology-based GIS application remote screen sharing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010384831.9A CN111586053B (en) | 2020-05-09 | 2020-05-09 | Websocket technology-based GIS application remote screen sharing method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111586053A CN111586053A (en) | 2020-08-25 |
CN111586053B true CN111586053B (en) | 2022-09-06 |
Family
ID=72124793
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010384831.9A Active CN111586053B (en) | 2020-05-09 | 2020-05-09 | Websocket technology-based GIS application remote screen sharing method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111586053B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104767667A (en) * | 2014-01-02 | 2015-07-08 | 中兴通讯股份有限公司 | Method for sharing WEB page by multiple screens, terminal equipment and web server |
CN105094638A (en) * | 2015-06-17 | 2015-11-25 | 深圳市美贝壳科技有限公司 | Image screen sharing method of mobile terminal and smart home device and mobile terminal |
CN107948159A (en) * | 2017-11-27 | 2018-04-20 | 宁波市科技园区明天医网科技有限公司 | A kind of method of medical image simultaneous display and diagnostic operation based on browser |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6354453B2 (en) * | 2014-08-26 | 2018-07-11 | 株式会社リコー | Terminal device, screen sharing method, program, and screen sharing system |
-
2020
- 2020-05-09 CN CN202010384831.9A patent/CN111586053B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104767667A (en) * | 2014-01-02 | 2015-07-08 | 中兴通讯股份有限公司 | Method for sharing WEB page by multiple screens, terminal equipment and web server |
CN105094638A (en) * | 2015-06-17 | 2015-11-25 | 深圳市美贝壳科技有限公司 | Image screen sharing method of mobile terminal and smart home device and mobile terminal |
CN107948159A (en) * | 2017-11-27 | 2018-04-20 | 宁波市科技园区明天医网科技有限公司 | A kind of method of medical image simultaneous display and diagnostic operation based on browser |
Non-Patent Citations (1)
Title |
---|
视频会议系统中屏幕共享的设计与实现;罗良耀;《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》;20170515;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN111586053A (en) | 2020-08-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102800065B (en) | Based on the augmented reality Apparatus and method for of Quick Response Code recognition and tracking | |
CN112367531B (en) | Video stream display method, processing method and related equipment | |
CN104063806A (en) | Method for viewing single line drawing of electrical power system through mobile terminal in real time | |
CN104599315A (en) | Three-dimensional scene construction method and system | |
CN108733317B (en) | Data storage method and device | |
CN104539750A (en) | IP locating method and device | |
CN115294310B (en) | Multi-user scene control system and method based on GIS cloud rendering and storage medium | |
CN104867402A (en) | Offline reverse geocoding method, device thereof and terminal equipment | |
CN104243610A (en) | Distributed file transmission service method | |
CN102469112B (en) | Position tracking implementation method, Apparatus and system | |
CN115546331A (en) | Data rendering method and device, electronic equipment and computer readable medium | |
CN102722980A (en) | Method for full-digital real-time multiple signal fusion | |
CN104268201A (en) | GIS (Geographic Information System) platform based spatial massive multivariate data unified index method | |
CN111586053B (en) | Websocket technology-based GIS application remote screen sharing method | |
CN102508888B (en) | File compression storage and indexing method for improving map access efficiency | |
CN102236555A (en) | Traffic information display method and system | |
CN115866331A (en) | Video frame extraction analysis method, device, equipment and storage medium | |
CN113362090A (en) | User behavior data processing method and device | |
CN113051323B (en) | Water environment big data exchange method | |
CN111581319B (en) | GIS application multi-screen interaction method based on WebSocket technology | |
Zhao et al. | The research of mobile GIS power distribution line inspection based on mobile SVG/J2ME | |
CN103530370A (en) | Method and system for visualization deduction based on electronic map | |
CN111541864B (en) | Digital retina software defined camera method and system | |
CN115373831A (en) | Data processing method, device and computer readable storage medium | |
KR100312410B1 (en) | Method for compression and ecompression of vector data in ageographic information system |
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 |