CN114117283A - Method for displaying cache in lossless mode based on remote desktop protocol and application - Google Patents

Method for displaying cache in lossless mode based on remote desktop protocol and application Download PDF

Info

Publication number
CN114117283A
CN114117283A CN202111458145.2A CN202111458145A CN114117283A CN 114117283 A CN114117283 A CN 114117283A CN 202111458145 A CN202111458145 A CN 202111458145A CN 114117283 A CN114117283 A CN 114117283A
Authority
CN
China
Prior art keywords
image
database
protocol
key value
protocol server
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.)
Pending
Application number
CN202111458145.2A
Other languages
Chinese (zh)
Inventor
张文靖
高健
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Anchaoyun Software Co ltd
Original Assignee
Shanghai Anchaoyun Software Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Anchaoyun Software Co ltd filed Critical Shanghai Anchaoyun Software Co ltd
Priority to CN202111458145.2A priority Critical patent/CN114117283A/en
Publication of CN114117283A publication Critical patent/CN114117283A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24568Data stream processing; Continuous queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • G06F9/452Remote windowing, e.g. X-Window System, desktop virtualisation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Computational Linguistics (AREA)
  • Information Transfer Between Computers (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Abstract

The invention discloses a method for displaying cache in a lossless mode based on a remote desktop protocol and application thereof, wherein the method comprises the following steps: the protocol server receives an image sent by the virtual machine and acquires a key value of the image; the protocol server matches key values stored in a first database based on the key values of the images, wherein the first database is configured in the protocol server; and the protocol server side determines image data sent to a protocol client side according to the matching result and the state of the first database so that the protocol client side can execute display updating, wherein the image data comprises at least one of an image key value and an imaging data stream. According to the method, the BDB database can be established between the protocol server and the protocol client, so that the data volume transmitted between the server and the client is reduced, and the corresponding picture can be displayed in a common scene without repeated decompression.

Description

Method for displaying cache in lossless mode based on remote desktop protocol and application
Technical Field
The present invention relates to the field of computers, and more particularly, to a method and an application for displaying a cache in a lossless mode based on a remote desktop protocol.
Background
The existing remote desktop protocol comprises a client, a server, corresponding display equipment, a display driver and the like, wherein the client runs on user terminal equipment to provide a desktop environment for a user. After the remote desktop protocol is connected, a plurality of channels including a display channel and a mouse channel are established. The display channel controls the display of the remote desktop, and the mouse channel controls the shape and the position of the mouse in the display area of the remote desktop.
The current picture display updating operation flow is that a graphic application program in a virtual machine sends a request drawing operation to an operating system, a remote desktop protocol captures and processes the drawing operation request of the application program by using a display driver installed in the virtual machine, the drawing operation request is packaged into a message format of the remote desktop protocol and sent to a terminal, and the terminal analyzes a corresponding message according to the protocol to complete the picture updating operation.
In the process, the display device acquires a display area needing to be refreshed and transmits the display area to the protocol server, the protocol server selects lossless compression according to the message and transmits the message to the client through the remote desktop protocol, and the client performs lossless decompression through data streams.
The information disclosed in this background section is only for enhancement of understanding of the general background of the invention and should not be taken as an acknowledgement or any form of suggestion that this information forms the prior art already known to a person skilled in the art.
Disclosure of Invention
The invention aims to provide a display caching method and application based on a remote desktop protocol in a lossless mode, and solves the problems that each frame data stream of the existing remote desktop protocol needs to be transmitted to a client of a user terminal through a remote desktop display channel for decompression, the lossless compression has high requirements on image quality, but the compression ratio is low, so that the data volume needing to be transmitted between a server and the client is large, and higher bandwidth is occupied.
To achieve the above object, an embodiment of the present invention provides a method for display caching in a lossless mode based on a remote desktop protocol.
In one or more embodiments of the invention, the method comprises: the protocol server receives an image sent by the virtual machine and acquires a key value of the image; the protocol server matches key values stored in a first database based on the key values of the images, wherein the first database is configured in the protocol server; and the protocol server side determines image data sent to a protocol client side according to the matching result and the state of the first database so that the protocol client side can execute display updating, wherein the image data comprises at least one of an image key value and an imaging data stream.
In one or more embodiments of the present invention, the determining, by the protocol server, the image data sent to the protocol client according to the matching result and the state of the first database includes: when the key value same as the image exists in the first database, the protocol server side adds the frequency of the image to the first database; updating a timestamp corresponding to the key value in a second database, wherein the second database is configured in the protocol server; and the protocol server side determines to send the key value of the image to the protocol client side.
In one or more embodiments of the present invention, the determining, by the protocol server, the image data sent to the protocol client according to the matching result and the state of the first database includes: when the same key value as the image does not exist in the first database and the capacity of the first database is not full, adding the key value and the frequency of the image to the first database; adding the key value and corresponding timestamp to the second database; and the protocol server side determines to send the key value and the data stream of the image to a protocol client side.
In one or more embodiments of the present invention, the determining, by the protocol server, the image data sent to the protocol client according to the matching result and the state of the first database includes: when the key value same as the image does not exist in the first database, the capacity of the first database is full, and the image with the frequency of 1 exists in the first database, searching the image with the earliest time stamp in the second database according to the key value, and deleting the image in the first database and the second database; adding the key values and the frequency of the images to the first database, and adding the key values and the corresponding timestamps to a second database; and the protocol server side determines to send the data stream of the image to a protocol client side.
In one or more embodiments of the present invention, the determining, by the protocol server, the image data sent to the protocol client according to the matching result and the state of the first database includes: and when the key value same as the image does not exist in the first database, the capacity of the first database is full, and the image with the frequency of 1 does not exist in the first database, the protocol server determines to send the data stream of the image to a protocol client.
In one or more embodiments of the present invention, acquiring a key value of the image includes: and the protocol server side acquires the MD5 value of the image through an MD5 algorithm as a key value of the image.
To achieve the above object, another method for displaying cache in lossless mode based on remote desktop protocol is provided in the embodiments of the present invention.
In one or more embodiments of the invention, the method comprises: when the protocol client receives an image key value sent by the protocol server, acquiring a corresponding image in a third database according to the key value, wherein the third database is configured in the protocol client; or when the protocol client receives the image data stream and/or the image key value sent by the protocol server, the image data stream is analyzed according to a remote desktop protocol to generate a decompressed image, and the decompressed image and the image key value are added to a third database.
In another aspect of the present invention, an apparatus for display caching in a lossless mode based on a remote desktop protocol is provided, which includes an obtaining module, a matching module, and an updating module.
And the acquisition module is used for receiving the image sent by the virtual machine by the protocol server and acquiring the key value of the image.
And the matching module is used for matching the protocol server with key values stored in a first database based on the key values of the images, wherein the first database is configured in the protocol server.
And the updating module is used for determining the image data sent to the protocol client by the protocol server according to the matching result and the state of the first database so as to enable the protocol client to execute display updating, wherein the image data comprises at least one of an image key value and an imaging data stream.
In one or more embodiments of the invention, the update module is further configured to: when the key value same as the image exists in the first database, the protocol server side adds the frequency of the image to the first database; updating a timestamp corresponding to the key value in a second database, wherein the second database is configured in the protocol server; and the protocol server side determines to send the key value of the image to the protocol client side.
In one or more embodiments of the invention, the update module is further configured to: when the same key value as the image does not exist in the first database and the capacity of the first database is not full, adding the key value and the frequency of the image to the first database; adding the key value and corresponding timestamp to the second database; and the protocol server side determines to send the key value and the data stream of the image to a protocol client side.
In one or more embodiments of the invention, the update module is further configured to: when the key value same as the image does not exist in the first database, the capacity of the first database is full, and the image with the frequency of 1 exists in the first database, searching the image with the earliest time stamp in the second database according to the key value, and deleting the image in the first database and the second database; adding the key values and the frequency of the images to the first database, and adding the key values and the corresponding timestamps to a second database; and the protocol server side determines to send the data stream of the image to a protocol client side.
In one or more embodiments of the invention, the update module is further configured to: and when the key value same as the image does not exist in the first database, the capacity of the first database is full, and the image with the frequency of 1 does not exist in the first database, the protocol server determines to send the data stream of the image to a protocol client.
In one or more embodiments of the present invention, the obtaining module is further configured to: and the protocol server side acquires the MD5 value of the image through an MD5 algorithm as a key value of the image.
In another aspect of the present invention, there is provided still another apparatus for display caching in lossless mode based on remote desktop protocol, which includes a display module.
The display module is used for acquiring a corresponding image in a third database according to a key value when the protocol client receives the image key value sent by the protocol server, wherein the third database is configured in the protocol client; or when the protocol client receives the image data stream and/or the image key value sent by the protocol server, the image data stream is analyzed according to a remote desktop protocol to generate a decompressed image, and the decompressed image and the image key value are added to a third database.
In another aspect of the present invention, there is provided an electronic device including: at least one processor; and a memory storing instructions that, when executed by the at least one processor, cause the at least one processor to perform a method of display caching in lossless mode based on a remote desktop protocol as described above.
In another aspect of the invention, a computer-readable storage medium is provided, having stored thereon a computer program, which when executed by a processor, carries out the steps of the method of display caching in lossless mode based on remote desktop protocol as described.
Compared with the prior art, the method and the application for displaying the cache based on the remote desktop protocol in the lossless mode can record the pictures with the highest frequency of display of the user in the daily office scene by establishing the BDB database at the protocol server and the protocol client, so that the data volume transmitted between the server and the client is reduced, the bandwidth is saved, and the corresponding pictures can be displayed in the common scene without repeated decompression.
Drawings
FIG. 1 is a flow diagram of a method for display caching in lossless mode based on remote desktop protocol according to an embodiment of the present invention;
FIG. 2 is a first flowchart of a method for display caching in lossless mode based on remote desktop protocol, according to an embodiment of the present invention;
FIG. 3 is a second flowchart of a method for display caching in lossless mode based on the remote desktop protocol, according to an embodiment of the present invention;
FIG. 4 is a third flowchart of a method for displaying a cache in lossless mode based on a remote desktop protocol, according to an embodiment of the present invention;
FIG. 5 is a fourth flowchart of a method for display caching in lossless mode based on remote desktop protocol, according to an embodiment of the present invention;
FIG. 6 is a block diagram of an apparatus for displaying a cache in a lossless mode based on a remote desktop protocol according to an embodiment of the present invention;
FIG. 7 is a hardware block diagram of a computing device displaying caching in lossless mode based on remote desktop protocol according to an embodiment of the invention.
Detailed Description
The following detailed description of the present invention is provided in conjunction with the accompanying drawings, but it should be understood that the scope of the present invention is not limited to the specific embodiments.
Throughout the specification and claims, unless explicitly stated otherwise, the word "comprise", or variations such as "comprises" or "comprising", will be understood to imply the inclusion of a stated element or component but not the exclusion of any other element or component.
The technical solutions provided by the embodiments of the present invention are described in detail below with reference to the accompanying drawings.
Example 1
Referring to fig. 1, a method for displaying a cache in a lossless mode based on a remote desktop protocol according to an embodiment of the present invention is described, which includes the following steps.
In step S101, the protocol server receives the image sent by the virtual machine, and acquires a key value of the image.
Before performing display caching in a lossless mode based on a remote desktop protocol, a display channel, a mouse channel and a BDB database need to be initialized. The display channel is one of the channels after the remote desktop protocol is connected, and is mainly responsible for processing graphic commands, pictures and video stream display. The mouse channel is also one of the channels after the remote desktop protocol is connected, and is mainly responsible for the position, the visibility and the cursor shape of the pointer device. The remote desktop protocol processes different events by establishing different channels, and when the protocol server is connected with the protocol client, each channel is successfully established, so that the detailed description is omitted here.
After the protocol server receives the image data sent by the virtual machine, the protocol server acquires an MD5 value of the image through an MD5 algorithm, and the MD5 value is used as a key value of the image.
The MD5 algorithm is mainly calculated and encrypted by collecting the information digest of the file. The MD5 algorithm is used for encryption, a file can obtain a unique MD5 value, whether the file is correct or not can be determined through the MD5 value of the file, the MD5 value can be generated after the password is encrypted, therefore, the MD5 value of an image is used as a key value of the image, the key value of each image can be guaranteed to be unique, and a table is represented in a database.
In step S102, the protocol server matches the key value stored in the first database based on the key value of the image.
The BDB database is an open-source file database, is between a relational database and a memory database, is similar to the memory database in use mode, and is an embedded database engine taking key values as structures. Since the BDB database is different from a general relational database, one key value in the BDB database corresponds to a table in one database. The BDB database provides some functional interfaces for database access and management, and db _ create is used to create the database. The BDB database and the application program are positioned in the same address space, and network communication overhead between the client program and the database server does not exist in sequence; and the SQL code does not need to be analyzed, and the data can be directly accessed.
Firstly, initializing a BDB database, specifically, creating databases at a protocol server and a protocol client, wherein a first database and a second database are created at the protocol server, and the first database stores key values and frequencies of images and is marked as DB 1; the second database stores key values and time stamps for the images (recording the time each image appears last), noted as DB 2; a third database is created at the protocol client, storing the key values for the image and the image (the image after lossless decompression by the protocol client according to the remote desktop protocol), denoted DB 3.
And the protocol server matches the key value of the image with the key value stored in the first database, judges whether the image exists in the first database, and then updates the database of the protocol server. The key value is not needed to be stored in the database in advance, if the database is an empty table, the key value of the image is directly inserted into the table, the image is used again without decompression, and the corresponding image is directly searched in the database for use. The BDB database records pictures which are displayed most frequently in daily office scenes of users, so that the data volume transmitted between the server and the client can be reduced.
In step S103, the protocol server determines the image data sent to the protocol client according to the matching result and the state of the first database, so that the protocol client performs display updating.
The matching result comprises: the same key value with the image exists in the first database; the same key value as the image does not exist in the first database, and the capacity of the first database is not full; the same key value as the image does not exist in the first database, the capacity of the first database is full, and the image with the frequency of 1 exists in the first database; the same key value as the image does not exist in the first database, the first database capacity is full, and the image with the frequency of 1 does not exist in the first database.
Specifically, when a key value identical to the image exists in the first database, the protocol server adds the frequency of the image to the first database; updating the timestamp corresponding to the key value in the second database; and the protocol server side determines to send the key value of the image to the protocol client side.
When the key value identical to the image does not exist in the first database and the capacity of the first database is not full, adding the key value and the frequency of the image to the first database; adding the key value and the corresponding timestamp to the second database; and the protocol server side determines to send the key value and the data stream of the image to the protocol client side.
When the key value same as the image does not exist in the first database, the capacity of the first database is full, and the images with the frequency of 1 exist in the first database, searching the image with the earliest timestamp in the second database according to the key value, and deleting the images in the first database and the second database; adding the key values and the frequency of the images to a first database, and adding the key values and the corresponding timestamps to a second database; and the protocol server determines to send the data stream of the image to the protocol client.
When the key value same as the image does not exist in the first database, the capacity of the first database is full, and the image with the frequency of 1 does not exist in the first database, the BDB database does not need to be updated, and the protocol server determines to send the data stream of the image to the protocol client.
The protocol client analyzes the image information according to the remote desktop protocol after receiving the image information transmitted by the protocol server, the remote desktop protocol client performs lossless decompression on the image information to obtain a corresponding image, the image and the key value of the image are stored in a third database, and when the image is transmitted and used again, the image can be searched by the BDB database and directly displayed on the protocol client to complete the image updating operation.
Example 2
Referring to fig. 2, a method for displaying a cache in a lossless mode based on a remote desktop protocol according to an embodiment of the present invention is described, which includes the following steps.
In step S201, the protocol server receives the image sent by the virtual machine, and acquires a key value of the image.
After the protocol server receives the image data sent by the virtual machine, the protocol server acquires an MD5 value of the image through an MD5 algorithm, and the MD5 value is used as a key value of the image.
The MD5 algorithm is mainly calculated and encrypted by collecting the information digest of the file. The MD5 algorithm is used for encryption, a file can obtain a unique MD5 value, whether the file is correct or not can be determined through the MD5 value of the file, the MD5 value can be generated after the password is encrypted, therefore, the MD5 value of an image is used as a key value of the image, the key value of each image can be guaranteed to be unique, and a table is represented in a database.
In step S202, the protocol server adds the frequency of the image to the first database, and updates the timestamp corresponding to the key value in the second database.
When the key value identical to that of the image can be found in the first database, the image is transmitted to the protocol client through the remote desktop display channel at least once, and in order to reduce the data volume transmitted between the protocol server and the protocol client, the frequency of the image is only required to be added to the first database, and the timestamp corresponding to the key value in the second database is updated, so that the image can be used when the image is transmitted again in the following process.
In step S203, the protocol server determines to send the key value of the image to the protocol client, so that the protocol client performs display update.
After the database of the protocol server is updated, the key value of the image is transmitted to the protocol client through the remote desktop protocol, and the image is stored in the DBD database at least once, so that the corresponding image can be directly searched in the third database according to the key value of the image without decompression.
Example 3
Referring to fig. 3, a method for displaying a cache in a lossless mode based on a remote desktop protocol according to an embodiment of the present invention is described, which includes the following steps.
In step S301, the protocol server receives the image sent by the virtual machine, and acquires a key value of the image.
After the protocol server receives the image data sent by the virtual machine, the protocol server acquires an MD5 value of the image through an MD5 algorithm, and the MD5 value is used as a key value of the image.
The MD5 algorithm is mainly calculated and encrypted by collecting the information digest of the file. The MD5 algorithm is used for encryption, a file can obtain a unique MD5 value, whether the file is correct or not can be determined through the MD5 value of the file, the MD5 value can be generated after the password is encrypted, therefore, the MD5 value of an image is used as a key value of the image, the key value of each image can be guaranteed to be unique, and a table is represented in a database.
In step S302, the key value and frequency of the image are added to the first database, and the key value and corresponding timestamp are added to the second database.
When the key value of the image does not exist in the first database and the capacity of the first database is not full, the information of the image can be directly stored in the corresponding database. In this embodiment, the size of the table is 100, in other words, the minimum number of key values that can be stored in the database is 100, and if 100 key values are stored, the table is saturated. Since the BDB database is different from a general relational database, each database can only store one table, so the table at this time can be changed into a database, that is, the capacity of the database is 100.
Because the first database and the second database are synchronously stored, when the capacities of the first database and the second database are not saturated, the newly appeared image information can be directly stored into the corresponding databases. Specifically, a key value and a frequency of the image are added to a first database, and a key value and a corresponding timestamp are added to a second database.
In step S303, the protocol server determines to send the key value and the data stream of the image to the protocol client, so that the protocol client performs display update.
Since the image is transmitted and stored for the first time, the data stream needs to be transmitted to the protocol client in addition to the key value of the image, and the protocol client can analyze the data stream according to the remote desktop protocol, in other words, the remote desktop protocol client performs lossless decompression on the data stream to obtain a corresponding image. After decompression is finished, the decompressed image and the key value are stored in a third database, and when the image is transmitted and used again, the image can be searched by the BDB database and directly displayed at the protocol client.
Example 4
Referring to fig. 4, a method for displaying a cache in a lossless mode based on a remote desktop protocol according to an embodiment of the present invention is described, which includes the following steps.
In step S401, the protocol server receives the image sent by the virtual machine, and acquires a key value of the image.
After the protocol server receives the image data sent by the virtual machine, the protocol server acquires an MD5 value of the image through an MD5 algorithm, and the MD5 value is used as a key value of the image.
The MD5 algorithm is mainly calculated and encrypted by collecting the information digest of the file. The MD5 algorithm is used for encryption, a file can obtain a unique MD5 value, whether the file is correct or not can be determined through the MD5 value of the file, the MD5 value can be generated after the password is encrypted, therefore, the MD5 value of an image is used as a key value of the image, the key value of each image can be guaranteed to be unique, and a table is represented in a database.
In step S402, the image with the earliest timestamp is searched for in the second database according to the key value, the images are deleted in the first database and the second database, the key value and the frequency of the image are added to the first database, and the key value and the corresponding timestamp are added to the second database.
If the key value of the image does not exist in the first database, the capacity of the first database is full, and images with the frequency of 1 exist, the earliest stored image in the database needs to be deleted, so as to provide a storage space for new image data, and then the information of the image is stored in the corresponding database, thereby completing the updating of the database. When the image with the frequency of 1 exists, the information of the image is just stored in the database of the protocol server, and the corresponding decompressed image is not stored in the database of the protocol client. At this time, the data stream needs to be transmitted to the protocol client to decompress the image, and then the decompressed image is stored in a third database of the protocol client.
Specifically, the image data with the earliest timestamp is searched in the second database according to the corresponding key value, the data is deleted in the first database and the second database, the key value and the frequency of the image are added to the first database, and the key value and the corresponding timestamp are added to the second database.
In step S403, the protocol server determines to send the data stream of the image to the protocol client for the protocol client to perform display update.
At this time, the image is just inserted into the protocol server, and the corresponding decompressed picture is not stored in the third database of the protocol client. The protocol client analyzes the data stream sent by the protocol server according to the remote desktop protocol, and the remote desktop protocol client performs lossless decompression on the data stream to obtain a corresponding image. After decompression is finished, the decompressed image and the key value are stored in a third database, and when the image is transmitted and used again, the image can be searched by the BDB database and directly displayed at the protocol client.
Example 5
Referring to fig. 5, a method for displaying a cache in a lossless mode based on a remote desktop protocol according to an embodiment of the present invention is described, which includes the following steps.
In step S501, the protocol server receives the image sent by the virtual machine, and acquires a key value of the image.
After the protocol server receives the image data sent by the virtual machine, the protocol server acquires an MD5 value of the image through an MD5 algorithm, and the MD5 value is used as a key value of the image.
The MD5 algorithm is mainly calculated and encrypted by collecting the information digest of the file. The MD5 algorithm is used for encryption, a file can obtain a unique MD5 value, whether the file is correct or not can be determined through the MD5 value of the file, the MD5 value can be generated after the password is encrypted, therefore, the MD5 value of an image is used as a key value of the image, the key value of each image can be guaranteed to be unique, and a table is represented in a database.
In step S502, the protocol server determines to send the data stream of the image to the protocol client for the protocol client to perform display update.
At this time, the same key value as the image does not exist in the first database, the first database capacity is full, and the image with the frequency of 1 does not exist in the first database. The first database and the second database in the protocol server do not need to be updated, the protocol client analyzes the data stream sent by the protocol server according to the remote desktop protocol, and the remote desktop protocol client performs lossless decompression on the data stream to obtain a corresponding image. After decompression is finished, the decompressed image and the key value are stored in a third database, and when the image is transmitted and used again, the image can be searched by the BDB database and directly displayed at the protocol client.
Fig. 6 is a diagram illustrating an apparatus for displaying a cache in a lossless mode based on a remote desktop protocol according to an embodiment of the present invention.
In the embodiment of the present invention, the apparatus for display caching in lossless mode based on remote desktop protocol includes an obtaining module 601, a matching module 602, and an updating module 603.
The obtaining module 601 is configured to receive, by the protocol server, the image sent by the virtual machine, and obtain a key value of the image.
The matching module 602 is configured to match a key value of the protocol server based on the image with a key value stored in a first database, where the first database is configured in the protocol server.
The updating module 603 is configured to determine, by the protocol server, image data sent to the protocol client according to the matching result and the state of the first database, so that the protocol client performs display updating, where the image data includes at least one of an image key and an imaging data stream.
The update module 603 is further configured to: when the key value same as the image exists in the first database, the protocol server side adds the frequency of the image to the first database; updating a timestamp corresponding to the key value in a second database, wherein the second database is configured in the protocol server; and the protocol server side determines to send the key value of the image to the protocol client side.
The update module 603 is further configured to: when the key value identical to the image does not exist in the first database and the capacity of the first database is not full, adding the key value and the frequency of the image to the first database; adding the key value and the corresponding timestamp to the second database; and the protocol server side determines to send the key value and the data stream of the image to the protocol client side.
The update module 603 is further configured to: when the key value same as the image does not exist in the first database, the capacity of the first database is full, and the images with the frequency of 1 exist in the first database, searching the image with the earliest timestamp in the second database according to the key value, and deleting the images in the first database and the second database; adding the key values and the frequency of the images to a first database, and adding the key values and the corresponding timestamps to a second database; and the protocol server determines to send the data stream of the image to the protocol client.
The update module 603 is further configured to: and when the key value same as the image does not exist in the first database, the capacity of the first database is full, and the image with the frequency of 1 does not exist in the first database, the protocol server side determines to send the data stream of the image to the protocol client side.
The obtaining module 601 is further configured to: and the protocol server side acquires the MD6 value of the image through an MD6 algorithm as a key value of the image.
In the embodiment of the invention, the apparatus for displaying the cache in the lossless mode based on the remote desktop protocol further comprises a display module 604.
A display module 604, configured to, when the protocol client receives an image key value sent by the protocol server, obtain a corresponding image in a third database according to the key value, where the third database is configured in the protocol client; or when the protocol client receives the image data stream and/or the image key value sent by the protocol server, the image data stream is analyzed according to the remote desktop protocol to generate a decompressed image, and the decompressed image and the image key value are added to the third database.
FIG. 7 illustrates a hardware block diagram of a computing device 70 for display caching in lossless mode based on remote desktop protocol according to an embodiment of the present description. As shown in fig. 7, computing device 70 may include at least one processor 701, storage 702 (e.g., non-volatile storage), memory 703, and communication interface 704, and the at least one processor 701, storage 702, memory 703, and communication interface 704 are connected together via a bus 705. The at least one processor 701 executes at least one computer readable instruction stored or encoded in the memory 702.
It should be appreciated that the computer-executable instructions stored in the memory 702, when executed, cause the at least one processor 701 to perform the various operations and functions described above in connection with fig. 1-7 in the various embodiments of the present description.
In embodiments of the present description, computing device 70 may include, but is not limited to: personal computers, server computers, workstations, desktop computers, laptop computers, notebook computers, mobile computing devices, smart phones, tablet computers, cellular phones, Personal Digital Assistants (PDAs), handheld devices, messaging devices, wearable computing devices, consumer electronics, and so forth.
According to one embodiment, a program product, such as a machine-readable medium, is provided. A machine-readable medium may have instructions (i.e., elements described above as being implemented in software) that, when executed by a machine, cause the machine to perform various operations and functions described above in connection with fig. 1-7 in the various embodiments of the present specification. Specifically, a system or apparatus may be provided which is provided with a readable storage medium on which software program code implementing the functions of any of the above embodiments is stored, and causes a computer or processor of the system or apparatus to read out and execute instructions stored in the readable storage medium.
According to the method for displaying the cache in the lossless mode based on the remote desktop protocol and the application thereof, the BDB database can be established at the protocol server side and the protocol client side, and the picture with the highest frequency of display of the user in the daily office scene is recorded, so that the data volume transmitted between the server and the client side is reduced, the bandwidth is saved, and the corresponding picture can be displayed in the common scene without repeated decompression.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing descriptions of specific exemplary embodiments of the present invention have been presented for purposes of illustration and description. It is not intended to limit the invention to the precise form disclosed, and obviously many modifications and variations are possible in light of the above teaching. The exemplary embodiments were chosen and described in order to explain certain principles of the invention and its practical application to enable one skilled in the art to make and use various exemplary embodiments of the invention and various alternatives and modifications as are suited to the particular use contemplated. It is intended that the scope of the invention be defined by the claims and their equivalents.

Claims (11)

1. A method for displaying cache in lossless mode based on remote desktop protocol, the method comprising:
the protocol server receives an image sent by the virtual machine and acquires a key value of the image;
the protocol server matches key values stored in a first database based on the key values of the images, wherein the first database is configured in the protocol server; and
and the protocol server side determines image data sent to a protocol client side according to the matching result and the state of the first database so that the protocol client side can execute display updating, wherein the image data comprises at least one of an image key value and an imaging data stream.
2. The method for display caching in a lossless mode based on a remote desktop protocol according to claim 1, wherein the determining, by the protocol server, the image data to be sent to the protocol client according to the matching result and the state of the first database comprises:
when the key value same as the image exists in the first database, the protocol server side adds the frequency of the image to the first database;
updating a timestamp corresponding to the key value in a second database, wherein the second database is configured in the protocol server; and
and the protocol server side determines to send the key value of the image to a protocol client side.
3. The method for display caching in a lossless mode based on a remote desktop protocol according to claim 1, wherein the determining, by the protocol server, the image data to be sent to the protocol client according to the matching result and the state of the first database comprises:
when the same key value as the image does not exist in the first database and the capacity of the first database is not full, adding the key value and the frequency of the image to the first database;
adding the key value and corresponding timestamp to the second database; and
and the protocol server side determines to send the key value and the data stream of the image to a protocol client side.
4. The method for display caching in a lossless mode based on a remote desktop protocol according to claim 1, wherein the determining, by the protocol server, the image data to be sent to the protocol client according to the matching result and the state of the first database comprises:
when the key value same as the image does not exist in the first database, the capacity of the first database is full, and the image with the frequency of 1 exists in the first database, searching the image with the earliest time stamp in the second database according to the key value, and deleting the image in the first database and the second database;
adding the key values and the frequency of the images to the first database, and adding the key values and the corresponding timestamps to a second database; and
and the protocol server side determines to send the data stream of the image to a protocol client side.
5. The method for display caching in a lossless mode based on a remote desktop protocol according to claim 1, wherein the determining, by the protocol server, the image data to be sent to the protocol client according to the matching result and the state of the first database comprises:
and when the key value same as the image does not exist in the first database, the capacity of the first database is full, and the image with the frequency of 1 does not exist in the first database, the protocol server determines to send the data stream of the image to a protocol client.
6. The method for display caching in lossless mode based on remote desktop protocol of claim 1, wherein obtaining key values for the image comprises:
and the protocol server side acquires the MD5 value of the image through an MD5 algorithm as a key value of the image.
7. A method for displaying cache in lossless mode based on remote desktop protocol, the method comprising:
when the protocol client receives an image key value sent by the protocol server, acquiring a corresponding image in a third database according to the key value, wherein the third database is configured in the protocol client; or
When the protocol client receives the image data stream and/or the image key value sent by the protocol server, the image data stream is analyzed according to a remote desktop protocol to generate a decompressed image, and the decompressed image and the image key value are added to a third database.
8. An apparatus for display caching in lossless mode based on remote desktop protocol, the apparatus comprising:
the acquisition module is used for receiving the image sent by the virtual machine at the protocol server side and acquiring a key value of the image;
the matching module is used for matching the protocol server with key values stored in a first database based on the key values of the images, wherein the first database is configured in the protocol server; and
and the updating module is used for determining the image data sent to the protocol client by the protocol server according to the matching result and the state of the first database so as to enable the protocol client to execute display updating, wherein the image data comprises at least one of an image key value and an imaging data stream.
9. An apparatus for display caching in lossless mode based on remote desktop protocol, the apparatus comprising:
the display module is used for acquiring a corresponding image in a third database according to a key value when the protocol client receives the image key value sent by the protocol server, wherein the third database is configured in the protocol client; or
When the protocol client receives the image data stream and/or the image key value sent by the protocol server, the image data stream is analyzed according to a remote desktop protocol to generate a decompressed image, and the decompressed image and the image key value are added to a third database.
10. An electronic device, comprising:
at least one processor; and
a memory storing instructions that, when executed by the at least one processor, cause the at least one processor to perform the method of display caching in lossless mode based on a remote desktop protocol of any one of claims 1 to 7.
11. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the method for display caching in lossless mode based on remote desktop protocol according to any one of claims 1 to 7.
CN202111458145.2A 2021-12-01 2021-12-01 Method for displaying cache in lossless mode based on remote desktop protocol and application Pending CN114117283A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111458145.2A CN114117283A (en) 2021-12-01 2021-12-01 Method for displaying cache in lossless mode based on remote desktop protocol and application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111458145.2A CN114117283A (en) 2021-12-01 2021-12-01 Method for displaying cache in lossless mode based on remote desktop protocol and application

Publications (1)

Publication Number Publication Date
CN114117283A true CN114117283A (en) 2022-03-01

Family

ID=80365226

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111458145.2A Pending CN114117283A (en) 2021-12-01 2021-12-01 Method for displaying cache in lossless mode based on remote desktop protocol and application

Country Status (1)

Country Link
CN (1) CN114117283A (en)

Similar Documents

Publication Publication Date Title
CN111198859B (en) Data processing method, device, electronic equipment and computer readable storage medium
CN113553300B (en) File processing method and device, readable medium and electronic equipment
CN109885577B (en) Data processing method, device, terminal and storage medium
CN110909521A (en) Synchronous processing method and device for online document information and electronic equipment
CN107844488B (en) Data query method and device
CN112199923A (en) Identification generation method, system, device and medium based on distributed system
CN114780615A (en) Error code management method and device thereof
CN113347276B (en) Mobile access system based on GIS
CN112905587A (en) Database data management method and device and electronic equipment
CN109302449B (en) Data writing method, data reading device and server
US20110125709A1 (en) Bookkeeping of download timestamps
CN109558408B (en) Method and device for updating list, electronic equipment and readable storage medium
CN114117283A (en) Method for displaying cache in lossless mode based on remote desktop protocol and application
CN113821484A (en) File processing method and device, electronic equipment and readable storage medium
CN114282048A (en) Playing record warehousing method and device, storage medium and electronic equipment
CN109857719B (en) Distributed file processing method, device, computer equipment and storage medium
CN114238264A (en) Data processing method, data processing device, computer equipment and storage medium
JP5370552B2 (en) Image processing apparatus and program
CN114143486A (en) Video stream synchronization method and device, computer equipment and storage medium
CN112905575A (en) Data acquisition method, system, storage medium and electronic equipment
CN111291017A (en) Mirror image storage and extraction method and device of mirror image warehouse
CN112668033B (en) Data processing method and device and electronic equipment
CN110968265A (en) Fragmentation expansion method and device and electronic equipment
CN110545107A (en) data processing method and device, electronic equipment and computer readable storage medium
CN112486980A (en) Data storage method, data retrieval method, data storage device, data retrieval device, electronic equipment and computer-readable storage medium

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