Background
Desktop transmission refers to screen transmission between two or more computers, and desktop transmission can enable different users across regions to transmit the same computer page, so as to help different users across regions to better communicate, for example, for an enterprise conference, enterprise users in different regions can view enterprise information across regions in real time through the desktop conference.
At present, desktop transmission is usually realized by installing a plug-in a computer, such as an applet plug-in, but the realization of desktop transmission through the plug-in usually requires that a native program is installed at a client of the computer, which easily causes a delay phenomenon when graphical interface data is loaded, so that graphical interface response of desktop transmission is not timely enough.
Content of application
In order to solve the above technical problem or at least partially solve the above technical problem, the present application provides a desktop transmission method and apparatus based on a web server, and a computer-readable storage medium, which can avoid a phenomenon of delay in loading graphical interface data and shorten a response time of a graphical interface for desktop transmission.
In a first aspect, the present application provides a desktop transmission method based on a web server, where the method is applied to the web server and includes:
receiving graphical interface data transmitted by a main client, and loading the graphical interface data into a graphical interface transmission module pre-established in a web server;
carrying out data coding on the graphical interface data in the graphical interface transmission module to obtain coded graphical interface data;
responding to at least one graphical interface transmission request of a slave client, and inquiring coded graphical interface data of the graphical interface transmission request from the graphical interface transmission module to obtain target graphical interface data;
and creating a graphical transmission interface according to the target graphical interface data, and returning the graphical transmission interface to the slave client.
It can be seen that, in the embodiment of the present application, the graphical interface data transmitted from the host client is loaded in the graphical interface transmission module pre-created in the web server, so that the calculation speed of the subsequent graphical interface data can be increased, and the rapid transmission of the graphical interface data can be realized; secondly, the embodiment of the application carries out data coding on the graphical interface data in the graphical interface transmission module to obtain coded graphical interface data, can compress the storage space of the graphical interface data in the graphical interface transmission module, and improves the calculation speed of the subsequent graphical interface data, thereby improving the generation speed of the transmission graphical interface of the subsequent slave client; furthermore, according to the graphical interface transmission request of the slave client, the graphical transmission interface is created after the corresponding graphical interface data is inquired, and graphical interface transmission between the master client and the slave client can be guaranteed.
In a possible implementation manner of the first aspect, the receiving graphical interface data transmitted by the host client includes:
creating a data transmission protocol and a data transmission channel of the main client and the web server;
and acquiring the graphical interface data transmitted by the main client according to the data transmission protocol and the data transmission channel.
In one possible implementation manner of the first aspect, the creating a data transmission channel between the host client and the web server includes:
creating a two-way communication link between the web server and the primary client;
and according to the bidirectional communication link, loading the physical address and the port of the main client in the link node of the web server, and loading the physical address and the port of the web server in the link node of the main client to obtain the data transmission channel.
In a possible implementation manner of the first aspect, before the loading, to the graphical interface data, the graphical interface transmission module created in advance in the web server further includes:
inquiring a storage area in the web server, and configuring a graphic buffer file in the storage area;
opening up a graphic buffer area in the storage area according to the graphic buffer file;
and configuring graphical interface transmission parameters in the graphical buffer area to obtain a graphical interface transmission module.
In a possible implementation manner of the first aspect, the performing data encoding on the graphical interface data in the graphical interface transmission module to obtain encoded graphical interface data includes:
performing interframe coding on the graphical interface data in the graphical interface transmission module to obtain initial coding graphical interface data;
and carrying out intra-frame coding on the initial coding graphic interface data to obtain coding graphic interface data.
In a possible implementation manner of the first aspect, the intra-frame encoding the initial encoded graphical interface data to obtain encoded graphical interface data includes:
carrying out Fourier transform on the initial coding graphical interface data to obtain frequency domain coding graphical interface data;
and filtering the interference signals in the frequency domain coding graphical interface data to obtain the coding graphical interface data.
In a possible implementation manner of the first aspect, the creating a graphical transmission interface according to the target graphical interface data includes:
inquiring interface layout logic and interface layout mode of the target graphic interface data;
and according to the interface layout logic and the interface layout mode, carrying out transmission interface creation on the target graphical interface data by using an interface generation tool to obtain a graphical transmission interface.
In a second aspect, the present application provides a desktop transmission apparatus based on a web server, where the apparatus is applied in the web server, and includes:
the data loading module is used for receiving the graphical interface data transmitted by the main client and loading the graphical interface data to a graphical interface transmission module which is pre-established in the web server;
the data coding module is used for carrying out data coding on the graphical interface data in the graphical interface transmission module to obtain coded graphical interface data;
the data query module is used for responding to at least one graphical interface transmission request of a slave client, querying the coded graphical interface data of the graphical interface transmission request from the graphical interface transmission module to obtain target graphical interface data;
and the interface generation module is used for creating a graphical transmission interface according to the target graphical interface data and returning the graphical transmission interface to the slave client.
In a third aspect, the present application provides a web server comprising:
at least one processor; and a memory communicatively coupled to the at least one processor;
wherein the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the web server based desktop transmission method as described in any one of the above first aspects.
In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program, which when executed by a processor implements the web server-based desktop transmission method according to any one of the first aspect.
It is understood that the beneficial effects of the second to fourth aspects can be seen from the description of the first aspect, and are not described herein again.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 1 is a system architecture diagram of a desktop transmission method based on a web server according to an embodiment of the present application. The desktop transmission method based on the web server according to the embodiment of the present application can be applied to a system architecture including the web server 1, the master client 2 and at least one slave client 3.
In one embodiment of the present application, the main client 2 is configured to send graphical interface data, and the web server 1 loads the graphical interface data to a graphical interface transmission module in the web server 1, and performs data compression on the graphical interface data in the graphical interface transmission module. The slave client 3 is used for sending a graphical interface transmission request, and the web server 1 inquires graphical interface data from the graphical interface transmission module according to the graphical interface transmission request, creates a graphical transmission interface of the graphical interface data and returns the graphical transmission interface to the slave client 3.
A method for transmitting a desktop based on a web server according to an embodiment of the present application is described with reference to a flowchart shown in fig. 2. The desktop transmission method based on the web server described in fig. 2 is applied to the web server, and includes:
and S1, receiving the graphical interface data transmitted by the main client, and loading the graphical interface data into a graphical interface transmission module pre-created in the web server.
It should be understood that the client refers to a computer connected to the server, and in the embodiment of the present application, the master client corresponds to a slave client, and the master client may be understood as a computer that transmits a local graphical user interface to the slave client through the server, and the slave client may be understood as a computer that loads the graphical user interface of the master client through the server. The Graphical User Interface (GUI) is an interface display format for human-computer communication, allowing a user to manipulate icons or menu options on a screen using an input device such as a mouse to select commands, call files, launch programs, or perform other daily tasks.
Further, in this embodiment of the present application, the graphical interface data refers to data in the GUI, and includes: the GUI display method includes interface image data and interface information data, where the interface image data refers to screen data forming a GUI, such as interface layout data, interface style data, interface view data, and the like, and the interface information data refers to page data specifically included in the GUI, such as interface content data, interface layout data, and the like.
In an optional embodiment of the present application, the receiving graphical interface data transmitted by the host client includes: and establishing a data transmission protocol and a data transmission channel of the main client and the web server, and acquiring the graphical interface data transmitted by the main client according to the data transmission protocol and the data transmission channel.
In an alternative embodiment, the data transfer protocols of the host client and the web server include HTTP protocol, HTTPs protocol, and HTML5 protocol.
In an optional embodiment, the creating a data transmission channel between the host client and the web server includes: and creating a two-way communication link between the web server and the main client, loading the physical address and the port of the main client in a link node of the web server according to the two-way communication link, and loading the physical address and the port of the web server in the link node of the main client to obtain the data transmission channel. The bidirectional communication link is constructed through a socket, and the physical address and the port are used for representing identity information of the web server and the host client.
Further, according to the embodiment of the application, the graphical interface data is loaded into the graphical interface transmission module which is pre-created in the web server, so that the calculation speed of the subsequent graphical interface data can be increased, and the rapid transmission of the graphical interface data is realized. The graphical interface transmission module can be understood as a data buffer area opened in the web server and is used for specially reading data transmitted by the graphical interface and improving the response speed of the graphical interface transmission.
Further, in another optional embodiment of the present application, before the loading the graphical interface data into the graphical interface transmission module created in advance in the web server, the method further includes: inquiring a storage area in the web server, configuring a graphic buffer file in the storage area, opening up a graphic buffer area in the storage area according to the graphic buffer file, and configuring a graphic interface transmission parameter in the graphic buffer area to obtain a graphic interface transmission module.
The storage area may be a memory or a hard disk of the web server, the graphics buffer file may be an Apache configuration file, and the graphical interface transmission parameter is used to represent a graphical object and a graphical logic of the graphics buffer area.
Further, the loading of the graphical interface data in the graphical interface transmission module created in advance in the web server includes: and creating a graphic loading program in the graphic interface transmission module, and loading the graphic interface data into the graphic interface transmission module by using a graphic loading script in the graphic loading program. The graphics loading program can be compiled through a Java language, and the graphics loading script can be compiled through a JavaScript scripting language.
And S2, carrying out data coding on the graphical interface data in the graphical interface transmission module to obtain coded graphical interface data.
It should be appreciated that the graphical interface data is generated based on a graphical interface, and the amount of data contained in the graphical interface data is huge, in other words, the graphical interface data needs to occupy a large storage resource, and since the web server itself needs a large amount of storage resources for computing and analyzing the application service, in order to reduce the storage resource of the graphical interface data in the web server and increase the computing speed of the web server, in the embodiment of the present application, the graphical interface data in the graphical interface transmission module is subjected to data encoding to compress the storage space of the graphical interface data in the graphical interface transmission module, so as to increase the computing speed of the subsequent graphical interface data, thereby increasing the generation speed of the subsequent transmission graphical interface from the client.
In one embodiment of the present application, referring to fig. 3, the performing data encoding on the graphical interface data in the graphical interface transmission module to obtain encoded graphical interface data includes:
s301, performing interframe coding on the graphical interface data in the graphical interface transmission module to obtain initial coding graphical interface data;
s302, carrying out intra-frame coding on the initial coding graphic interface data to obtain coding graphic interface data.
The inter-frame coding refers to performing redundancy deletion on picture information in the graphical interface data, the picture information comprises brightness information and chrominance information, and the intra-frame coding refers to converting the graphical interface data from a spatial domain to a frequency domain for compression analysis.
In an alternative embodiment, the inter-frame encoding may be implemented by an inter-frame data compression technique.
In an alternative embodiment, the S302 includes: carrying out Fourier transform on the initial coding graphical interface data to obtain frequency domain coding graphical interface data; and filtering the interference signals in the frequency domain coding graphical interface data to obtain the coding graphical interface data. The short-time Fourier transform is used for converting the initial coding graphic interface data from a space domain into a frequency domain so as to analyze an interference signal frequency band of the initial coding graphic interface data.
Further, in another optional embodiment of the present application, the initial encoded graphical interface data is fourier transformed using the following formula:
wherein, F (omega) represents frequency domain coding graphic interface data, F (t) represents initial coding graphic interface data, and e represents wireless non-cyclic decimal.
Further, in another optional embodiment of the present application, the interference signal in the frequency domain encoded graphical interface data is filtered by using the following formula:
Y(n)=αX(n)+(1-α)Y(n-1)
wherein, Y (n) represents the filtering output value of the interference signal, α represents the filtering coefficient, x (n) represents the filtering sampling value of the interference signal of the current time of the frequency domain coding graphic interface data, and Y (n-1) represents the filtering output value of the interference signal of the last time of the frequency domain coding graphic interface data.
S3, responding at least one graphical interface transmission request from the client, inquiring the coded graphical interface data of the graphical interface transmission request from the graphical interface transmission module to obtain the target graphical interface data.
As can be seen from the above, the slave client corresponds to the master client and is used for loading the graphical interface of the master client, it should be understood that in an actual business scenario, there may be a plurality of slave clients for loading the graphical interface of the same master client, for example, in an enterprise meeting scenario, enterprise a may be an initiator of a meeting, and enterprise B, enterprise C, and enterprise D may be participants of the meeting, so that the client of enterprise a may be a master client, and the clients of enterprise B, enterprise C, and enterprise D may be slave clients. Therefore, the embodiment of the application responds to the graphical interface transmission request of at least one slave client to ensure that the graphical interface of the master client can be transmitted with different slave clients.
In this embodiment of the application, before querying the encoded interface graphical data of the graphical interface transmission request from the graphical interface transmission module, the method further includes: verifying whether the client has the inquiry authority for coding the graphic data, if not, returning an error state code to the client, and if so, inquiring the coded graphic data requested by the graphic interface transmission module. Wherein the query right can be obtained by querying whether the slave client has the right to access the corresponding master client of the encoded graphics data.
Based on the verification of the inquiry authority, the condition that some illegal clients steal the graphical interface data of the main client can be prevented, and the security of the graphical interface data of the main client is guaranteed.
Further, the querying, in response to at least one gui transmission request from the client, encoded gui data of the gui transmission request from the gui transmission module to obtain target gui data includes: and acquiring a request field of the graphical interface transmission request, and inquiring the coded graphical interface data of the graphical interface transmission request in the graphical interface transmission module by using an inquiry statement according to the request field to obtain target graphical interface data.
The request field is used for characterizing the parameter object of the image interface required to be acquired from the client, and the query statement comprises an SQL statement, such as a select statement.
And S4, creating a graphical transmission interface according to the target graphical interface data, and returning the graphical transmission interface to the slave client.
In one embodiment of the present application, referring to fig. 4, the creating a graphical transmission interface according to the target graphical interface data includes:
s401, inquiring interface layout logic and an interface layout mode of the target graphic interface data;
s402, according to the interface layout logic and the interface layout mode, transmission interface creation is carried out on the target graphic interface data through an interface generation tool, and a graphic transmission interface is obtained.
The interface layout logic refers to a connection relationship of target graphical interface data on a client display interface, for example, the connection relationship of a chart A and a chart B in the client display interface is nested, and the interface layout mode refers to a layout style of the target graphical interface data on the client display interface, for example, the layout style of the chart A in the client display interface is an oval shape. Further, the interface layout logic and the interface layout mode are obtained by querying a compiling environment of the host client corresponding to the target graphical interface data, and optionally, the compiling environment includes a myeclipse environment.
In an alternative embodiment, the interface generation tool is compiled from the Java language.
Further, the graphical transmission interface is returned to the slave client, so that graphical interface transmission between the master client and the slave client is achieved.
According to the embodiment of the application, the graphical interface data transmitted by the host client are loaded in the graphical interface transmission module pre-established in the web server, so that the calculation speed of the subsequent graphical interface data can be improved, and the rapid transmission of the graphical interface data is realized; secondly, the embodiment of the application carries out data coding on the graphical interface data in the graphical interface transmission module to obtain coded graphical interface data, can compress the storage space of the graphical interface data in the graphical interface transmission module, and improves the calculation speed of the subsequent graphical interface data, thereby improving the generation speed of the transmission graphical interface of the subsequent slave client; furthermore, according to the graphical interface transmission request of the slave client, the graphical transmission interface is created after the corresponding graphical interface data is inquired, and graphical interface transmission between the master client and the slave client can be guaranteed.
Fig. 5 is a functional block diagram of a desktop transmission apparatus based on a web server according to the present application.
The web server-based desktop transmission apparatus 500 may be installed in a web server. According to the realized functions, the desktop transmission device based on the web server can comprise a data loading module 501, a data encoding module 502, a data query module 503 and an interface generating module 504. A module according to the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of a web server and that can perform a fixed function, and that are stored in a memory of the web server.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the data loading module 501 is configured to receive graphical interface data transmitted by a host client, and load the graphical interface data into a graphical interface transmission module pre-created in a web server;
the data encoding module 502 is configured to perform data encoding on the graphical interface data in the graphical interface transmission module to obtain encoded graphical interface data;
the data query module 503 is configured to, in response to at least one graphical interface transmission request from a client, query encoded graphical interface data of the graphical interface transmission request from the graphical interface transmission module to obtain target graphical interface data;
the interface generating module 504 is configured to create a graphical transmission interface according to the target graphical interface data, and return the graphical transmission interface to the slave client.
In detail, when the modules in the desktop transmission apparatus 500 based on a web server in the embodiment of the present application are used, the same technical means as the desktop transmission method based on a web server described in fig. 2 and fig. 4 are adopted, and the same technical effect can be produced, and details are not described here.
Fig. 6 is a schematic structural diagram of a web server for implementing the desktop transmission method based on the web server according to the present application.
The web server 6 may include a processor 60, a memory 61, a communication bus 62 and a communication interface 63, and may further include a computer program, such as a web server-based desktop transport program, stored in the memory 61 and operable on the processor 60.
In some embodiments, the processor 60 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 60 is a Control Unit (Control Unit) of the web server, connects various components of the entire web server using various interfaces and lines, and executes various functions of the web server and processes data by running or executing programs or modules stored in the memory 61 (e.g., executing a desktop transport program based on the web server, etc.), and calling data stored in the memory 61.
The memory 61 includes at least one type of readable storage medium including flash memory, removable hard disks, multimedia cards, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disks, optical disks, etc. The memory 61 may in some embodiments be an internal storage unit of a web server, for example a removable hard disk of the web server. The memory 61 may also be an external storage device of the web server in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, provided on the web server. Further, the memory 61 may also include both an internal storage unit of the web server and an external storage device. The memory 61 may be used not only to store application software installed in the web server and various types of data, such as codes of a desktop transmission program based on the web server, etc., but also to temporarily store data that has been output or will be output.
The communication bus 62 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 61 and at least one processor 60 or the like.
The communication interface 63 is used for communication between the web server and other devices, and includes a network interface and a user interface. Optionally, the network interface may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), which is typically used to establish a communication connection between the web server and other web servers. The user interface may be a Display (Display), an input unit such as a Keyboard (Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the web server and for displaying a visualized user interface.
Fig. 6 shows only a web server with components, and those skilled in the art will appreciate that the architecture shown in fig. 6 does not constitute a limitation of the web server, and may include fewer or more components than those shown, or some components in combination, or a different arrangement of components.
For example, although not shown, the web server may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 60 through a power management device, so that functions of charge management, discharge management, power consumption management, and the like are implemented through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The web server may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The web server based desktop transport 62 stored by the memory 61 in the web server 6 is a combination of a plurality of computer programs that, when executed in the processor 60, may implement:
receiving graphical interface data transmitted by a main client, and loading the graphical interface data into a graphical interface transmission module pre-established in a web server;
carrying out data coding on the graphical interface data in the graphical interface transmission module to obtain coded graphical interface data;
responding to at least one graphical interface transmission request of a slave client, and inquiring coded graphical interface data of the graphical interface transmission request from the graphical interface transmission module to obtain target graphical interface data;
and creating a graphical transmission interface according to the target graphical interface data, and returning the graphical transmission interface to the slave client.
Specifically, the processor 60 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1 for a specific implementation method of the computer program, which is not described herein again.
Further, the integrated modules/units of the web server 6, if implemented in the form of software functional units and sold or used as separate products, may be stored in a non-volatile computer-readable storage medium. The computer readable storage medium may be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
The present application also provides a computer-readable storage medium storing a computer program that, when executed by a processor of a web server, may implement:
receiving graphical interface data transmitted by a main client, and loading the graphical interface data into a graphical interface transmission module pre-established in a web server;
carrying out data coding on the graphical interface data in the graphical interface transmission module to obtain coded graphical interface data;
responding to at least one graphical interface transmission request of a slave client, and inquiring coded graphical interface data of the graphical interface transmission request from the graphical interface transmission module to obtain target graphical interface data;
and creating a graphical transmission interface according to the target graphical interface data, and returning the graphical transmission interface to the slave client.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the present application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is merely exemplary of the present application and is presented to enable those skilled in the art to understand and practice the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.