WO2017088571A1 - Method and system for processing data of remote service for multiple sessions - Google Patents

Method and system for processing data of remote service for multiple sessions Download PDF

Info

Publication number
WO2017088571A1
WO2017088571A1 PCT/CN2016/099588 CN2016099588W WO2017088571A1 WO 2017088571 A1 WO2017088571 A1 WO 2017088571A1 CN 2016099588 W CN2016099588 W CN 2016099588W WO 2017088571 A1 WO2017088571 A1 WO 2017088571A1
Authority
WO
WIPO (PCT)
Prior art keywords
compressed
data
session
cache
application
Prior art date
Application number
PCT/CN2016/099588
Other languages
French (fr)
Chinese (zh)
Inventor
陈普
郑强
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2017088571A1 publication Critical patent/WO2017088571A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content
    • H04L67/5651Reducing the amount or size of exchanged application data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a data processing method and system for remote services under multiple sessions.
  • multi-session remote desktop service (English full name: Remote Desktop Services, English abbreviation: RDS) or application virtualization based on Windows (Windows) system has become very popular.
  • RDS Remote Desktop Services
  • application virtualization based on Windows (Windows) system has become very popular.
  • remotely related images are generally processed by a compression algorithm to save bandwidth.
  • the compression processing is the main consumption of the server.
  • the usual compression algorithms are: lossless algorithm compression such as zlib, lossy algorithm compression.
  • lossy algorithm compression Such as jpeg, video class compression algorithm compression such as H.264.
  • Embodiments of the present invention provide a data processing method and system for remote services under multi-session to improve server-side performance.
  • a first aspect of the present invention provides a data processing method for a remote service under a multi-session, in which a server for providing a remote service runs a cache management device and a plurality of sessions, and the first session is any one of the plurality of sessions.
  • the plurality of sessions can access the cache management device, and the cache management device includes a compressed data cache mapping module.
  • the method includes: acquiring data to be compressed of an application in the first session; and calculating the to-be-compressed a check value of the compressed data; querying, according to the check value of the data to be compressed, whether the compressed data corresponding to the data to be compressed exists in the compressed data cache mapping module; if the query result is exist, the query is performed The compressed data corresponding to the compressed data is returned to the application; if the query result is not present, the data to be compressed is compressed to obtain compressed data corresponding to the data to be compressed, and the data to be compressed is obtained. And compressing the compressed data corresponding to the data to be compressed into the compressed data cache mapping module, and compressing the data to be compressed The compressed data should be returned to the application.
  • the server for providing the remote service runs on the server including the compressed data cache.
  • the cache management device of the mapping module can access the cache management device by using multiple sessions running on the server.
  • the server first queries the compressed data cache mapping module by using the check value of the data to be compressed. If the corresponding compressed data already exists, the compressed data is directly obtained, and no compression processing is performed; if there is no corresponding compressed data, the compression processing is performed, and the obtained compressed data is stored in the compressed data cache mapping module.
  • Other session access so that only one compression is needed for the same data, deduplication calculation is implemented, and the same compression calculation processing is repeated for multiple sessions in the server, thereby improving the performance of the server.
  • the querying, according to the check value of the data to be compressed, whether the compressed data corresponding to the data to be compressed exists in the compressed data cache mapping module includes: according to the first Querying, in the compressed data cache mapping module, the compressed data corresponding to the data to be compressed, and the compressed data corresponding to the data to be compressed;
  • Compressing the data to be compressed includes: compressing the data to be compressed according to the compression type.
  • the cache management device is an encoding driver
  • the obtaining step may be performed by the first session, and other steps may be performed. Executed by the encoding driver.
  • the cache management device is an encoding driver, and the obtaining step and the calculating step may be performed by the first session, Other steps can be performed by the code driver.
  • the cache management device is an encoding driver
  • the storing step may be performed by an encoding driver
  • other steps may be performed by The first session is executed.
  • the advantage of calculating the check value in the session is that the logic of the application may have performed a check value such as a CRC value calculation on the image waiting compressed data, which is just used, which can reduce the resource overhead.
  • a second aspect of the present invention provides a multi-session remote service data processing system, wherein a server for providing a remote service runs a cache management device and a plurality of sessions, and the first session is any one of the plurality of sessions.
  • the plurality of sessions can access the cache management device, and the cache tube
  • the device includes: a compressed data cache mapping module; the system includes: an obtaining module, configured to acquire data to be compressed of the application in the first session; and a processing module, configured to calculate a check value of the data to be compressed; The check value of the data to be compressed is queried whether the compressed data corresponding to the data to be compressed exists in the compressed data cache mapping module; if the query result is present, the queried data to be compressed is correspondingly compressed.
  • the data is returned to the application; if the result of the query is not present, the data to be compressed is compressed to obtain compressed data corresponding to the data to be compressed, and the check value of the data to be compressed and the to-be-compressed
  • the compressed data corresponding to the data is stored in the compressed data cache mapping module, and the compressed data corresponding to the data to be compressed is returned to the application.
  • the processing module is further configured to: query the compressed data cache mapping according to a compression type required by an application in the first session and a check value of the data to be compressed. Whether the compressed data corresponding to the data to be compressed is compressed in the module; and the data to be compressed is compressed according to the compression type. Among them, by performing operations such as query and compression according to the type of compression, a more refined processing method is realized, which further satisfies the requirements of the application.
  • the cache management device is an encoding driver
  • the acquiring module is deployed in the first session, where The processing module is deployed in the encoding driver.
  • the cache management device is an encoding driver
  • the acquiring module is deployed in the first session
  • the processing module includes: a computing unit, a query unit, and an encoding unit, wherein the computing unit can be in the first session, and the query unit and the encoding unit can be deployed in the encoding driver.
  • the cache management device is a cache driver
  • the acquiring module is deployed in the first session
  • the processing module includes: a computing unit, a query unit, a coding unit, and a storage unit, wherein the computing unit, the query unit, and the encoding unit are deployable in the first session, and the storage unit is deployable in the encoding driver.
  • the benefits of calculating checksums in a session are: applied
  • the logic may have performed a check value such as a CRC value calculation on the image waiting compressed data, which is just utilized, which can reduce resource overhead.
  • a third aspect of the present invention provides a computer device including a processor, a memory, and a bus; the memory is configured to store a program, and the processor is connected to the memory through the bus, when the computer device In operation, the processor executes the program stored by the memory to cause the computer device to perform a data processing method of a multi-session remote service as described in the first aspect of the invention.
  • a cache management device is shared by multiple sessions, and compressed data applied in each session is saved in the cache management device for sharing by each session, thereby, for the same data. Only one compression is needed to satisfy the use of multiple sessions, and the deduplication calculation is implemented, which avoids the repeated compression calculation processing of multiple sessions in the server, and improves the performance of the server.
  • Figure 1 is a system architecture of a remote desktop/remote application service implementation under Windows multi-session
  • FIG. 2 is a system architecture diagram of a server in an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart of a data processing method for a remote service under multi-session according to an embodiment of the present invention
  • FIG. 4 is a system architecture diagram of a server in the first scenario of the present invention.
  • FIG. 5 is a system architecture diagram of a server in the second example of the present invention.
  • FIG. 6 is a system architecture diagram of a server in the third example of the present invention.
  • FIG. 7 is a schematic structural diagram of a data processing system for remote services under multi-session according to an embodiment of the present invention.
  • the technical solution of the embodiment of the present invention is applied to a server for providing a remote service
  • the server may be a server based on a Windows system, a server based on a Linux system, or a server based on other systems.
  • the remote services include remote desktop services and remote application services.
  • a Windows server can provide remote desktop services by using RDS functions, or can provide remote application services by using application virtualization functions.
  • Remote Desktop Services The technical principle of Remote Desktop Services is that multiple sessions are run on the server, and one user can remotely log in to one of the sessions on the client and run the application on that server.
  • the server passes the graphical user interface to the client, which passes the user's input back to the server.
  • Remote Desktop Services you can provide the entire desktop environment to the user, or you can provide separate applications and data to the user. From the user's perspective, these applications are seamlessly integrated—the interface, feel, and behavior are the same as native programs.
  • the technical principle of application virtualization is to isolate the human-computer interaction logic of the application from the computational logic.
  • the user computer When a user accesses a server-virtualized application, the user computer only needs to transfer the human-computer interaction logic to the server.
  • the server-side provides a separate session space for the user, and the application computing logic runs in the session space. Subsequent human-computer interaction logic is passed to the client and displayed on the client's corresponding device, giving the user the same access experience as running a local application.
  • the system architecture of the server (Server) display in the remote desktop/remote application service implementation process under Windows multi-session is simply shown.
  • Windows Server runs multiple sessions (Session), respectively.
  • Session sessions
  • session 2 means that n is a positive integer.
  • Multiple applications can be run in the Session, which are represented by applications 1, 2, 3, and so on.
  • the embodiment of the present invention provides a data processing method and system for remote services under multiple sessions.
  • the detailed description will be respectively made below through specific embodiments.
  • a first embodiment of the present invention provides a data processing method for a remote service under multi-session, which is used to provide a server for a remote service, where the remote service includes at least one of a remote desktop service and a remote application service.
  • a cache management device and a plurality of sessions are run in the server, the multiple sessions include a first session, and the first session is any one of the multiple sessions, and the multiple sessions can be accessed.
  • the cache management device includes a compressed data cache mapping module.
  • the compressed data cache mapping module stores the compressed data, and each session can call the cache management device to access the compressed data cache mapping module.
  • Each session can be provided to a user who can remotely log in to the server-provided session at the client and operate the application in the server session as if it were a local application.
  • the compressed data stored in the compressed data cache mapping module is compressed data corresponding to the data to be compressed of the application of multiple sessions.
  • a data processing method for a remote service in a multi-session may include:
  • one compressed data may have compressed data of a plurality of different compression types. Therefore, the check value of one data to be compressed may correspond to compressed data of a plurality of different compression types of data to be compressed.
  • the server also obtains the response in the first session in this step.
  • the required compression type such as lossless algorithm compression such as zlib, lossy algorithm compression such as jpeg, video class compression algorithm compresses compression types such as H.264.
  • the check value may specifically adopt a Cyclic Redundancy Check (CRC) value.
  • CRC Cyclic Redundancy Check
  • Other types of check values may also be employed in other embodiments. As long as it can be used for unique identification of compressed data, the specific type of check value is not limited in this paper.
  • the data to be compressed in this paper may be data in various formats such as images, videos, and texts, and the main data is image data.
  • the compressed data generated by each session in the server is uniformly stored in the compressed data cache mapping module.
  • the check value of the data to be compressed of the application in the first session is calculated, the check value is used in the compressed data cache mapping module to query whether the data to be compressed is already present. Compressed data.
  • the compressed data cache mapping module generally needs to save the compressed data and the corresponding check value, that is, not only the check value and the compressed data but also the check value and the Correspondence of compressed data.
  • the compressed data cache mapping module can exist in the form of a mapping table.
  • the cache management device can manage the mapping table. Please refer to Table 1 below for a schematic diagram of a mapping table.
  • the query operation of this step can be performed, for example, by the cache management device. Due to the need to maintain independence between sessions, a session is typically not allowed to directly access a common storage space such as the mapping table. However, the plurality of sessions can access the cache management device, and the cache management device performs an access operation on the mapping table.
  • the cache management device can be A driver is implemented.
  • the cache management device may be implemented by a driver, or may be implemented by a user state process, and may be other implementation manners. The specific implementation manner of the cache management device is not limited. .
  • the compression type required by the application in the first session and the verification of the data to be compressed may be specifically And queried whether the compressed data corresponding to the compressed data of the compression type exists in the compressed data cache mapping module.
  • the cache management apparatus may include a plurality of compressed data cache mapping modules, wherein each compressed data cache mapping module is configured to store compressed data of a compressed type, such as shown in FIG. 2, compressed data cache mapping.
  • Module 1 and compressed data cache mapping module 2 are respectively used to store compressed data of different compression types.
  • the compressed data corresponding to the data to be compressed is queried in the compressed data cache mapping module, so that the data to be compressed in the first session may not be compressed, but the query is directly
  • the compressed data corresponding to the data to be compressed is returned to the application in the first session.
  • the data to be compressed is compressed to obtain the compressed data corresponding to the data to be compressed, and the check value of the data to be compressed and the data to be compressed are compressed.
  • the data is stored in the compressed data cache mapping module, and the obtained compressed data corresponding to the to-be-compressed data is returned to the application.
  • the compression type compresses the data to be compressed.
  • the storing the data to be compressed and the compressed data corresponding to the data to be compressed are stored in the compressed data cache mapping module, which may be: verifying the data to be compressed.
  • the value and the compressed data of the data to be compressed, and the correspondence between the check value and the compressed data are stored in the compressed data cache mapping module.
  • a server for providing a remote service runs a cache management device including a compressed data cache mapping module, and multiple sessions running on the server can access the cache management device, when a certain session needs
  • the server first queries the compressed data cache mapping module by using the check value of the data to be compressed, and if the corresponding compressed data already exists, the compressed data is directly obtained, and no compression processing is performed; if there is no corresponding Compressing the data, performing compression processing, and the obtained compressed data is stored in the compressed data cache mapping module for other sessions to access, so that only one compression is needed for the same data, and the deduplication calculation is realized, which avoids the server.
  • Multiple sessions repeat the same compression calculation process, improving server-side performance.
  • Each session can run a remote display module (Remote Display Model), the remote display module is used to achieve interaction with the client, the human-computer interaction logic performed by the user at the client.
  • the remote display module is passed to the session, and the corresponding display logic is executed by the remote display module.
  • the method of the embodiment of the present invention can be completed by a cooperation of a remote display module and a code driver. among them,
  • the remote display module in the first session acquires data to be compressed of the application in the first session
  • the encoding driver calculates a check value of the data to be compressed according to the check value of the data to be compressed, and queries whether the compressed data corresponding to the data to be compressed exists in the compressed data cache mapping module; If yes, the compressed data corresponding to the data to be compressed is returned to the application; if the result of the query is not present, the data to be compressed is compressed to obtain compressed data corresponding to the data to be compressed. And storing the check value of the data to be compressed and the compressed data corresponding to the data to be compressed into the compressed data cache mapping module, and returning the compressed data corresponding to the to-be-compressed data to the Application.
  • the interface function is actually called into the encoding driver (the encoding driver can be a Windows Driver that can be accessed by multiple sessions).
  • the data to be compressed is calculated by the CRC value (or other check value indicating uniqueness), and the CRC value is used to query from the compressed data cache mapping module whether the compressed data corresponding to the data to be compressed already exists.
  • the Compression Cache Map stores the CRC value of the data to be compressed and the corresponding compressed data. Since there may be multiple compression algorithms when compressing, multiple Compression Cache Maps may be used to cache different compression algorithms.
  • the compressed data can also be used in a Compression Cache Map.
  • a CRC corresponds to compressed data of multiple different compression types. In fact, developers can easily implement different data structures.
  • Branch 1 query to the existence of the corresponding compressed data, perform the following steps:
  • the encoding drive The compressed data obtained by the query is obtained from the compressed data cache mapping module.
  • the encoding driver directly returns the queried compressed data to the interface function called by the remote display module, and returns the compressed data to the application in the first session through the interface function.
  • Branch 2 the result of the query is that there is no corresponding compressed data, then perform the following steps:
  • the encoding driver compresses the data to be compressed to obtain compressed data.
  • the encoding driver stores the check value with the compressed data and the obtained compressed data into the compressed data cache mapping module.
  • the compressed data cache mapping module has a certain size.
  • a certain algorithm such as the “most recently used” algorithm, may be used to delete the old data. Store new data.
  • the encoding driver obtains the compressed data obtained by the compression.
  • the above Encode Driver is currently the most suitable driver for Windows kernel mode, because the driver can accept multiple session access, but in fact it is possible as a user state process.
  • the cache management device can also be implemented by a common shared memory and global pipe communication technology.
  • FIG. 5 shows another multi-session system architecture and data processing flow of Windows Server.
  • the step of calculating the check value in the example of this scenario is performed from the encoding driver and is changed to be executed in the session.
  • the remote display module in the first session acquires data to be compressed of the application in the first session, and calculates a check value of the data to be compressed.
  • the encoding driver queries whether the compressed data corresponding to the data to be compressed exists in the compressed data cache mapping module according to the check value of the data to be compressed; if the query result is existing, the queried to be compressed The compressed data corresponding to the data is returned to the application; if the query result is non-existent, the encoding driver compresses the data to be compressed to obtain compressed data corresponding to the data to be compressed, and the data to be compressed And the compressed data corresponding to the data to be compressed is stored in the compressed data cache mapping module, and the obtained data to be compressed is obtained. The corresponding compressed data is returned to the application.
  • the advantage of calculating the check value in the application logic in this scenario is that the logic of the application may have calculated the CRC value of the image, which is just used, which can reduce the resource overhead.
  • FIG. 6 shows another multi-session system architecture and data processing flow of Windows Server.
  • the cache management device is specifically a cache driver (Cache Driver), and other parts are the same as the scenario example 1, and details are not described herein again.
  • the remote display module in the first session acquires data to be compressed of the application in the first session, calculates a check value of the data to be compressed, and queries the compressed data cache according to the check value of the data to be compressed. Whether the compressed data corresponding to the to-be-compressed data exists in the mapping module; if the query result is the presence, the compressed data corresponding to the to-be-compressed data that is queried is obtained from the cache driver, and the to-be-compressed query is obtained. The compressed data corresponding to the data is returned to the application; if the result of the query is not present, the data to be compressed is compressed to obtain compressed data corresponding to the data to be compressed, and the obtained data to be compressed is corresponding. The compressed data is returned to the application;
  • the cache driver stores the check value of the data to be compressed and the compressed data corresponding to the data to be compressed into the compressed data cache mapping module.
  • the Compression API calls the query data for the presence of the interface function (Check data exist API).
  • the Check data exist API queries whether the compressed data corresponding to the CRC value already exists in the compressed data cache mapping module of the cache driver according to the CRC value of the data to be compressed.
  • Branch 1 query to the existence of the corresponding compressed data, perform the following steps:
  • the Get data API calls the cache driver to obtain the compressed data from the cache driver.
  • the Get data API returns the obtained compressed data to the compression interface function, and returns the compressed data to the application in the first session through the compression interface function.
  • Branch 2 the result of the query is that there is no corresponding compressed data, then perform the following steps:
  • the Check data exist API instructs the Encode data module in the remote display module to compress the data to be compressed to obtain compressed data.
  • the Set data API stores the compressed data obtained by the compression into the compressed data cache mapping module.
  • the Encode data module returns the compressed data obtained by the compression to the compression interface function, and returns the compressed data to the application in the first session through the compression interface function.
  • Cache storage can make pure memory, or it may be added SSD to do secondary cache.
  • Distributed storage may also help Cache. This approach should have a good effect on a single business scenario, and application virtualization is originally designed to deal with such scenarios, such as video education (seeing things almost), especially online multi-user real-time distance education, screen The content may be many the same.
  • an embodiment of the present invention provides a data processing system for a remote service in a multi-session, in which a server for providing a remote service runs a cache management device and a plurality of sessions, where the first session is in the multiple sessions. Any of the sessions, the plurality of sessions can access the cache management device, the cache management device includes a compressed data cache mapping module; the system can include:
  • the obtaining module 701 is configured to acquire data to be compressed of an application in the first session.
  • the processing module 702 is configured to calculate a check value of the data to be compressed, and query whether the compressed data corresponding to the data to be compressed exists in the compressed data cache mapping module according to the check value of the data to be compressed; If the query result is not present, the compressed data corresponding to the data to be compressed is returned to the application; if the query result is not exist, the data to be compressed is compressed, and the corresponding data to be compressed is obtained. Compressing data, storing the check value of the data to be compressed and the compressed data corresponding to the data to be compressed into the compressed data cache mapping module, and returning the compressed data corresponding to the data to be compressed to the Application.
  • the processing module 702 is further configured to: query the compressed data cache mapping according to a compression type required by an application in the first session and a check value of the data to be compressed. Whether the compressed data corresponding to the data to be compressed is compressed in the module; and the data to be compressed is compressed according to the compression type.
  • the cache management device is specifically an encoding driver
  • the obtaining module 701 is deployed in the first session
  • the processing module 702 is deployed in the encoding driver; wherein, please refer to 4, the processing module 702 can include:
  • a coding unit configured to compress the data to be compressed to obtain compressed data corresponding to the data to be compressed if the result of the query is not present
  • the cache management device is specifically an encoding driver, and the obtaining module 701 is deployed in the first session.
  • the processing module 702 may include:
  • a calculating unit configured to calculate a check value of the data to be compressed, in the first session
  • the query unit is deployed in the encoding driver, and is configured to query, according to the check value of the data to be compressed, whether the compressed data corresponding to the data to be compressed exists in the compressed data cache mapping module; if the query result is And returning the compressed data corresponding to the to-be-compressed data to the application;
  • a coding unit configured to be used in the coding driver, to compress the data to be compressed to obtain compressed data corresponding to the data to be compressed if the query result is not present;
  • the query unit is further configured to: when the query result is non-existent, store the check value of the data to be compressed and the compressed data corresponding to the data to be compressed into the compressed data cache mapping module, and The compressed data corresponding to the compressed data is returned to the application.
  • the cache management device is specifically a cache driver, and the obtaining module 701 is deployed in the first session.
  • the processing module 702 may include:
  • a calculating unit configured to calculate a check value of the data to be compressed, in the first session
  • the query unit is deployed in the first session, and is configured to query, according to the check value of the data to be compressed, whether the compressed data corresponding to the data to be compressed exists in the compressed data cache mapping module;
  • the compressed data corresponding to the to-be-compressed data that is queried is obtained from the cache driver, and the compressed data corresponding to the queried data to be compressed is returned to the application;
  • a coding unit configured to be used in the first session, to compress the data to be compressed if the result of the query is not present, to obtain the compressed data corresponding to the data to be compressed;
  • a storage unit configured to store the check value of the data to be compressed and the compressed data corresponding to the data to be compressed into the compressed data cache mapping module;
  • the query unit is further configured to: when the query result is non-existent, return the compressed data corresponding to the data to be compressed to the application.
  • an embodiment of the present invention further provides a computer device 800, which may include:
  • the memory 803 is configured to store a program 805, the processor 801 is connected to the memory 803 via the bus 804, and when the computer device 800 is running, the processor 801 executes the
  • the program 805 is configured to cause the computer device 800 to perform a data processing method of a multi-session remote desktop or remote application service as described in the above method embodiments.
  • the computer device 800 may further include a communication interface 802 for receiving and transmitting data.
  • the bus 804 may be an Industry Standard Architecture (ISA) bus or a Peripheral Component (PCI) bus or an Extended Industry Standard Architecture (abbreviated as an Extended Industry Standard Architecture). EISA) bus and so on.
  • ISA Industry Standard Architecture
  • PCI Peripheral Component
  • EISA Extended Industry Standard Architecture
  • the bus can be divided into one or more of an address bus, a data bus, and a control bus. For ease of representation, only one thick line is shown in Figure 8, but it does not mean that there is only one bus or one type of bus.
  • the memory 803 is configured to store executable program code, the program code including computer operating instructions.
  • the memory 803 may include a high speed RAM (Ramdom Access Memory) memory.
  • the memory 803 may further include a non-volatile memory.
  • the memory 803 can include a disk storage.
  • a computer device which can implement the data processing method of the multi-session remote desktop or remote application service provided by the foregoing method embodiment, and obtain The technical effect of the method embodiment.
  • Embodiments of the present invention also provide a computer readable storage medium storing one or more programs, the one or more programs including instructions that, when executed by a computer device including one or more processors The computer device performs a data processing method of a remote desktop or remote application service under multi-session as provided by the method embodiment above.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of cells is only a logical function division.
  • multiple units or components may be combined or integrated. Go to another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, ie may be located in one place, or It can also be distributed to multiple network elements. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • An integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, can be stored in a computer readable storage medium.
  • the technical solution of the present invention which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Information Transfer Between Computers (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

A method and system for processing data of a remote service for multiple sessions for improving the performance at a server end. The method of the present invention comprises: acquiring data to be compressed of an application in a first session; calculating a validation value of the data to be compressed; querying whether compressed data corresponding to the data to be compressed exists in a compressed data caching and mapping module according to the validation value of the data to be compressed; if so, returning the found compressed data corresponding to the data to be compressed to the application; if not, compressing the data to be compressed to obtain the compressed data corresponding to the data to be compressed, storing the validation value of the data to be compressed and the compressed data corresponding to the data to be compressed to the compressed data caching and mapping module, and returning the compressed data corresponding to the data to be compressed to the application.

Description

一种多会话下远程服务的数据处理方法和系统Data processing method and system for remote service under multi-session 技术领域Technical field
本发明涉及通信技术领域,具体涉及一种多会话下远程服务的数据处理方法和系统。The present invention relates to the field of communications technologies, and in particular, to a data processing method and system for remote services under multiple sessions.
背景技术Background technique
目前基于Windows(视窗)系统的多会话远程桌面服务(英文全称:Remote Desktop Services,英文简称:RDS)或应用虚拟化已经非常普及。远程桌面服务或应用虚拟化服务中,远程相关的图像一般会经过压缩算法的处理来节省带宽,压缩的处理是服务器端的主要消耗,通常的压缩算法有:无损算法压缩如zlib,有损算法压缩如jpeg,视频类压缩算法压缩如H.264等。At present, multi-session remote desktop service (English full name: Remote Desktop Services, English abbreviation: RDS) or application virtualization based on Windows (Windows) system has become very popular. In the remote desktop service or application virtualization service, remotely related images are generally processed by a compression algorithm to save bandwidth. The compression processing is the main consumption of the server. The usual compression algorithms are: lossless algorithm compression such as zlib, lossy algorithm compression. Such as jpeg, video class compression algorithm compression such as H.264.
实践发现,由于服务器端存在多个会话,每个会话都在处理这些压缩相关的任务,不同会话中的数据可能是重复的,压缩任务在做重复的计算,导致服务器端性能比较低下。Practice has found that because there are multiple sessions on the server side, each session is processing these compression-related tasks, the data in different sessions may be duplicated, and the compression tasks are doing repeated calculations, resulting in relatively low server-side performance.
发明内容Summary of the invention
本发明实施例提供一种多会话下远程服务的数据处理方法和系统,以提高服务器端的性能。Embodiments of the present invention provide a data processing method and system for remote services under multi-session to improve server-side performance.
本发明第一方面提供一种多会话下远程服务的数据处理方法,用于提供远程服务的服务器中运行有缓存管理装置和多个会话,第一会话是所述多个会话中的任一会话,所述多个会话都能访问所述缓存管理装置,所述缓存管理装置包括压缩数据缓存映射模块;所述方法包括:获取所述第一会话中的应用的待压缩数据;计算所述待压缩数据的校验值;根据所述待压缩数据的校验值查询所述压缩数据缓存映射模块中是否存在所述待压缩数据对应的被压缩数据;若查询结果为存在,将查询到的所述待压缩数据对应的被压缩数据返回给所述应用;若查询结果为不存在,对所述待压缩数据进行压缩,得到所述待压缩数据对应的被压缩数据,将所述待压缩数据的校验值和所述待压缩数据对应的被压缩数据存储到所述压缩数据缓存映射模块中,并将所述待压缩数据对应的被压缩数据返回给所述应用。A first aspect of the present invention provides a data processing method for a remote service under a multi-session, in which a server for providing a remote service runs a cache management device and a plurality of sessions, and the first session is any one of the plurality of sessions. The plurality of sessions can access the cache management device, and the cache management device includes a compressed data cache mapping module. The method includes: acquiring data to be compressed of an application in the first session; and calculating the to-be-compressed a check value of the compressed data; querying, according to the check value of the data to be compressed, whether the compressed data corresponding to the data to be compressed exists in the compressed data cache mapping module; if the query result is exist, the query is performed The compressed data corresponding to the compressed data is returned to the application; if the query result is not present, the data to be compressed is compressed to obtain compressed data corresponding to the data to be compressed, and the data to be compressed is obtained. And compressing the compressed data corresponding to the data to be compressed into the compressed data cache mapping module, and compressing the data to be compressed The compressed data should be returned to the application.
该技术方案中,用于提供远程服务的服务器上运行有包括压缩数据缓存 映射模块的缓存管理装置,服务器上运行的多个会话都能访问该缓存管理装置,当某个会话需要压缩数据时,服务器先利用待压缩数据的校验值查询该压缩数据缓存映射模块,如果已经存在对应的被压缩数据就直接获取该被压缩数据,不再进行压缩处理;如果不存在对应的被压缩数据,则进行压缩处理,且得到的被压缩数据存储到压缩数据缓存映射模块中供其它会话访问,这样,对于同一数据只需要进行一次压缩即可,实现了去重计算,避免了服务器中多个会话重复进行相同的压缩计算处理,提高了服务器端的性能。In the technical solution, the server for providing the remote service runs on the server including the compressed data cache. The cache management device of the mapping module can access the cache management device by using multiple sessions running on the server. When a session needs to compress data, the server first queries the compressed data cache mapping module by using the check value of the data to be compressed. If the corresponding compressed data already exists, the compressed data is directly obtained, and no compression processing is performed; if there is no corresponding compressed data, the compression processing is performed, and the obtained compressed data is stored in the compressed data cache mapping module. Other session access, so that only one compression is needed for the same data, deduplication calculation is implemented, and the same compression calculation processing is repeated for multiple sessions in the server, thereby improving the performance of the server.
在第一种可能的实现方式中,所述根据所述待压缩数据的校验值查询所述压缩数据缓存映射模块中是否存在所述待压缩数据对应的被压缩数据包括:根据所述第一会话中的应用要求的压缩类型和所述待压缩数据的校验值,查询所述压缩数据缓存映射模块中是否存在所述压缩类型的、所述待压缩数据对应的被压缩数据;所述对所述待压缩数据进行压缩包括:按照所述压缩类型对所述待压缩数据进行压缩。其中,通过按照压缩类型进行查询和压缩等操作,可以实现更加精细化的处理方式,进一步满足应用的具体需求。In a first possible implementation manner, the querying, according to the check value of the data to be compressed, whether the compressed data corresponding to the data to be compressed exists in the compressed data cache mapping module includes: according to the first Querying, in the compressed data cache mapping module, the compressed data corresponding to the data to be compressed, and the compressed data corresponding to the data to be compressed; Compressing the data to be compressed includes: compressing the data to be compressed according to the compression type. Among them, by performing operations such as query and compression according to the type of compression, a more refined processing manner can be realized, which further satisfies the specific needs of the application.
结合第一方面或者第一方面的第一种可能的实现方式,在第二种可能的实现方式中,所述缓存管理装置为编码驱动,所述获取步骤可以由第一会话执行,其它步骤可以由编码驱动执行。With reference to the first aspect or the first possible implementation manner of the first aspect, in a second possible implementation manner, the cache management device is an encoding driver, the obtaining step may be performed by the first session, and other steps may be performed. Executed by the encoding driver.
结合第一方面或者第一方面的第一种可能的实现方式,在第三种可能的实现方式中,所述缓存管理装置为编码驱动,所述获取步骤和计算步骤可以由第一会话执行,其它步骤可以由编码驱动执行。With reference to the first aspect or the first possible implementation manner of the first aspect, in a third possible implementation manner, the cache management device is an encoding driver, and the obtaining step and the calculating step may be performed by the first session, Other steps can be performed by the code driver.
结合第一方面或者第一方面的第一种可能的实现方式,在第四种可能的实现方式中,所述缓存管理装置为编码驱动,所述存储步骤可以由编码驱动执行,其它步骤可以由第一会话执行。With reference to the first aspect or the first possible implementation manner of the first aspect, in a fourth possible implementation, the cache management device is an encoding driver, the storing step may be performed by an encoding driver, and other steps may be performed by The first session is executed.
在以上几种实现方式中,可以根据具体情境配置在会话中执行哪些操作,在缓存管理装置中执行哪些操作,从而满足更加灵活的实际需求。例如,在会话中里面计算校验值的好处在于:应用的逻辑可能已经对图片等待压缩数据进行了校验值例如CRC值计算,正好加以利用,这样可以降低资源开销。In the above implementation manners, it is possible to configure which operations are performed in the session according to the specific context, and which operations are performed in the cache management device, thereby satisfying more flexible actual requirements. For example, the advantage of calculating the check value in the session is that the logic of the application may have performed a check value such as a CRC value calculation on the image waiting compressed data, which is just used, which can reduce the resource overhead.
本发明第二方面提供一种多会话下远程服务的数据处理系统,用于提供远程服务的服务器中运行有缓存管理装置和多个会话,第一会话是所述多个会话中的任一会话,所述多个会话都能访问所述缓存管理装置,所述缓存管 理装置包括压缩数据缓存映射模块;所述系统包括:获取模块,用于获取所述第一会话中的应用的待压缩数据;处理模块,用于计算所述待压缩数据的校验值;根据所述待压缩数据的校验值查询所述压缩数据缓存映射模块中是否存在所述待压缩数据对应的被压缩数据;若查询结果为存在,将查询到的所述待压缩数据对应的被压缩数据返回给所述应用;若查询结果为不存在,对所述待压缩数据进行压缩,得到所述待压缩数据对应的被压缩数据,将所述待压缩数据的校验值和所述待压缩数据对应的被压缩数据存储到所述压缩数据缓存映射模块中,并将所述待压缩数据对应的被压缩数据返回给所述应用。A second aspect of the present invention provides a multi-session remote service data processing system, wherein a server for providing a remote service runs a cache management device and a plurality of sessions, and the first session is any one of the plurality of sessions. The plurality of sessions can access the cache management device, and the cache tube The device includes: a compressed data cache mapping module; the system includes: an obtaining module, configured to acquire data to be compressed of the application in the first session; and a processing module, configured to calculate a check value of the data to be compressed; The check value of the data to be compressed is queried whether the compressed data corresponding to the data to be compressed exists in the compressed data cache mapping module; if the query result is present, the queried data to be compressed is correspondingly compressed. The data is returned to the application; if the result of the query is not present, the data to be compressed is compressed to obtain compressed data corresponding to the data to be compressed, and the check value of the data to be compressed and the to-be-compressed The compressed data corresponding to the data is stored in the compressed data cache mapping module, and the compressed data corresponding to the data to be compressed is returned to the application.
在第一种可能的实现方式中,所述处理模块,还用于:根据所述第一会话中的应用要求的压缩类型和所述待压缩数据的校验值,查询所述压缩数据缓存映射模块中是否存在所述压缩类型的、所述待压缩数据对应的被压缩数据;按照所述压缩类型对对所述待压缩数据进行压缩。其中,通过按照压缩类型进行查询和压缩等操作,实现更加精细化的处理方式,进一步满足应用的需求。In a first possible implementation manner, the processing module is further configured to: query the compressed data cache mapping according to a compression type required by an application in the first session and a check value of the data to be compressed. Whether the compressed data corresponding to the data to be compressed is compressed in the module; and the data to be compressed is compressed according to the compression type. Among them, by performing operations such as query and compression according to the type of compression, a more refined processing method is realized, which further satisfies the requirements of the application.
结合第二方面或者第二方面的第一种可能的实现方式,在第二种可能的实现方式中,所述缓存管理装置为编码驱动,所述获取模块部署在所述第一会话中,所述处理模块部署在所述编码驱动中。With reference to the second aspect, or the first possible implementation manner of the second aspect, in a second possible implementation manner, the cache management device is an encoding driver, and the acquiring module is deployed in the first session, where The processing module is deployed in the encoding driver.
结合第二方面或者第二方面的第一种可能的实现方式,在第三种可能的实现方式中,所述缓存管理装置为编码驱动,所述获取模块部署在所述第一会话中;所述处理模块包括:计算单元,查询单元,编码单元,其中,计算单元可在所述第一会话中,查询单元和编码单元可部署在所述编码驱动中。With the second aspect or the first possible implementation of the second aspect, in a third possible implementation, the cache management device is an encoding driver, and the acquiring module is deployed in the first session; The processing module includes: a computing unit, a query unit, and an encoding unit, wherein the computing unit can be in the first session, and the query unit and the encoding unit can be deployed in the encoding driver.
结合第二方面或者第二方面的第一种可能的实现方式,在第四种可能的实现方式中,所述缓存管理装置为缓存驱动,所述获取模块部署在所述第一会话中,所述处理模块包括:计算单元,查询单元,编码单元,存储单元,其中,计算单元,查询单元和编码单元可部署在所述第一会话中,存储单元可部署在所述编码驱动中。With reference to the second aspect, or the first possible implementation manner of the second aspect, in a fourth possible implementation, the cache management device is a cache driver, and the acquiring module is deployed in the first session, where The processing module includes: a computing unit, a query unit, a coding unit, and a storage unit, wherein the computing unit, the query unit, and the encoding unit are deployable in the first session, and the storage unit is deployable in the encoding driver.
在以上几种实现方式中,可以根据具体情境配置在会话中配置哪些单元,执行哪些操作,在缓存管理装置中配置哪些单元,执行哪些操作,从而满足更加灵活的实际需求。例如,在会话中里面计算校验值的好处在于:应用的 逻辑可能已经对图片等待压缩数据进行了校验值例如CRC值计算,正好加以利用,这样可以降低资源开销。In the above implementation manners, it is possible to configure which units are configured in the session, which operations are performed, which units are configured in the cache management device, and which operations are performed according to the specific context, thereby satisfying more flexible actual requirements. For example, the benefits of calculating checksums in a session are: applied The logic may have performed a check value such as a CRC value calculation on the image waiting compressed data, which is just utilized, which can reduce resource overhead.
本发明第三方面提供一种计算机设备,所述计算机设备包括处理器、存储器、总线;所述存储器用于存储程序,所述处理器与所述存储器通过所述总线连接,当所述计算机设备运行时,所述处理器执行所述存储器存储的所述程序,以使所述计算机设备执行如本发明第一方面所述的多会话下远程服务的数据处理方法。A third aspect of the present invention provides a computer device including a processor, a memory, and a bus; the memory is configured to store a program, and the processor is connected to the memory through the bus, when the computer device In operation, the processor executes the program stored by the memory to cause the computer device to perform a data processing method of a multi-session remote service as described in the first aspect of the invention.
由上可见,在本发明的一些可行的实施方式中,通过多个会话共用一个缓存管理装置,各个会话中应用的压缩数据都保存在该缓存管理装置中供各个会话共享,从而,对于同一数据只需要进行一次压缩即可满足多个会话的使用,实现了去重计算,避免了服务器中多个会话重复进行相同的压缩计算处理,提高了服务器端的性能。It can be seen that, in some feasible implementation manners of the present invention, a cache management device is shared by multiple sessions, and compressed data applied in each session is saved in the cache management device for sharing by each session, thereby, for the same data. Only one compression is needed to satisfy the use of multiple sessions, and the deduplication calculation is implemented, which avoids the repeated compression calculation processing of multiple sessions in the server, and improves the performance of the server.
附图说明DRAWINGS
为了更清楚地说明本发明实施例技术方案,下面将对实施例和现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments and the prior art description will be briefly described below. Obviously, the drawings in the following description are only some implementations of the present invention. For example, other drawings may be obtained from those skilled in the art without any inventive effort.
图1是Windows多会话下远程桌面/远程应用服务实现的系统架构;Figure 1 is a system architecture of a remote desktop/remote application service implementation under Windows multi-session;
图2是本发明一个实施例中服务器的系统架构图;2 is a system architecture diagram of a server in an embodiment of the present invention;
图3是本发明一个实施例提供的一种多会话下远程服务的数据处理方法的流程示意图;3 is a schematic flowchart of a data processing method for a remote service under multi-session according to an embodiment of the present invention;
图4是本发明场景例一中服务器的系统架构图;4 is a system architecture diagram of a server in the first scenario of the present invention;
图5是本发明场景例二中服务器的系统架构图;5 is a system architecture diagram of a server in the second example of the present invention;
图6是本发明场景例三中服务器的系统架构图;6 is a system architecture diagram of a server in the third example of the present invention;
图7是本发明一个实施例提供的一种多会话下远程服务的数据处理系统的结构示意图;FIG. 7 is a schematic structural diagram of a data processing system for remote services under multi-session according to an embodiment of the present invention; FIG.
图8是本发明一个实施例提供的一种计算机设备的结构示意图。FIG. 8 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
具体实施方式detailed description
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实 施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。In order to enable those skilled in the art to better understand the solution of the present invention, the following will be combined with the present invention. The technical solutions in the embodiments of the present invention are clearly and completely described in the accompanying drawings. It is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts shall fall within the scope of the present invention.
本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”等是用于区别不同的对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third" and the like in the specification and claims of the present invention and the above drawings are used to distinguish different objects, and are not intended to describe a specific order. Furthermore, the terms "comprises" and "comprising" and "comprising" are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or device that comprises a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units not listed, or alternatively Other steps or units inherent to these processes, methods, products or equipment.
本发明实施例技术方案应用于提供远程服务的服务器,该服务器可以是基于Windows系统的服务器,也可以是基于Linux系统的服务器,或者基于其它系统的服务器。所说的远程服务包括远程桌面服务和远程应用服务,以Windows服务器为例,该服务器可以是利用RDS功能提供远程桌面服务,或者可以是利用应用虚拟化功能提供远程应用服务。The technical solution of the embodiment of the present invention is applied to a server for providing a remote service, and the server may be a server based on a Windows system, a server based on a Linux system, or a server based on other systems. The remote services include remote desktop services and remote application services. For example, a Windows server can provide remote desktop services by using RDS functions, or can provide remote application services by using application virtualization functions.
远程桌面服务的技术原理是,服务器上运行多个会话,一个用户可以在客户机上远程登录到其中一个会话中,在该服务器上运行应用程序。服务器把图形用户界面传送到客户机,客户机把用户的输入传回到服务器上。在使用远程桌面服务时,可以将服务器整个桌面环境提供给用户,也可以只提供单独的应用程序和数据给用户。在用户看来,这些应用程序是无缝集成的——界面、感觉和行为都和本地程序并无二异。The technical principle of Remote Desktop Services is that multiple sessions are run on the server, and one user can remotely log in to one of the sessions on the client and run the application on that server. The server passes the graphical user interface to the client, which passes the user's input back to the server. When using Remote Desktop Services, you can provide the entire desktop environment to the user, or you can provide separate applications and data to the user. From the user's perspective, these applications are seamlessly integrated—the interface, feel, and behavior are the same as native programs.
应用虚拟化的技术原理是,把应用程序的人机交互逻辑与计算逻辑隔离开来。在用户访问一个服务器虚拟化后的应用时,用户计算机只需要把人机交互逻辑传送到服务器端,服务器端为用户开设独立的会话空间,应用程序的计算逻辑在这个会话空间中运行,把变化后的人机交互逻辑传送给客户端,并且在客户端相应设备展示出来,从而使用户获得如同运行本地应用程序一样的访问感受。The technical principle of application virtualization is to isolate the human-computer interaction logic of the application from the computational logic. When a user accesses a server-virtualized application, the user computer only needs to transfer the human-computer interaction logic to the server. The server-side provides a separate session space for the user, and the application computing logic runs in the session space. Subsequent human-computer interaction logic is passed to the client and displayed on the client's corresponding device, giving the user the same access experience as running a local application.
如图1所示,简单示出了Windows多会话下远程桌面/远程应用服务实现过程中服务器(Server)端显示(Display)相关的系统架构,Windows Server运行多个会话(Session),分别用会话1,会话2…..n表示,n为正整数。 Session中可运行多个应用程序,分别用应用1、2、3等表示。As shown in Figure 1, the system architecture of the server (Server) display in the remote desktop/remote application service implementation process under Windows multi-session is simply shown. Windows Server runs multiple sessions (Session), respectively. 1, session 2.....n means that n is a positive integer. Multiple applications can be run in the Session, which are represented by applications 1, 2, 3, and so on.
为了避免服务器中多个会话重复进行相同的压缩计算处理,提高服务器端的性能,本发明实施例提供一种多会话下远程服务的数据处理方法和系统。下面通过具体实施例,分别进行详细的说明。In order to avoid the same compression calculation process in multiple sessions in the server, and improve the performance of the server, the embodiment of the present invention provides a data processing method and system for remote services under multiple sessions. The detailed description will be respectively made below through specific embodiments.
(实施例一、)(Example 1)
本发明第一个实施例提供一种多会话下远程服务的数据处理方法,该方法用于提供远程服务的服务器,所述远程服务包括远程桌面服务和远程应用服务中的至少一种。A first embodiment of the present invention provides a data processing method for a remote service under multi-session, which is used to provide a server for a remote service, where the remote service includes at least one of a remote desktop service and a remote application service.
如图2所示,是服务器的系统架构图。服务器中运行有缓存管理装置和多个会话(Session),所述多个会话包括第一会话,所述第一会话是所述多个会话中的任一会话,所述多个会话都能访问所述缓存管理装置,所述缓存管理装置包括压缩数据缓存映射模块。压缩数据缓存映射模块存储被压缩数据,每个会话都可以调用缓存管理装置访问压缩数据缓存映射模块。其中,每一个会话可以提供给一个用户,用户可以在客户机远程登入服务器提供的会话,像操作本地应用程序一样操作服务器会话中的应用程序。需要说明的是,压缩数据缓存映射模块中存储的被压缩数据,是多个会话的应用的待压缩数据对应的被压缩数据。As shown in Figure 2, it is the system architecture diagram of the server. A cache management device and a plurality of sessions are run in the server, the multiple sessions include a first session, and the first session is any one of the multiple sessions, and the multiple sessions can be accessed. The cache management device includes a compressed data cache mapping module. The compressed data cache mapping module stores the compressed data, and each session can call the cache management device to access the compressed data cache mapping module. Each session can be provided to a user who can remotely log in to the server-provided session at the client and operate the application in the server session as if it were a local application. It should be noted that the compressed data stored in the compressed data cache mapping module is compressed data corresponding to the data to be compressed of the application of multiple sessions.
请参考图3,本发明实施例的多会话下远程服务的数据处理方法,可以包括:Referring to FIG. 3, a data processing method for a remote service in a multi-session according to an embodiment of the present invention may include:
301、获取所述第一会话中的应用的待压缩数据,计算所述待压缩数据的校验值。301. Acquire data to be compressed of an application in the first session, and calculate a check value of the data to be compressed.
响应于用户的远程操作,当第一会话中的某个应用需要进行数据压缩时,本发明实施例中,服务器不再是直接对待压缩数据进行压缩,而是计算该待压缩数据的校验值。该校验值作为待压缩数据的唯一性标识,用于标识该待压缩数据,以及用于标识该对待压缩数据进行压缩后得到的被压缩数据。In the embodiment of the present invention, the server does not directly compress the compressed data, but calculates the check value of the data to be compressed, in response to the remote operation of the user. . The check value is used as the unique identifier of the data to be compressed, and is used to identify the data to be compressed and the compressed data obtained by compressing the data to be compressed.
由于存在多种压缩算法,一个被压缩数据可以有多个不同压缩类型的被压缩数据,因此,一个待压缩数据的校验值可以对应该待压缩数据的多个不同压缩类型的被压缩数据。可选的,如果第一会话中需要进行数据压缩的应用对于压缩类型有要求时,本步骤中服务器还获取所述第一会话中的所述应 用要求的压缩类型,如无损算法压缩如zlib,有损算法压缩如jpeg,视频类压缩算法压缩如H.264等压缩类型。Since there are multiple compression algorithms, one compressed data may have compressed data of a plurality of different compression types. Therefore, the check value of one data to be compressed may correspond to compressed data of a plurality of different compression types of data to be compressed. Optionally, if the application that needs to perform data compression in the first session has a requirement for the compression type, the server also obtains the response in the first session in this step. With the required compression type, such as lossless algorithm compression such as zlib, lossy algorithm compression such as jpeg, video class compression algorithm compresses compression types such as H.264.
一些实施例中,所述校验值具体可以采用循环冗余校验(Cyclic Redundancy Check,CRC)值。CRC是数据通信领域中最常用的一种差错校验码。其它实施例中,也可以采用其它类型的校验值。只要能用于对待压缩数据进行唯一性标识,本文中不限制校验值的具体类型。In some embodiments, the check value may specifically adopt a Cyclic Redundancy Check (CRC) value. CRC is one of the most commonly used error check codes in the field of data communications. Other types of check values may also be employed in other embodiments. As long as it can be used for unique identification of compressed data, the specific type of check value is not limited in this paper.
需要说明的是,本文中待压缩数据可以是图像、视频、文本等各种格式的数据,其中,主要是图像数据。It should be noted that the data to be compressed in this paper may be data in various formats such as images, videos, and texts, and the main data is image data.
302、根据所述待压缩数据的校验值查询所述压缩数据缓存映射模块中是否存在所述待压缩数据对应的被压缩数据。302. Query, according to the check value of the data to be compressed, whether the compressed data corresponding to the data to be compressed exists in the compressed data cache mapping module.
本发明实施例中,服务器中各个会话产生的被压缩数据都统一保存在压缩数据缓存映射模块中。当第一会话中的某个应用需要进行数据压缩时,很可能在压缩数据缓存映射模块中已经存在对应的被压缩数据(其它会话压缩的)。本步骤中,当计算得到第一会话中的应用的待压缩数据的校验值后,利用该校验值在压缩数据缓存映射模块中进行查询,以查询是否已经存在所述待压缩数据对应的被压缩数据。In the embodiment of the present invention, the compressed data generated by each session in the server is uniformly stored in the compressed data cache mapping module. When an application in the first session needs to perform data compression, it is likely that the corresponding compressed data (compressed by other sessions) already exists in the compressed data cache mapping module. In this step, after the check value of the data to be compressed of the application in the first session is calculated, the check value is used in the compressed data cache mapping module to query whether the data to be compressed is already present. Compressed data.
压缩数据缓存映射模块中一般需要保存被压缩数据以及对应的校验值,也就是说,不仅要保存所述校验值和所述被压缩数据,还要保存所述校验值和所述被压缩数据的对应关系。一些实施例中,压缩数据缓存映射模块可以以映射表的形式存在。缓存管理装置可以管理该映射表。请参考下面表1,示出了一种映射表的示意图。The compressed data cache mapping module generally needs to save the compressed data and the corresponding check value, that is, not only the check value and the compressed data but also the check value and the Correspondence of compressed data. In some embodiments, the compressed data cache mapping module can exist in the form of a mapping table. The cache management device can manage the mapping table. Please refer to Table 1 below for a schematic diagram of a mapping table.
表1Table 1
校验值Check value 被压缩数据Compressed data
001001 数据AData A
010010 数据BData B
本步骤的查询操作例如可以由该缓存管理装置执行。由于维持各个会话之间独立性的需要,一个会话通常不被允许直接访问一个公共的存储空间例如所述映射表。但是,多个会话都可以访问该缓存管理装置,由该缓存管理装置对映射表进行访问操作。对于Windows服务器,该缓存管理装置可以由 一个驱动来实现,对于Linux服务器,该缓存管理装置可以由一个驱动来实现,也可以由一个用户态进程来实现,当然还可以是其它实现方式,本文对于缓存管理装置的具体实现方式不予限定。The query operation of this step can be performed, for example, by the cache management device. Due to the need to maintain independence between sessions, a session is typically not allowed to directly access a common storage space such as the mapping table. However, the plurality of sessions can access the cache management device, and the cache management device performs an access operation on the mapping table. For a Windows server, the cache management device can be A driver is implemented. For a Linux server, the cache management device may be implemented by a driver, or may be implemented by a user state process, and may be other implementation manners. The specific implementation manner of the cache management device is not limited. .
可选的,如果第一会话中需要进行数据压缩的应用对于压缩类型有要求时,本步骤中,具体可以根据所述第一会话中的应用要求的压缩类型和所述待压缩数据的校验值,查询所述压缩数据缓存映射模块中是否存在所述压缩类型的、所述待压缩数据对应的被压缩数据。Optionally, if the application that needs to perform data compression in the first session has a requirement for the compression type, in this step, the compression type required by the application in the first session and the verification of the data to be compressed may be specifically And queried whether the compressed data corresponding to the compressed data of the compression type exists in the compressed data cache mapping module.
一些实施例中,缓存管理装置中可以包括多个压缩数据缓存映射模块,其中每一个压缩数据缓存映射模块用于保存一种压缩类型的被压缩数据,例如图2中所示,压缩数据缓存映射模块1和压缩数据缓存映射模块2分别用于保存不同压缩类型的被压缩数据。In some embodiments, the cache management apparatus may include a plurality of compressed data cache mapping modules, wherein each compressed data cache mapping module is configured to store compressed data of a compressed type, such as shown in FIG. 2, compressed data cache mapping. Module 1 and compressed data cache mapping module 2 are respectively used to store compressed data of different compression types.
303、若查询结果为存在,将查询到的所述待压缩数据对应的被压缩数据返回给所述应用。303. If the query result is present, return the compressed data corresponding to the to-be-compressed data to the application.
当查询结果为存在时,说明在压缩数据缓存映射模块中查询到了所述待压缩数据对应的被压缩数据,于是,可以不再对第一会话中的待压缩数据进行压缩,而是直接将查询到的所述待压缩数据对应的被压缩数据返回给第一会话中的应用。从而,就避免了会话之间重复的压缩计算。When the query result is present, the compressed data corresponding to the data to be compressed is queried in the compressed data cache mapping module, so that the data to be compressed in the first session may not be compressed, but the query is directly The compressed data corresponding to the data to be compressed is returned to the application in the first session. Thus, repeated compression calculations between sessions are avoided.
304、若查询结果为不存在,对所述待压缩数据进行压缩,得到所述待压缩数据对应的被压缩数据,将所述待压缩数据的校验值和所述待压缩数据对应的被压缩数据存储到所述压缩数据缓存映射模块中,并将得到的所述待压缩数据对应的被压缩数据返回给所述应用。The data to be compressed is compressed to obtain the compressed data corresponding to the data to be compressed, and the check value of the data to be compressed and the data to be compressed are compressed. The data is stored in the compressed data cache mapping module, and the obtained compressed data corresponding to the to-be-compressed data is returned to the application.
当查询结果为不存在时,说明在压缩数据缓存映射模块中没有对应的被压缩数据,于是,服务器对第一会话中的待压缩数据进行压缩,得到的被压缩数据做两种处理,一方面,将得到的所述待压缩数据对应的被压缩数据返回给第一会话中的应用,另一方面,将所述待压缩数据的校验值和所述待压缩数据对应的被压缩数据存储到所述压缩数据缓存映射模块中,这样,后续其它会话中需要该被压缩数据时,就可以直接从压缩数据缓存映射模块中获取,而不必重复进行压缩计算。When the query result is non-existent, it indicates that there is no corresponding compressed data in the compressed data cache mapping module, so the server compresses the data to be compressed in the first session, and the obtained compressed data performs two processings. And returning the compressed data corresponding to the data to be compressed to the application in the first session, and storing the check value of the data to be compressed and the compressed data corresponding to the data to be compressed to In the compressed data cache mapping module, when the compressed data is needed in subsequent sessions, the compressed data cache mapping module can be directly obtained without repeating the compression calculation.
可选的,如果第一会话中需要进行数据压缩的应用对于压缩类型有要求时,本步骤中,服务器对第一会话中的待压缩数据进行压缩时,需要按照所 述压缩类型对所述待压缩数据进行压缩。Optionally, if the application that needs to perform data compression in the first session has a requirement for the compression type, in this step, when the server compresses the data to be compressed in the first session, The compression type compresses the data to be compressed.
其中,所说的将所述待压缩数据的校验值和所述待压缩数据对应的被压缩数据存储到所述压缩数据缓存映射模块中,具体可以为:将所述待压缩数据的校验值和所述待压缩数据的被压缩数据,以及所述校验值和所述被压缩数据的对应关系,存储到所述压缩数据缓存映射模块中。The storing the data to be compressed and the compressed data corresponding to the data to be compressed are stored in the compressed data cache mapping module, which may be: verifying the data to be compressed. The value and the compressed data of the data to be compressed, and the correspondence between the check value and the compressed data are stored in the compressed data cache mapping module.
可以理解,本发明实施例上述方案例如可以在Windows服务器,Linux服务器或安卓(Android)服务器等设备具体实施。It can be understood that the foregoing solution in the embodiment of the present invention can be implemented, for example, on a Windows server, a Linux server, or an Android server.
由上可见,该技术方案中,用于提供远程服务的服务器上运行有包括压缩数据缓存映射模块的缓存管理装置,服务器上运行的多个会话都能访问该缓存管理装置,当某个会话需要压缩数据时,服务器先利用待压缩数据的校验值查询该压缩数据缓存映射模块,如果已经存在对应的被压缩数据就直接获取该被压缩数据,不再进行压缩处理;如果不存在对应的被压缩数据,则进行压缩处理,且得到的被压缩数据存储到压缩数据缓存映射模块中供其它会话访问,这样,对于同一数据只需要进行一次压缩即可,实现了去重计算,避免了服务器中多个会话重复进行相同的压缩计算处理,提高了服务器端的性能。It can be seen that, in the technical solution, a server for providing a remote service runs a cache management device including a compressed data cache mapping module, and multiple sessions running on the server can access the cache management device, when a certain session needs When compressing data, the server first queries the compressed data cache mapping module by using the check value of the data to be compressed, and if the corresponding compressed data already exists, the compressed data is directly obtained, and no compression processing is performed; if there is no corresponding Compressing the data, performing compression processing, and the obtained compressed data is stored in the compressed data cache mapping module for other sessions to access, so that only one compression is needed for the same data, and the deduplication calculation is realized, which avoids the server. Multiple sessions repeat the same compression calculation process, improving server-side performance.
为便于更好的理解本发明实施例提供的技术方案,下面通过具体场景下的实施方式为例对本发明实施例技术方案进行介绍。In order to facilitate a better understanding of the technical solutions provided by the embodiments of the present invention, the technical solutions of the embodiments of the present invention are described below by taking the embodiments in the specific scenarios as an example.
场景例一、Scene example one,
请参考图4,以服务器为Windows Server为例,图4示出了一种Windows Server的多会话系统架构以及数据处理流程。Windows Server中运行有会话1、会话2等多个会话,还运行有缓存管理装置,该缓存管理装置具体为一个编码驱动(Encode Driver)。所述多个会话包括第一会话(例如会话1),所述第一会话是所述多个会话中的任一会话。所述多个会话都能够访问所述编码驱动,所述编码驱动包括压缩数据缓存映射模块(Compression Cache Map),简称缓存映射模块,缓存映射模块中存储被压缩数据(Compressed data)。可选的,该缓存映射模块可以包括一个或多个,当包括多个时,不同的缓存映射模块可用于存储不同压缩类型的被压缩数据。Please refer to FIG. 4, taking the server as a Windows Server as an example. FIG. 4 shows a multi-session system architecture and data processing flow of Windows Server. Windows Server runs multiple sessions such as Session 1, Session 2, etc., and also runs a cache management device, which is specifically an Encode Driver. The plurality of sessions includes a first session (eg, session 1), the first session being any of the plurality of sessions. The plurality of sessions are capable of accessing the encoding driver, and the encoding driver includes a compressed data cache mapping module (Compression Cache Map), which is referred to as a cache mapping module, and the cache mapping module stores compressed data. Optionally, the cache mapping module may include one or more. When multiple are included, different cache mapping modules may be used to store compressed data of different compression types.
每个会话都可以运行一个远程显示模块(Remote Display Model),远程显示模块用于实现与客户机的交互,用户在客户机进行的人机交互逻辑都 被传递到会话中的远程显示模块,由远程显示模块执行对应的计算逻辑。Each session can run a remote display module (Remote Display Model), the remote display module is used to achieve interaction with the client, the human-computer interaction logic performed by the user at the client The remote display module is passed to the session, and the corresponding display logic is executed by the remote display module.
本发明实施例方法可以由远程显示模块和编码驱动共同配合完成。其中,The method of the embodiment of the present invention can be completed by a cooperation of a remote display module and a code driver. among them,
第一会话中的远程显示模块,获取所述第一会话中的应用的待压缩数据;The remote display module in the first session acquires data to be compressed of the application in the first session;
所述编码驱动根据所述待压缩数据的校验值计算所述待压缩数据的校验值,查询所述压缩数据缓存映射模块中是否存在所述待压缩数据对应的被压缩数据;若查询结果为存在,将查询到的所述待压缩数据对应的被压缩数据返回给所述应用;若查询结果为不存在,对所述待压缩数据进行压缩,得到所述待压缩数据对应的被压缩数据,将所述待压缩数据的校验值和所述待压缩数据对应的被压缩数据存储到所述压缩数据缓存映射模块中,并将得到的所述待压缩数据对应的被压缩数据返回给所述应用。The encoding driver calculates a check value of the data to be compressed according to the check value of the data to be compressed, and queries whether the compressed data corresponding to the data to be compressed exists in the compressed data cache mapping module; If yes, the compressed data corresponding to the data to be compressed is returned to the application; if the result of the query is not present, the data to be compressed is compressed to obtain compressed data corresponding to the data to be compressed. And storing the check value of the data to be compressed and the compressed data corresponding to the data to be compressed into the compressed data cache mapping module, and returning the compressed data corresponding to the to-be-compressed data to the Application.
如图4所示,数据处理方法的具体过程如下:As shown in Figure 4, the specific process of the data processing method is as follows:
1、第一会话中的远程显示模块中调用接口函数,以便对被压缩数据进行压缩(一般是图像数据)。其中,接口函数例如是API(Application Programming Interface,应用程序编程接口)。API是一些预先定义的函数,目的是提供应用程序与开发人员基于某软件或硬件得以访问一组例程的能力,而又无需访问源码,或理解内部工作机制的细节。例如可以通过压缩接口函数(Compression API)调用所述编码驱动。1. The interface function is called in the remote display module in the first session to compress the compressed data (generally image data). The interface function is, for example, an API (Application Programming Interface). APIs are pre-defined functions that provide the ability for applications and developers to access a set of routines based on a piece of software or hardware without having to access source code or understand the details of internal workings. For example, the encoding driver can be called by a compression interface function (Compression API).
2、接口函数实际调用到编码驱动中(编码驱动可以是一个能够被多会话访问的Windows Driver)。2. The interface function is actually called into the encoding driver (the encoding driver can be a Windows Driver that can be accessed by multiple sessions).
3、在编码驱动中,待压缩数据会被计算CRC值(或其他表示唯一性的校验值),通过CRC值从压缩数据缓存映射模块中查询是否已经存在待压缩数据对应的被压缩数据。需要说明的是,Compression Cache Map中存放了待压缩数据的CRC值以及对应的被压缩数据,由于压缩的时候可以会有多种压缩算法,所以可以采用多个Compression Cache Map来缓存不同压缩算法得到的被压缩数据,也可以采用在一个Compression Cache Map中一个CRC对应多个不同压缩类型的被压缩数据,实际上开发人员很容易有不同的数据结构实现。3. In the encoding driver, the data to be compressed is calculated by the CRC value (or other check value indicating uniqueness), and the CRC value is used to query from the compressed data cache mapping module whether the compressed data corresponding to the data to be compressed already exists. It should be noted that the Compression Cache Map stores the CRC value of the data to be compressed and the corresponding compressed data. Since there may be multiple compression algorithms when compressing, multiple Compression Cache Maps may be used to cache different compression algorithms. The compressed data can also be used in a Compression Cache Map. A CRC corresponds to compressed data of multiple different compression types. In fact, developers can easily implement different data structures.
根据是否查询到对应的被压缩数据,存在两个流程分支.There are two flow branches depending on whether the corresponding compressed data is queried.
分支1,查询到存在对应的被压缩数据,则执行以下步骤: Branch 1, query to the existence of the corresponding compressed data, perform the following steps:
4、若查询结果为存在所述待压缩数据对应的被压缩数据,所述编码驱 动从压缩数据缓存映射模块中获取查询到的被压缩数据。4. If the result of the query is that the compressed data corresponding to the data to be compressed exists, the encoding drive The compressed data obtained by the query is obtained from the compressed data cache mapping module.
5、所述编码驱动直接将查询到的被压缩数据返回给远程显示模块调用的接口函数,通过接口函数将被压缩数据返回给第一会话中的应用。5. The encoding driver directly returns the queried compressed data to the interface function called by the remote display module, and returns the compressed data to the application in the first session through the interface function.
分支2,查询结果为不存在对应的被压缩数据,则执行以下步骤: Branch 2, the result of the query is that there is no corresponding compressed data, then perform the following steps:
4、若查询结果为不存在所述待压缩数据对应的被压缩数据,则编码驱动对所述待压缩数据进行压缩,得到被压缩数据。 4. If the result of the query is that there is no compressed data corresponding to the data to be compressed, the encoding driver compresses the data to be compressed to obtain compressed data.
5、编码驱动将所述带压缩数据的校验值和得到的被压缩数据存储到所述压缩数据缓存映射模块中。其中,受资源的限制,压缩数据缓存映射模块会有一定的大小,可选的,如果其中存放的数据超过一定的上限,可以采用一定的算法比如“最近最经常使用”算法删除掉旧的数据再存放新的数据。 5. The encoding driver stores the check value with the compressed data and the obtained compressed data into the compressed data cache mapping module. The compressed data cache mapping module has a certain size. Optionally, if the data stored in the data exceeds a certain upper limit, a certain algorithm, such as the “most recently used” algorithm, may be used to delete the old data. Store new data.
6、编码驱动获取压缩得到的被压缩数据。 6. The encoding driver obtains the compressed data obtained by the compression.
7、将得到的被压缩数据返回给远程显示模块调用的接口函数,通过接口函数将被压缩数据返回给第一会话中的应用。 7. Return the obtained compressed data to the interface function called by the remote display module, and return the compressed data to the application in the first session through the interface function.
值得说明的是,对于Windows Server,上述的Encode Driver目前来看用windows内核态的driver(驱动)来做最为合适,因为驱动可以接受多个会话访问,但是实际上作为一个用户态进程也是有可能的,通过常用的共享内存、全局管道通信技术也是可以实现所述缓存管理装置。It is worth noting that for Windows Server, the above Encode Driver is currently the most suitable driver for Windows kernel mode, because the driver can accept multiple session access, but in fact it is possible as a user state process. The cache management device can also be implemented by a common shared memory and global pipe communication technology.
场景例二、Scene example 2
请参考图5,以服务器为Windows Server为例,图5示出了另一种Windows Server的多会话系统架构以及数据处理流程。Please refer to FIG. 5, taking the server as an example of Windows Server. FIG. 5 shows another multi-session system architecture and data processing flow of Windows Server.
与场景例一中不同的是,本场景例中将计算校验值的步骤从编码驱动中执行,更改为在会话中执行。即:Different from the scenario example 1, the step of calculating the check value in the example of this scenario is performed from the encoding driver and is changed to be executed in the session. which is:
第一会话中的远程显示模块,获取所述第一会话中的应用的待压缩数据,计算所述待压缩数据的校验值;The remote display module in the first session acquires data to be compressed of the application in the first session, and calculates a check value of the data to be compressed.
所述编码驱动根据所述待压缩数据的校验值查询所述压缩数据缓存映射模块中是否存在所述待压缩数据对应的被压缩数据;若查询结果为存在,将查询到的所述待压缩数据对应的被压缩数据返回给所述应用;若查询结果为不存在,所述编码驱动对所述待压缩数据进行压缩,得到所述待压缩数据对应的被压缩数据,将所述待压缩数据的校验值和所述待压缩数据对应的被压缩数据存储到所述压缩数据缓存映射模块中,并将得到的所述待压缩数据 对应的被压缩数据返回给所述应用。The encoding driver queries whether the compressed data corresponding to the data to be compressed exists in the compressed data cache mapping module according to the check value of the data to be compressed; if the query result is existing, the queried to be compressed The compressed data corresponding to the data is returned to the application; if the query result is non-existent, the encoding driver compresses the data to be compressed to obtain compressed data corresponding to the data to be compressed, and the data to be compressed And the compressed data corresponding to the data to be compressed is stored in the compressed data cache mapping module, and the obtained data to be compressed is obtained. The corresponding compressed data is returned to the application.
可见,本场景例中计算校验值例如CRC值的位置移动到了调用接口函数之前,也就是说校验计算在第一会话的应用逻辑里面完成,而不是在编码驱动里。至于其它操作,与场景例一完全相同,请参考场景例一中的描述,这里不再详细赘述了。It can be seen that the position where the check value, such as the CRC value, is calculated in this scenario is moved before the calling interface function, that is, the check calculation is completed in the application logic of the first session, not in the encoding driver. As for the other operations, it is exactly the same as the scenario example 1, please refer to the description in the scenario example 1, which will not be described in detail here.
本场景例在应用逻辑里面计算校验值的好处在于:应用的逻辑可能已经对图片进行了CRC值计算,正好加以利用,这样可以降低资源开销。The advantage of calculating the check value in the application logic in this scenario is that the logic of the application may have calculated the CRC value of the image, which is just used, which can reduce the resource overhead.
场景例三、Scene example three,
请参考图6,以服务器为Windows Server为例,图6示出了又一种Windows Server的多会话系统架构以及数据处理流程。其中,系统架构与场景例一的不同之处在于,本场景例中,缓存管理装置具体为缓存驱动(Cache Driver),其它部分都与场景例一相同,这里不再赘述。Please refer to FIG. 6 , taking the server as an example of Windows Server. FIG. 6 shows another multi-session system architecture and data processing flow of Windows Server. The difference between the system architecture and the scenario 1 is that, in this example, the cache management device is specifically a cache driver (Cache Driver), and other parts are the same as the scenario example 1, and details are not described herein again.
数据处理流程与场景例一的不同之处在于:计算校验值,查询被压缩数据,进行数据压缩等操作移动到了会话中进行。具体的:The difference between the data processing flow and the scenario one is that the calculation of the check value, the query of the compressed data, and the data compression are moved to the session. specific:
第一会话中的远程显示模块,获取所述第一会话中的应用的待压缩数据,计算所述待压缩数据的校验值;根据所述待压缩数据的校验值查询所述压缩数据缓存映射模块中是否存在所述待压缩数据对应的被压缩数据;若查询结果为存在,从所述缓存驱动获取查询到的所述待压缩数据对应的被压缩数据,将查询到的所述待压缩数据对应的被压缩数据返回给所述应用;若查询结果为不存在,对所述待压缩数据进行压缩,得到所述待压缩数据对应的被压缩数据,将得到的所述待压缩数据对应的被压缩数据返回给所述应用;The remote display module in the first session acquires data to be compressed of the application in the first session, calculates a check value of the data to be compressed, and queries the compressed data cache according to the check value of the data to be compressed. Whether the compressed data corresponding to the to-be-compressed data exists in the mapping module; if the query result is the presence, the compressed data corresponding to the to-be-compressed data that is queried is obtained from the cache driver, and the to-be-compressed query is obtained. The compressed data corresponding to the data is returned to the application; if the result of the query is not present, the data to be compressed is compressed to obtain compressed data corresponding to the data to be compressed, and the obtained data to be compressed is corresponding. The compressed data is returned to the application;
所述缓存驱动将所述待压缩数据的校验值和所述待压缩数据对应的被压缩数据存储到所述压缩数据缓存映射模块中。The cache driver stores the check value of the data to be compressed and the compressed data corresponding to the data to be compressed into the compressed data cache mapping module.
如图6所示,数据处理方法的具体过程如下:As shown in Figure 6, the specific process of the data processing method is as follows:
1、第一会话中的远程显示模块中调用接口函数例如压缩接口函数(Compression API),计算待压缩数据的CRC值,以便对被压缩数据进行压缩(一般是图像数据)。1. Calling an interface function, such as a compression interface function (Compression API), in the remote display module in the first session, and calculating a CRC value of the data to be compressed, so as to compress the compressed data (generally image data).
2、Compression API调用查询数据是否存在接口函数(Check data exist API)。2. The Compression API calls the query data for the presence of the interface function (Check data exist API).
3、Check data exist API调用缓存驱动。 3, Check data exist API call cache driver.
4、Check data exist API根据待压缩数据的CRC值,查询缓存驱动的压缩数据缓存映射模块中是否已经存在该CRC值对应的被压缩数据。4. The Check data exist API queries whether the compressed data corresponding to the CRC value already exists in the compressed data cache mapping module of the cache driver according to the CRC value of the data to be compressed.
根据是否查询到对应的被压缩数据,存在两个流程分支.There are two flow branches depending on whether the corresponding compressed data is queried.
分支1,查询到存在对应的被压缩数据,则执行以下步骤: Branch 1, query to the existence of the corresponding compressed data, perform the following steps:
5、如果查询结果为存在,Check data exist API调用Get data API(获取数据接口函数)。5. If the query result is present, the Check data exist API calls the Get data API.
6、Get data API调用缓存驱动,从缓存驱动中获得查询到的被压缩数据。6. The Get data API calls the cache driver to obtain the compressed data from the cache driver.
7、Get data API将获得的被压缩数据返回给压缩接口函数,通过压缩接口函数将被压缩数据返回给第一会话中的应用。7. The Get data API returns the obtained compressed data to the compression interface function, and returns the compressed data to the application in the first session through the compression interface function.
分支2,查询结果为不存在对应的被压缩数据,则执行以下步骤: Branch 2, the result of the query is that there is no corresponding compressed data, then perform the following steps:
3、若查询结果为不存在对应的被压缩数据,则Check data exist API指示远程显示模块中的数据编码(Encode data)模块对所述待压缩数据进行压缩,得到被压缩数据。 3. If the result of the query is that there is no corresponding compressed data, the Check data exist API instructs the Encode data module in the remote display module to compress the data to be compressed to obtain compressed data.
4、Check data exist API调用Set data API(设置数据接口函数)。 4 , Check data exist API call Set data API (set data interface function).
5、Set data API将压缩得到的被压缩数据存储到压缩数据缓存映射模块中。 5. The Set data API stores the compressed data obtained by the compression into the compressed data cache mapping module.
6、Encode data模块将压缩得到的被压缩数据返回给压缩接口函数,通过压缩接口函数将被压缩数据返回给第一会话中的应用。 6. The Encode data module returns the compressed data obtained by the compression to the compression interface function, and returns the compressed data to the application in the first session through the compression interface function.
相对于场景例一,本场景例中将查询压缩数据是否存在的逻辑部分以及压缩过程的逻辑部分等,移植到了encoder driver之外,也就说应用要做的事情更多了,但是灵活性更高,encoder driver变成了一个cache driver。Compared with the scenario example 1, in this scenario, the logic part that queries whether the compressed data exists and the logical part of the compression process are transplanted to the encoder driver, which means that the application has more things to do, but the flexibility is more. High, the encoder driver becomes a cache driver.
综上,本文以几个场景例对本发明实施例方法做了进一步的说明。In summary, the method of the embodiment of the present invention is further described in several scenarios.
需要说明的是,本发明可能有多种变形的实现方案,但是整体思路就是通过类似的Cache(缓存)方式去重计算资源消耗。Cache的存储可以使纯内存,也有可能是加了SSD做二级Cache,分布式存储可能也会对Cache有很大的帮助。这种方式对单一性的业务场景应该会有很好的效果,而应用虚拟化原本就是对付这种场景的,比如视频教育(看的东西差不多),特别是在线多用户的实时远程教育,画面内容可能很多相同。 It should be noted that the present invention may have multiple variant implementations, but the overall idea is to recalculate resource consumption through a similar Cache. Cache storage can make pure memory, or it may be added SSD to do secondary cache. Distributed storage may also help Cache. This approach should have a good effect on a single business scenario, and application virtualization is originally designed to deal with such scenarios, such as video education (seeing things almost), especially online multi-user real-time distance education, screen The content may be many the same.
(实施例二、)为了更好的实施本发明实施例的上述方案,下面还提供用于配合实施上述方案的相关装置。(Embodiment 2) In order to better implement the above-described aspects of the embodiments of the present invention, related apparatuses for cooperating to implement the above aspects are also provided below.
请参考图7,本发明实施例提供一种多会话下远程服务的数据处理系统,用于提供远程服务的服务器中运行有缓存管理装置和多个会话,第一会话是所述多个会话中的任一会话,所述多个会话都能访问所述缓存管理装置,所述缓存管理装置包括压缩数据缓存映射模块;所述系统可以包括:Referring to FIG. 7, an embodiment of the present invention provides a data processing system for a remote service in a multi-session, in which a server for providing a remote service runs a cache management device and a plurality of sessions, where the first session is in the multiple sessions. Any of the sessions, the plurality of sessions can access the cache management device, the cache management device includes a compressed data cache mapping module; the system can include:
获取模块701,用于获取所述第一会话中的应用的待压缩数据;The obtaining module 701 is configured to acquire data to be compressed of an application in the first session.
处理模块702,用于计算所述待压缩数据的校验值;根据所述待压缩数据的校验值查询所述压缩数据缓存映射模块中是否存在所述待压缩数据对应的被压缩数据;若查询结果为存在,将查询到的所述待压缩数据对应的被压缩数据返回给所述应用;若查询结果为不存在,对所述待压缩数据进行压缩,得到所述待压缩数据对应的被压缩数据,将所述待压缩数据的校验值和所述待压缩数据对应的被压缩数据存储到所述压缩数据缓存映射模块中,并将所述待压缩数据对应的被压缩数据返回给所述应用。The processing module 702 is configured to calculate a check value of the data to be compressed, and query whether the compressed data corresponding to the data to be compressed exists in the compressed data cache mapping module according to the check value of the data to be compressed; If the query result is not present, the compressed data corresponding to the data to be compressed is returned to the application; if the query result is not exist, the data to be compressed is compressed, and the corresponding data to be compressed is obtained. Compressing data, storing the check value of the data to be compressed and the compressed data corresponding to the data to be compressed into the compressed data cache mapping module, and returning the compressed data corresponding to the data to be compressed to the Application.
在本发明的一些实施例中,所述处理模块702,还用于:根据所述第一会话中的应用要求的压缩类型和所述待压缩数据的校验值,查询所述压缩数据缓存映射模块中是否存在所述压缩类型的、所述待压缩数据对应的被压缩数据;按照所述压缩类型对对所述待压缩数据进行压缩。In some embodiments of the present invention, the processing module 702 is further configured to: query the compressed data cache mapping according to a compression type required by an application in the first session and a check value of the data to be compressed. Whether the compressed data corresponding to the data to be compressed is compressed in the module; and the data to be compressed is compressed according to the compression type.
在本发明的一些实施例中,所述缓存管理装置具体为编码驱动,所述获取模块701部署在所述第一会话中;所述处理模块702部署在所述编码驱动中;其中,请参考图4,处理模块702可以包括:In some embodiments of the present invention, the cache management device is specifically an encoding driver, the obtaining module 701 is deployed in the first session; the processing module 702 is deployed in the encoding driver; wherein, please refer to 4, the processing module 702 can include:
计算单元,用于计算所述待压缩数据的校验值;a calculating unit, configured to calculate a check value of the data to be compressed;
查询单元,根据所述待压缩数据的校验值查询所述压缩数据缓存映射模块中是否存在所述待压缩数据对应的被压缩数据;若查询结果为存在,将查询到的所述待压缩数据对应的被压缩数据返回给所述应用;Querying, querying, according to the check value of the data to be compressed, whether the compressed data corresponding to the data to be compressed exists in the compressed data cache mapping module; if the query result is present, the data to be compressed to be queried Corresponding compressed data is returned to the application;
编码单元,用于若查询结果为不存在,对所述待压缩数据进行压缩,得到所述待压缩数据对应的被压缩数据;a coding unit, configured to compress the data to be compressed to obtain compressed data corresponding to the data to be compressed if the result of the query is not present;
所述查询单元,还用于若查询结果为不存在,将所述待压缩数据的校验值和所述待压缩数据对应的被压缩数据存储到所述压缩数据缓存映射模块中,并将所述待压缩数据对应的被压缩数据返回给所述应用。 The query unit is further configured to: when the query result is non-existent, store the check value of the data to be compressed and the compressed data corresponding to the data to be compressed into the compressed data cache mapping module, and The compressed data corresponding to the compressed data is returned to the application.
在本发明的一些实施例中,所述缓存管理装置具体为编码驱动,所述获取模块701部署在所述第一会话中;请参考图5,所述处理模块702可包括:In some embodiments of the present invention, the cache management device is specifically an encoding driver, and the obtaining module 701 is deployed in the first session. Referring to FIG. 5, the processing module 702 may include:
计算单元,部署在所述第一会话中,用于计算所述待压缩数据的校验值;a calculating unit, configured to calculate a check value of the data to be compressed, in the first session;
查询单元,部署在所述编码驱动中,用于根据所述待压缩数据的校验值查询所述压缩数据缓存映射模块中是否存在所述待压缩数据对应的被压缩数据;若查询结果为存在,将查询到的所述待压缩数据对应的被压缩数据返回给所述应用;The query unit is deployed in the encoding driver, and is configured to query, according to the check value of the data to be compressed, whether the compressed data corresponding to the data to be compressed exists in the compressed data cache mapping module; if the query result is And returning the compressed data corresponding to the to-be-compressed data to the application;
编码单元,部署在所述编码驱动中,用于若查询结果为不存在,对所述待压缩数据进行压缩,得到所述待压缩数据对应的被压缩数据;a coding unit, configured to be used in the coding driver, to compress the data to be compressed to obtain compressed data corresponding to the data to be compressed if the query result is not present;
所述查询单元,还用于若查询结果为不存在,将所述待压缩数据的校验值和所述待压缩数据对应的被压缩数据存储到所述压缩数据缓存映射模块中,并将所述待压缩数据对应的被压缩数据返回给所述应用。The query unit is further configured to: when the query result is non-existent, store the check value of the data to be compressed and the compressed data corresponding to the data to be compressed into the compressed data cache mapping module, and The compressed data corresponding to the compressed data is returned to the application.
在本发明的一些实施例中,所述缓存管理装置具体为缓存驱动,所述获取模块701部署在所述第一会话中;请参考图6,所述处理模块702可包括:In some embodiments of the present invention, the cache management device is specifically a cache driver, and the obtaining module 701 is deployed in the first session. Referring to FIG. 6, the processing module 702 may include:
计算单元,部署在所述第一会话中,用于计算所述待压缩数据的校验值;a calculating unit, configured to calculate a check value of the data to be compressed, in the first session;
查询单元,部署在所述第一会话中,用于根据所述待压缩数据的校验值查询所述压缩数据缓存映射模块中是否存在所述待压缩数据对应的被压缩数据;若查询结果为存在,从所述缓存驱动获取查询到的所述待压缩数据对应的被压缩数据,将查询到的所述待压缩数据对应的被压缩数据返回给所述应用;The query unit is deployed in the first session, and is configured to query, according to the check value of the data to be compressed, whether the compressed data corresponding to the data to be compressed exists in the compressed data cache mapping module; The compressed data corresponding to the to-be-compressed data that is queried is obtained from the cache driver, and the compressed data corresponding to the queried data to be compressed is returned to the application;
编码单元,部署在所述第一会话中,用于若查询结果为不存在,对所述待压缩数据进行压缩,得到所述待压缩数据对应被压缩数据;a coding unit, configured to be used in the first session, to compress the data to be compressed if the result of the query is not present, to obtain the compressed data corresponding to the data to be compressed;
存储单元,部署在所述缓存驱动中,用于将所述待压缩数据的校验值和所述待压缩数据对应的被压缩数据存储到所述压缩数据缓存映射模块中;a storage unit, configured to store the check value of the data to be compressed and the compressed data corresponding to the data to be compressed into the compressed data cache mapping module;
所述查询单元,还用于若查询结果为不存在,将所述待压缩数据对应的被压缩数据返回给所述应用。The query unit is further configured to: when the query result is non-existent, return the compressed data corresponding to the data to be compressed to the application.
可以理解,本发明实施例的数据处理系统的各个功能模块的功能可根据上述方法实施例中的方法具体实现,其具体实现过程可参照上述方法实施例中的相关描述,此处不再赘述。It is to be understood that the functions of the various functional modules of the data processing system of the embodiments of the present invention may be specifically implemented according to the method in the foregoing method embodiments. For the specific implementation process, reference may be made to the related description in the foregoing method embodiments, and details are not described herein again.
由上可见,在本发明的一些可行的实施方式中,用于提供远程服务的服 务器上运行有包括压缩数据缓存映射模块的缓存管理装置,多个会话都能访问该缓存管理装置,当某个会话需要压缩数据时,服务器先利用待压缩数据的校验值查询该压缩数据缓存映射模块,如果已经存在对应的被压缩数据就直接获取该被压缩数据,不再进行压缩处理;如果不存在对应的被压缩数据,则进行压缩处理,且得到的被压缩数据存储到压缩数据缓存映射模块中供其它会话访问,这样,对于同一数据只需要进行一次压缩即可,实现了去重计算,避免了服务器中多个会话重复进行相同的压缩计算处理,提高了服务器端的性能。It can be seen from the above that in some feasible embodiments of the present invention, the service for providing remote services The cache management device includes a compressed data cache mapping module, and the plurality of sessions can access the cache management device. When a session needs to compress data, the server first queries the compressed data by using the check value of the data to be compressed. The cache mapping module directly acquires the compressed data if the corresponding compressed data already exists, and does not perform compression processing; if there is no corresponding compressed data, performs compression processing, and the obtained compressed data is stored to the compressed data. The cache mapping module is used for other sessions to access, so that only one compression is needed for the same data, and the deduplication calculation is implemented, which avoids the repeated compression calculation processing of multiple sessions in the server, and improves the performance of the server.
(实施例三、)(Example 3)
请参考图8,本发明实施例还提供一种计算机设备800,可包括:Referring to FIG. 8, an embodiment of the present invention further provides a computer device 800, which may include:
处理器801,存储器803,总线804; Processor 801, memory 803, bus 804;
所述存储器803用于存储程序805,所述处理器801与所述存储器803通过所述总线804连接,当所述计算机设备800运行时,所述处理器801执行所述存储器810存储的所述程序805,以使所述计算机设备800执行如上文方法实施例所述的多会话下远程桌面或远程应用服务的数据处理方法。The memory 803 is configured to store a program 805, the processor 801 is connected to the memory 803 via the bus 804, and when the computer device 800 is running, the processor 801 executes the The program 805 is configured to cause the computer device 800 to perform a data processing method of a multi-session remote desktop or remote application service as described in the above method embodiments.
其中,计算机设备800,还可以包括通信接口802,所述通信接口802,用于接收和发送数据。The computer device 800 may further include a communication interface 802 for receiving and transmitting data.
其中,所述总线804可以是工业标准体系结构(Industry Standard Architecture,简称为ISA)总线或外部设备互连(Peripheral Component,简称为PCI)总线或扩展工业标准体系结构(Extended Industry Standard Architecture,简称为EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线中的一种或多种。为便于表示,图8中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The bus 804 may be an Industry Standard Architecture (ISA) bus or a Peripheral Component (PCI) bus or an Extended Industry Standard Architecture (abbreviated as an Extended Industry Standard Architecture). EISA) bus and so on. The bus can be divided into one or more of an address bus, a data bus, and a control bus. For ease of representation, only one thick line is shown in Figure 8, but it does not mean that there is only one bus or one type of bus.
所述存储器803用于存储可执行程序代码,程序代码包括计算机操作指令。所述存储器803可以包含高速RAM(Ramdom Access Memory)存储器。可选地,所述存储器803还可以还包括非易失性存储器(non-volatile memory)。例如所述存储器803可以包括磁盘存储器。The memory 803 is configured to store executable program code, the program code including computer operating instructions. The memory 803 may include a high speed RAM (Ramdom Access Memory) memory. Optionally, the memory 803 may further include a non-volatile memory. For example, the memory 803 can include a disk storage.
所述处理器801可以是中央处理器(Central Processing Unit,简称为CPU),或者所述处理器801可以是特定集成电路(Application Specific  Integrated Circuit,简称为ASIC),或者所述处理器801可以是被配置成实施本发明实施例的一个或多个集成电路。The processor 801 may be a central processing unit (CPU), or the processor 801 may be a specific integrated circuit (Application Specific) Integrated Circuit (abbreviated as ASIC), or the processor 801 can be one or more integrated circuits configured to implement embodiments of the present invention.
由上可见,在本发明的一些可行的实施方式中,提供了一种计算机设备,该计算机设备可以实施上文方法实施例提供的多会话下远程桌面或远程应用服务的数据处理方法,并取得该方法实施例的技术效果。It can be seen that, in some possible implementations of the present invention, a computer device is provided, which can implement the data processing method of the multi-session remote desktop or remote application service provided by the foregoing method embodiment, and obtain The technical effect of the method embodiment.
(实施例四、)(Embodiment 4,)
本发明实施例还提供一种存储一个或多个程序的计算机可读存储介质,所述一个或多个程序包括指令,所述指令当被包括一个或多个处理器的计算机设备执行时使所述计算机设备执行如上文方法实施例提供的多会话下远程桌面或远程应用服务的数据处理方法。Embodiments of the present invention also provide a computer readable storage medium storing one or more programs, the one or more programs including instructions that, when executed by a computer device including one or more processors The computer device performs a data processing method of a remote desktop or remote application service under multi-session as provided by the method embodiment above.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详细描述的部分,可以参见其它实施例的相关描述。In the above embodiments, the descriptions of the various embodiments are different, and the parts that are not described in detail in a certain embodiment can be referred to the related description of other embodiments.
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述动作顺序的限制,因为依据本发明,某些步骤可以采用其它顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。It should be noted that, for the foregoing method embodiments, for the sake of brevity, they are all described as a series of action combinations, but those skilled in the art should understand that the present invention is not limited by the described action sequence, because In accordance with the present invention, certain steps may be performed in other sequences or concurrently. In addition, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。A person skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the system, the device and the unit described above can refer to the corresponding process in the foregoing method embodiment, and details are not described herein again.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present application, it should be understood that the disclosed system, apparatus, and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of cells is only a logical function division. In actual implementation, there may be another division manner. For example, multiple units or components may be combined or integrated. Go to another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者 也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, ie may be located in one place, or It can also be distributed to multiple network elements. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。An integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, can be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium. A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the various embodiments of the present invention. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .
以上对本发明实施例所提供的多会话下远程服务的数据处理方法和系统进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。 The data processing method and system for the multi-session remote service provided by the embodiment of the present invention are described in detail. The principle and implementation manner of the present invention are described in the following. The description of the above embodiment is only used for the description. To help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in specific embodiments and application scopes. It should not be construed as limiting the invention.

Claims (11)

  1. 一种多会话下远程服务的数据处理方法,其特征在于,用于提供远程服务的服务器中运行有缓存管理装置和多个会话,第一会话是所述多个会话中的任一会话,所述多个会话都能访问所述缓存管理装置,所述缓存管理装置包括压缩数据缓存映射模块;所述方法包括:A data processing method for a remote service in a multi-session, characterized in that a server for providing a remote service runs a cache management device and a plurality of sessions, and the first session is any one of the plurality of sessions. The plurality of sessions can access the cache management device, and the cache management device includes a compressed data cache mapping module; the method includes:
    获取所述第一会话中的应用的待压缩数据;Obtaining data to be compressed of the application in the first session;
    计算所述待压缩数据的校验值;Calculating a check value of the data to be compressed;
    根据所述待压缩数据的校验值查询所述压缩数据缓存映射模块中是否存在所述待压缩数据对应的被压缩数据;Querying, according to the check value of the data to be compressed, whether the compressed data corresponding to the data to be compressed exists in the compressed data cache mapping module;
    若查询结果为存在,将查询到的所述待压缩数据对应的被压缩数据返回给所述应用;If the result of the query is yes, the compressed data corresponding to the to-be-compressed data that is queried is returned to the application;
    若查询结果为不存在,对所述待压缩数据进行压缩,得到所述待压缩数据对应的被压缩数据,将所述待压缩数据的校验值和所述待压缩数据对应的被压缩数据存储到所述压缩数据缓存映射模块中,并将所述待压缩数据对应的被压缩数据返回给所述应用。If the result of the query is not present, the data to be compressed is compressed to obtain compressed data corresponding to the data to be compressed, and the check value of the data to be compressed and the compressed data corresponding to the data to be compressed are stored. And to the compressed data cache mapping module, and return the compressed data corresponding to the data to be compressed to the application.
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述待压缩数据的校验值查询所述压缩数据缓存映射模块中是否存在所述待压缩数据对应的被压缩数据包括:The method according to claim 1, wherein the querying, according to the check value of the data to be compressed, whether the compressed data corresponding to the data to be compressed exists in the compressed data cache mapping module comprises:
    根据所述第一会话中的应用要求的压缩类型和所述待压缩数据的校验值,查询所述压缩数据缓存映射模块中是否存在所述压缩类型的、所述待压缩数据对应的被压缩数据;Querying, according to the compression type required by the application in the first session, and the check value of the data to be compressed, whether the compression type corresponding to the compression type is compressed in the compressed data cache mapping module data;
    所述对所述待压缩数据进行压缩包括:The compressing the data to be compressed includes:
    按照所述压缩类型对所述待压缩数据进行压缩。The data to be compressed is compressed according to the compression type.
  3. 根据权利要求1所述的方法,其特征在于,所述缓存管理装置为编码驱动,所述方法包括:The method of claim 1, wherein the cache management device is an encoding driver, the method comprising:
    所述第一会话获取所述第一会话中的应用的待压缩数据;The first session acquires data to be compressed of an application in the first session;
    所述编码驱动计算所述待压缩数据的校验值,根据所述待压缩数据的校验值查询所述压缩数据缓存映射模块中是否存在所述待压缩数据对应的被压缩数据;若查询结果为存在,将查询到的所述待压缩数据对应的被压缩数据返回给所述应用;若查询结果为不存在,对所述待压缩数据进行压缩,得 到所述待压缩数据对应的被压缩数据,将所述待压缩数据的校验值和所述待压缩数据对应的被压缩数据存储到所述压缩数据缓存映射模块中,并将所述待压缩数据对应的被压缩数据返回给所述应用。The encoding driver calculates a check value of the data to be compressed, and queries whether the compressed data corresponding to the data to be compressed exists in the compressed data cache mapping module according to the check value of the data to be compressed; For the existence, the compressed data corresponding to the to-be-compressed data is returned to the application; if the query result is not exist, the data to be compressed is compressed, And the compressed data corresponding to the data to be compressed and the compressed data corresponding to the data to be compressed are stored in the compressed data cache mapping module, and the compressed data is to be compressed. The compressed data corresponding to the data is returned to the application.
  4. 根据权利要求1所述的方法,其特征在于,所述缓存管理装置为编码驱动,所述方法包括:The method of claim 1, wherein the cache management device is an encoding driver, the method comprising:
    所述第一会话获取所述第一会话中的应用的待压缩数据,计算所述待压缩数据的校验值;The first session acquires data to be compressed of the application in the first session, and calculates a check value of the data to be compressed.
    所述编码驱动根据所述待压缩数据的校验值查询所述压缩数据缓存映射模块中是否存在所述待压缩数据对应的被压缩数据;若查询结果为存在,将查询到的所述待压缩数据对应的被压缩数据返回给所述应用;若查询结果为不存在,所述编码驱动对所述待压缩数据进行压缩,得到所述待压缩数据对应的被压缩数据,将所述待压缩数据的校验值和所述待压缩数据对应的被压缩数据存储到所述压缩数据缓存映射模块中,并将所述待压缩数据对应的被压缩数据返回给所述应用。The encoding driver queries whether the compressed data corresponding to the data to be compressed exists in the compressed data cache mapping module according to the check value of the data to be compressed; if the query result is existing, the queried to be compressed The compressed data corresponding to the data is returned to the application; if the query result is non-existent, the encoding driver compresses the data to be compressed to obtain compressed data corresponding to the data to be compressed, and the data to be compressed The compressed data corresponding to the data to be compressed is stored in the compressed data cache mapping module, and the compressed data corresponding to the data to be compressed is returned to the application.
  5. 根据权利要求1所述的方法,其特征在于,所述缓存管理装置为缓存驱动,所述方法包括:The method according to claim 1, wherein the cache management device is a cache driver, and the method comprises:
    所述第一会话获取所述第一会话中的应用的待压缩数据,计算所述待压缩数据的校验值;根据所述待压缩数据的校验值查询所述压缩数据缓存映射模块中是否存在所述待压缩数据对应的被压缩数据;若查询结果为存在,从所述缓存驱动获取查询到的所述待压缩数据对应的被压缩数据,将查询到的所述待压缩数据对应的被压缩数据返回给所述应用;若查询结果为不存在,对所述待压缩数据进行压缩,得到所述待压缩数据对应被压缩数据,将所述待压缩数据对应的被压缩数据返回给所述应用;The first session acquires data to be compressed of the application in the first session, calculates a check value of the data to be compressed, and queries whether the compressed data cache mapping module is used according to the check value of the data to be compressed. And the compressed data corresponding to the data to be compressed is obtained from the cache driver, and the compressed data corresponding to the data to be compressed is queried. The compressed data is returned to the application; if the result of the query is not present, the data to be compressed is compressed, and the compressed data is corresponding to the compressed data, and the compressed data corresponding to the compressed data is returned to the application;
    所述缓存驱动将所述待压缩数据的校验值和所述待压缩数据对应的被压缩数据存储到所述压缩数据缓存映射模块中。The cache driver stores the check value of the data to be compressed and the compressed data corresponding to the data to be compressed into the compressed data cache mapping module.
  6. 一种多会话下远程服务的数据处理系统,其特征在于,用于提供远程服务的服务器中运行有缓存管理装置和多个会话,第一会话是所述多个会话中的任一会话,所述多个会话都能访问所述缓存管理装置,所述缓存管理装置包括压缩数据缓存映射模块;所述系统包括:A multi-session remote service data processing system, characterized in that a server for providing a remote service runs a cache management device and a plurality of sessions, and the first session is any one of the plurality of sessions. The plurality of sessions can access the cache management device, and the cache management device includes a compressed data cache mapping module; the system includes:
    获取模块,用于获取所述第一会话中的应用的待压缩数据; An acquiring module, configured to acquire data to be compressed of an application in the first session;
    处理模块,用于计算所述待压缩数据的校验值;根据所述待压缩数据的校验值查询所述压缩数据缓存映射模块中是否存在所述待压缩数据对应的被压缩数据;若查询结果为存在,将查询到的所述待压缩数据对应的被压缩数据返回给所述应用;若查询结果为不存在,对所述待压缩数据进行压缩,得到所述待压缩数据对应的被压缩数据,将所述待压缩数据的校验值和所述待压缩数据对应的被压缩数据存储到所述压缩数据缓存映射模块中,并将所述待压缩数据对应的被压缩数据返回给所述应用。a processing module, configured to calculate a check value of the data to be compressed; and query, according to the check value of the data to be compressed, whether the compressed data corresponding to the data to be compressed exists in the compressed data cache mapping module; The result is that the compressed data corresponding to the data to be compressed is returned to the application; if the result of the query is not existing, the data to be compressed is compressed, and the corresponding data to be compressed is compressed. Data, storing the check value of the data to be compressed and the compressed data corresponding to the data to be compressed into the compressed data cache mapping module, and returning the compressed data corresponding to the data to be compressed to the application.
  7. 根据权利要求6所述的系统,其特征在于,The system of claim 6 wherein:
    所述处理模块,还用于:根据所述第一会话中的应用要求的压缩类型和所述待压缩数据的校验值,查询所述压缩数据缓存映射模块中是否存在所述压缩类型的、所述待压缩数据对应的被压缩数据;按照所述压缩类型对对所述待压缩数据进行压缩。The processing module is further configured to: query whether the compression type exists in the compressed data cache mapping module according to a compression type required by an application in the first session and a check value of the data to be compressed. The compressed data corresponding to the data to be compressed; and compressing the data to be compressed according to the compression type.
  8. 根据权利要求6所述的系统,其特征在于,所述缓存管理装置为编码驱动,所述获取模块部署在所述第一会话中,所述处理模块部署在所述编码驱动中。The system according to claim 6, wherein the cache management device is an encoding driver, the acquisition module is deployed in the first session, and the processing module is deployed in the encoding driver.
  9. 根据权利要求6所述的系统,其特征在于,所述缓存管理装置为编码驱动,所述获取模块部署在所述第一会话中;所述处理模块包括:The system of claim 6, wherein the cache management device is an encoding driver, the acquisition module is deployed in the first session; and the processing module comprises:
    计算单元,部署在所述第一会话中,用于计算所述待压缩数据的校验值;a calculating unit, configured to calculate a check value of the data to be compressed, in the first session;
    查询单元,部署在所述编码驱动中,用于根据所述待压缩数据的校验值查询所述压缩数据缓存映射模块中是否存在所述待压缩数据对应的被压缩数据;若查询结果为存在,将查询到的所述待压缩数据对应的被压缩数据返回给所述应用;The query unit is deployed in the encoding driver, and is configured to query, according to the check value of the data to be compressed, whether the compressed data corresponding to the data to be compressed exists in the compressed data cache mapping module; if the query result is And returning the compressed data corresponding to the to-be-compressed data to the application;
    编码单元,部署在所述编码驱动中,用于若查询结果为不存在,对所述待压缩数据进行压缩,得到所述待压缩数据对应的被压缩数据;a coding unit, configured to be used in the coding driver, to compress the data to be compressed to obtain compressed data corresponding to the data to be compressed if the query result is not present;
    所述查询单元,还用于若查询结果为不存在,将所述待压缩数据的校验值和所述待压缩数据对应的被压缩数据存储到所述压缩数据缓存映射模块中,并将所述待压缩数据对应的被压缩数据返回给所述应用。The query unit is further configured to: when the query result is non-existent, store the check value of the data to be compressed and the compressed data corresponding to the data to be compressed into the compressed data cache mapping module, and The compressed data corresponding to the compressed data is returned to the application.
  10. 根据权利要求6所述的系统,其特征在于,所述缓存管理装置为缓存驱动,所述获取模块部署在所述第一会话中,所述处理模块包括:The system of claim 6, wherein the cache management device is a cache driver, the acquisition module is deployed in the first session, and the processing module comprises:
    计算单元,部署在所述第一会话中,用于计算所述待压缩数据的校验值; a calculating unit, configured to calculate a check value of the data to be compressed, in the first session;
    查询单元,部署在所述第一会话中,用于根据所述待压缩数据的校验值查询所述压缩数据缓存映射模块中是否存在所述待压缩数据对应的被压缩数据;若查询结果为存在,从所述缓存驱动获取查询到的所述待压缩数据对应的被压缩数据,将查询到的所述待压缩数据对应的被压缩数据返回给所述应用;The query unit is deployed in the first session, and is configured to query, according to the check value of the data to be compressed, whether the compressed data corresponding to the data to be compressed exists in the compressed data cache mapping module; The compressed data corresponding to the to-be-compressed data that is queried is obtained from the cache driver, and the compressed data corresponding to the queried data to be compressed is returned to the application;
    编码单元,部署在所述第一会话中,用于若查询结果为不存在,对所述待压缩数据进行压缩,得到所述待压缩数据对应被压缩数据;a coding unit, configured to be used in the first session, to compress the data to be compressed if the result of the query is not present, to obtain the compressed data corresponding to the data to be compressed;
    存储单元,部署在所述缓存驱动中,用于将所述待压缩数据的校验值和所述待压缩数据对应的被压缩数据存储到所述压缩数据缓存映射模块中;a storage unit, configured to store the check value of the data to be compressed and the compressed data corresponding to the data to be compressed into the compressed data cache mapping module;
    所述查询单元,还用于若查询结果为不存在,将所述待压缩数据对应的被压缩数据返回给所述应用。The query unit is further configured to: when the query result is non-existent, return the compressed data corresponding to the data to be compressed to the application.
  11. 一种计算机设备,其特征在于,所述计算机设备包括处理器、存储器、总线;所述存储器用于存储程序,所述处理器与所述存储器通过所述总线连接,当所述计算机设备运行时,所述处理器执行所述存储器存储的所述程序,以使所述计算机设备执行如权利要求1-5中任一项所述的方法。 A computer device, comprising: a processor, a memory, a bus; the memory is for storing a program, the processor is connected to the memory through the bus, when the computer device is running The processor executes the program stored by the memory to cause the computer device to perform the method of any of claims 1-5.
PCT/CN2016/099588 2015-11-27 2016-09-21 Method and system for processing data of remote service for multiple sessions WO2017088571A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510854163.0A CN106817386B (en) 2015-11-27 2015-11-27 Data processing method and system for remote service under multiple sessions
CN201510854163.0 2015-11-27

Publications (1)

Publication Number Publication Date
WO2017088571A1 true WO2017088571A1 (en) 2017-06-01

Family

ID=58763000

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/099588 WO2017088571A1 (en) 2015-11-27 2016-09-21 Method and system for processing data of remote service for multiple sessions

Country Status (2)

Country Link
CN (1) CN106817386B (en)
WO (1) WO2017088571A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1671103A (en) * 2004-03-15 2005-09-21 微软公司 Data compression
WO2011066472A1 (en) * 2009-11-25 2011-06-03 Framehawk, Inc. Methods for interfacing with a virtualized computing service over a network using a lightweight client
CN102195968A (en) * 2010-03-02 2011-09-21 微软公司 Algorithm execution output cache
US20120214446A1 (en) * 2011-02-18 2012-08-23 Mitel Networks Corporation System for updating presentations on mobile devices and methods thereof

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101047711B (en) * 2006-04-27 2010-08-18 华为技术有限公司 Method for IP message transmitting, bargaining bandwidth saving ability and saving network bandwidth
CN101320372B (en) * 2008-05-22 2012-07-04 上海爱数软件有限公司 Compression method for repeated data

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1671103A (en) * 2004-03-15 2005-09-21 微软公司 Data compression
WO2011066472A1 (en) * 2009-11-25 2011-06-03 Framehawk, Inc. Methods for interfacing with a virtualized computing service over a network using a lightweight client
CN102195968A (en) * 2010-03-02 2011-09-21 微软公司 Algorithm execution output cache
US20120214446A1 (en) * 2011-02-18 2012-08-23 Mitel Networks Corporation System for updating presentations on mobile devices and methods thereof

Also Published As

Publication number Publication date
CN106817386B (en) 2020-03-10
CN106817386A (en) 2017-06-09

Similar Documents

Publication Publication Date Title
US10977062B2 (en) System for starting virtual machine using mirror image file stored in units of a distributed block storage system mapped to units of a logical volume
CN111857550B (en) Method, apparatus and computer readable medium for data deduplication
WO2019001006A1 (en) Method and device for encoding and decoding image data
US10958416B2 (en) Encrypted and compressed data transmission with padding
CN109918205B (en) Edge equipment scheduling method, system, device and computer storage medium
CN110297680B (en) Method and device for transmitting virtual desktop image
US20190325043A1 (en) Method, device and computer program product for replicating data block
US10715623B2 (en) Caching for data store clients using expiration times
US20180232858A1 (en) Image compression method, image reconstruction method, image compression device, image reconstruction device, and image compression and reconstruction system
CN114116635A (en) Parallel decompression of compressed data streams
CN113296709A (en) Method and apparatus for deduplication
US11653009B2 (en) Multi-pixel caching scheme for lossless encoding
CN104376584B (en) A kind of method of data compression, computer system and device
CN111405293B (en) Video transmission method and device
US10528282B2 (en) Modifying and utilizing a file structure in a dispersed storage network
US9286055B1 (en) System, method, and computer program for aggregating fragments of data objects from a plurality of devices
CN113138969A (en) Data transmission method and device, electronic equipment and computer readable storage medium
US10833702B1 (en) Interpolation search to find arbitrary offsets in a compressed stream
CN108494700B (en) Cross-link data transmission method and device, computer equipment and storage medium
WO2017088571A1 (en) Method and system for processing data of remote service for multiple sessions
US11662953B2 (en) Data compression/decompression system, and data compression/decompression method
US10168909B1 (en) Compression hardware acceleration
CN109190039B (en) Method and device for determining similar objects and computer readable storage medium
US10585626B2 (en) Management of non-universal and universal encoders
US20190258728A1 (en) Footers for compressed objects

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16867798

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16867798

Country of ref document: EP

Kind code of ref document: A1