Screen monitoring method and device, storage medium and electronic equipment
By generating and transmitting screen differential data, the problem of low transmission efficiency of high-resolution screen images in the prior art is solved, and more efficient network traffic utilization and monitoring effects are achieved.
Patent Information
- Application Number
- CN202410989417.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-11-12
AI Technical Summary
The prior art uses more network traffic and bandwidth when transmitting screen images with higher resolution, resulting in lower transmission efficiency and affecting the screen monitoring effect.
By receiving the screen monitoring instructions sent by the server, the terminal's first screen Bitmap and the screen Bitmap after the preset time are obtained, the screen difference data is generated, and the compressed difference data is sent to the server for generating a monitoring interface.
It reduces the transmitted data volume and network traffic, improves transmission efficiency, and improves screen monitoring effect.
Smart Images

Figure CN118945073A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a screen monitoring method, device, storage medium and electronic device. Background Art
[0002] Screen monitoring can be applied to terminal dialing tasks, which is the process of automating the testing of network service quality and performance using specific terminal equipment or software tools in the network communication and telecommunications industries.
[0003] At present, the related technology obtains the screen image of the terminal by taking a screenshot, and then sends the screen image to the background for monitoring.
[0004] However, when the related technology transmits screen images with higher resolution, the transmission process needs to occupy more network traffic and bandwidth, resulting in low transmission efficiency, which in turn affects the screen monitoring effect. Summary of the invention
[0005] In view of this, the present application provides a screen monitoring method, device, storage medium and electronic device, the main purpose of which is to improve the technical problem that when transmitting screen images with higher resolutions, the transmission process of the current related technology requires more network traffic and bandwidth, resulting in low transmission efficiency, which in turn affects the screen monitoring effect.
[0006] In a first aspect, the present application provides a screen monitoring method, comprising:
[0007] Receive screen monitoring instructions sent by the server;
[0008] According to the screen monitoring instruction, a first screen Bitmap and a second screen Bitmap are obtained, wherein the first screen Bitmap is a first screen Bitmap of the terminal, and the second screen Bitmap is a screen Bitmap generated by the terminal after a preset time;
[0009] Compare the first screen Bitmap with the second screen Bitmap to generate screen difference data;
[0010] The screen difference data is compressed, and the compressed screen difference data is sent to the server, and the server is used to generate a monitoring interface corresponding to the terminal according to the compressed screen difference data.
[0011] In a second aspect, the present application provides a screen monitoring device, comprising:
[0012] A generation module is configured to receive a screen monitoring instruction sent by a server;
[0013] An input module is configured to obtain a first screen Bitmap and a second screen Bitmap according to the screen monitoring instruction, wherein the first screen Bitmap is a first screen Bitmap of the terminal, and the second screen Bitmap is a screen Bitmap generated by the terminal after a preset time;
[0014] A generating module, configured to compare the first screen Bitmap with the second screen Bitmap to generate screen difference data;
[0015] The compression module is configured to compress the screen difference data and send the compressed screen difference data to the server, and the server is used to generate a monitoring interface corresponding to the terminal according to the compressed screen difference data.
[0016] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the screen monitoring method described in the first aspect.
[0017] In a fourth aspect, the present application provides an electronic device, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the screen monitoring method described in the first aspect when executing the computer program.
[0018] In a fifth aspect, the present application provides a computer program product having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the screen monitoring method described in the first aspect.
[0019] By means of the above technical scheme, the present application provides a screen monitoring method, device, storage medium and electronic device, first receiving a screen monitoring instruction sent by a server; obtaining a first screen Bitmap and a second screen Bitmap according to the screen monitoring instruction, wherein the first screen Bitmap is the first screen Bitmap of the terminal, and the second screen Bitmap is the screen Bitmap generated by the terminal after a preset time; comparing the first screen Bitmap with the second screen Bitmap to generate screen difference data; compressing the screen difference data, and sending the compressed screen difference data to the server, wherein the server is used to generate a monitoring interface corresponding to the terminal according to the compressed screen difference data. Compared with the current prior art, the present application can obtain the first screen Bitmap and the second screen Bitmap according to the screen monitoring instruction, obtain the difference screen data by comparing the first screen Bitmap and the second screen Bitmap, and then send the compressed difference screen data to the server, so that the server generates the monitoring interface of the terminal according to the difference screen data, and reduces the data and data volume to be transmitted by transmitting the compressed difference screen data, thereby reducing the network traffic and bandwidth during the transmission process, improving the transmission efficiency, and improving the screen monitoring effect.
[0020] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0022] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0023] Figure 1 A schematic diagram of a screen monitoring method provided in an embodiment of the present application is shown;
[0024] Figure 2 A schematic diagram of a screen monitoring method provided in an embodiment of the present application is shown;
[0025] Figure 3 A schematic diagram of an example process provided by an embodiment of the present application is shown;
[0026] Figure 4 A schematic diagram of an example process provided by an embodiment of the present application is shown;
[0027] Figure 5 A schematic diagram of an example process provided by an embodiment of the present application is shown;
[0028] Figure 6 A schematic structural diagram of a screen monitoring device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0029] The embodiments of the present application will be described in more detail below with reference to the accompanying drawings. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.
[0030] In order to improve the technical problem that when transmitting high-resolution screen images in the current related technology, the transmission process requires more network traffic and bandwidth, resulting in low transmission efficiency, thereby affecting the screen monitoring effect. This embodiment provides a screen monitoring method, such as Figure 1 As shown, the method includes:
[0031] Step 101: Receive a screen monitoring instruction sent by a server.
[0032] In this embodiment, the server (backend) can first initiate a screen monitoring command to the terminal, so that the terminal executes the corresponding test process and returns the terminal screen image to the server. This method of using screen monitoring to perform terminal test is flexible, operable, visual, and intuitive, and is convenient for testing the performance of the terminal. The screen monitoring command may include but is not limited to information such as clarity.
[0033] Step 102: According to the screen monitoring instruction, a first screen Bitmap and a second screen Bitmap are obtained, wherein the first screen Bitmap is the first screen Bitmap of the terminal, and the second screen Bitmap is the screen Bitmap generated by the terminal after a preset time.
[0034] Exemplarily, when the background initiates a screen monitoring command, the terminal can parse the screen monitoring command. After the command parsing is completed, the screen application program interface (API) provided by the system is called to obtain the first screen Bitmap (reference Bitmap) of the terminal. The first screen Bitmap can be a bitmap representation of the screen content that is first presented on the terminal interface. The acquisition time interval can be set, and then updated according to the acquisition time interval, which is used to compare with the second screen Bitmap to observe the difference with the second screen Bitmap. Correspondingly, the second screen Bitmap can be updated according to the preset time, wherein the preset time can be in milliseconds, shortening the screen update time. When executing the terminal dialing task, it can avoid the situation where the key interface is lost due to the non-real-time dialing and the background can quickly refresh the terminal's monitoring interface to achieve smooth terminal dialing and real-time monitoring of the dialing process.
[0035] Step 103: Compare the first screen Bitmap with the second screen Bitmap to generate screen difference data.
[0036] Exemplarily, by comparing the pixels of the first screen Bitmap and the second screen Bitmap one by one, pixels with different color values can be determined as difference pixels, and the difference pixels and the color values corresponding to the difference pixels are stored in a preset storage location. The differential data of the first screen Bitmap and the second screen Bitmap are obtained as screen difference data, thereby reducing the screen data transmitted during screen monitoring and improving transmission efficiency.
[0037] Step 104 , compress the screen difference data, and send the compressed screen difference data to the server, which is used to generate a monitoring interface corresponding to the terminal according to the compressed screen difference data.
[0038] For example, the zlib utility library can be used to compress screen difference data, reduce the size of screen difference data, and thus reduce the terminal memory usage, while reducing the terminal traffic consumption and network speed impact, and then send the compressed screen difference data to the server to improve transmission efficiency, reduce network traffic and bandwidth during transmission, improve screen monitoring effects, and improve terminal dialing efficiency. Correspondingly, after receiving the compressed screen difference data, the server can decompress it and generate a monitoring interface corresponding to the terminal, and perform terminal dialing according to the monitoring interface.
[0039] Compared with the current existing technology, this embodiment can obtain the first screen Bitmap and the second screen Bitmap according to the screen monitoring instruction, obtain the difference screen data by comparing the first screen Bitmap and the second screen Bitmap, and then send the compressed difference screen data to the server, so that the server generates a monitoring interface of the terminal according to the difference screen data. By transmitting the compressed difference screen data, the data to be transmitted and the data volume are reduced, thereby reducing the network traffic and bandwidth during the transmission process, improving the transmission efficiency, and enhancing the screen monitoring effect.
[0040] In order to further illustrate the specific implementation process of the method of this embodiment, this embodiment provides the following Figure 2 The specific method shown includes:
[0041] Step 201: Receive a screen monitoring instruction sent by a server.
[0042] For this embodiment, the specific implementation process can refer to the relevant description in step 101 of the embodiment, which will not be repeated here.
[0043] Step 202: Generate a first screen Bitmap according to the definition in the screen monitoring instruction and the first screen pixel information of the terminal.
[0044] In this embodiment, the Bitmap can be set according to the clarity carried in the monitoring instruction, and getPixel() is used to obtain the color value of the corresponding pixel, and the obtained pixel and the corresponding color value data are stored in the cache. At this point, a reference Bitmap is established in the cache, that is, the first screen Bitmap is generated.
[0045] Optionally, step 202 may specifically include: setting screen parameters and acquisition time interval corresponding to the first screen Bitmap according to the clarity in the screen monitoring instruction; acquiring the first screen pixel information of the terminal based on the screen parameters and the acquisition time interval; and generating the first screen Bitmap using the first screen pixel information and screen parameters.
[0046] Specifically, after receiving the screen monitoring instruction from the background, the screen monitoring instruction carries the definition K, and the width, height and pixel density of the screen are set according to the definition K. Then a Bitmap matching the screen size is created. Next, a canvas is created using the Canvas class, and the draw() method of the View class is used to draw the current screen content onto the canvas. The time interval obtained is S0 = (S0 < = sleep * μ)? S0 * factor: S0, S0 represents a constant interval, sleep represents the actual interval after the initial interval is divided by 8 frames, and the role of factor is to keep the interval within a reasonable range.
[0047] In this embodiment, after obtaining the first screen Bitmap, in order to ensure that the width and height of the image are aligned as multiples of 4, the product of the bitmap width W and the bit depth B is used, and then &5-1 is added and divided by &5, and the result is an integer multiple of &5 (because the division is an integer division), and then multiplied by 4 to obtain the total number of bytes of the bitmap. Finally, multiply it by the height H of the bitmap to obtain the complete size of the bitmap, which is used to cyclically compare the pixel information of the two pictures. The formula for calculating the size of the image is: S = (W*B+&5-1) / &5)*4*H.
[0048] Step 203: Use a preset timer to determine a preset time, and collect the second screen Bitmap according to the preset time.
[0049] In this embodiment, the preset timer may include but is not limited to a millisecond-level timer. For example, a millisecond-level timer is used to determine the preset time, and the second screen Bitmap is acquired according to the preset time, and the pixels of the second screen Bitmap and the corresponding color values are read into the cache.
[0050] As a possible implementation method, it is possible to detect within milliseconds that the video or animation of the terminal has changed. By comparing the front and back screens of the terminal within milliseconds, the start and stop points of the video or animation as well as the freeze points are calculated, thereby facilitating the discovery of existing problems during the terminal testing process and performing optimization to improve the user experience.
[0051] Step 204: Obtain color value data corresponding to the first screen Bitmap and color value data corresponding to the second screen Bitmap.
[0052] In the present embodiment, the color value of the specified pixel can be obtained by the getPixel() method. The color value is a 32-bit integer, in which the red, green and blue components occupy different digits in 24 bits respectively. The mask is applied and each component is extracted by the bitwise AND (&) operator. The mask of the red component is 0xFF0000, the mask of the green component is 0x00FF00, and the mask of the blue component is 0x0000FF. By performing a bitwise AND operation on these masks and the original RGB values, and then extracting each component by a right shift operation (>>), the color value data corresponding to the first screen Bitmap and the color value data corresponding to the second screen Bitmap are obtained.
[0053] For example, a 24-bit RGB value can be obtained R&: 0xAABBCC, and each component can be extracted through bit operations and mask operations. The extracted red component Fr can be expressed as Fr = (R&& 0xFF0000) >> 16, the extracted green component Fg can be expressed as Fg = (R&& 0x00FF00) >> 8, and the extracted blue component Fb can be expressed as Fb = (R&& 0x0000FF).
[0054] Correspondingly, the BitmapCache class can be used to maintain a cache array CACHE, where each cache item is an object array containing bitmap objects. Read the color value data of the corresponding bitmap file and store it in the cache. If the bitmap data already exists in the cache, the bitmap object in the cache is directly returned. The findInCache method is used to find the cache item corresponding to the specified key in the cache. In order to avoid conflicts during concurrent access, operations on the CACHE array are synchronized using synchronized blocks.
[0055] Step 205 : Compare the color value data corresponding to the first screen Bitmap with the color value data corresponding to the second screen Bitmap to determine the difference in color value data between the first screen Bitmap and the second screen Bitmap.
[0056] For example, Figure 3 As shown, after receiving the background monitoring instruction, the terminal can obtain the current screen Bitmap, that is, the first screen Bitmap, and then obtain the color values of all pixels corresponding to the first screen Bitmap, and the color value data can be stored in the cache; accordingly, a millisecond timer can be used to obtain the screen Bitmap after a millisecond delay, that is, the second screen Bitmap, and obtain the color values of all pixels corresponding to the second screen Bitmap, and the color value data can be stored in the cache; then from left to right and from top to bottom, the pixel color values of the first screen Bitmap and the second screen Bitmap are traversed pixel by pixel to determine whether the color values are the same. If the color values are the same, the current traversal is skipped. If the color values are different, it is considered that the color value of the pixel is a difference color value, and the difference pixel and color value are stored in the difference object set, thereby obtaining the difference color value data of the first screen Bitmap and the second screen Bitmap.
[0057] Specifically, two nested loops are used to traverse each pixel in the cache. The number of bytes occupied by a scan line can be a multiple of 4. DWORD comparison can be used to compare the red, green and blue components of each pixel. If they are consistent, the current loop can be jumped out. If they are inconsistent, they are stored in the difference object set and the pixel color value of the reference Bitmap is changed to the color value of the current Bitmap. Exemplarily, the loop process is as follows:
[0058] 1. Based on the image size, loop through the latest bitmap data SourData and the first screen bitmap data DestData. For each 4-byte block, if they are the same, skip it.
[0059] 2. Otherwise, record the position of this different block in DestDataBuffer (p1) and store the position in diffBuffer.
[0060] 3. Update the data in DestData to match SourData.
[0061] 4. And store (p1) the data of this different block at a specific location in diffBuffer.
[0062] 5. Continue with the next 4-byte block until all data in SourData has been compared and stored.
[0063] 6. Write the number of different blocks stored into the corresponding position of diffBuffer.
[0064] 7. Write the data lengths of different blocks in DestDataBuffer to the corresponding positions of diffBuffer.
[0065] 8. Return diffBuffer, which is the difference color value data of the latest bitmap.
[0066] For example, Figure 4 As shown, the first 4x4 pixel block may be a pixel block in the first screen Bitmap, the second 4x4 pixel block may be a pixel block in the second screen Bitmap, and the third 4x4 pixel block may be a difference pixel block between the first screen Bitmap and the second screen Bitmap.
[0067] Step 206 : Generate screen difference data according to the difference color value data and the screen difference pixels corresponding to the difference color value data.
[0068] In this embodiment, the difference color value data and the screen difference pixels corresponding to the difference color value data may be stored in a preset storage location to generate screen difference data, thereby reducing the data transmitted from the terminal to the server and improving the transmission efficiency.
[0069] Step 207: compress the screen difference data, and send the compressed screen difference data to the server, which is used to generate a monitoring interface corresponding to the terminal according to the compressed screen difference data.
[0070] In this embodiment, the background first receives the first screen Bitmap structured information of the terminal's first screen, and then sends the next step instruction to the terminal. The terminal then compresses and encrypts the second screen Bitmap information or the screen difference data and transmits it. The background parses the data according to the transmission protocol, parses the pixels and color values, and updates the color values of the visualization interface through Canvas on the web page according to the pixel coordinates to redraw the graphics of the changed area, thereby achieving the purpose of updating the monitoring interface in near real-time.
[0071] By transmitting the changed parts of the first screen Bitmap and the second screen Bitmap instead of the entire image, the display accuracy can be flexibly adjusted, the feature extraction and transmission efficiency can be improved, the storage space can be saved, and the pressure on the terminal and the server can be reduced.
[0072] Optionally, compressing the screen difference data may specifically include: creating an asynchronous task, compressing the screen difference data using a Zlib algorithm in the asynchronous task; and outputting the compressed screen difference data through an output stream corresponding to the asynchronous task.
[0073] In this embodiment, the Zlib utility library is used to compress the screen difference data. Specifically, an asynchronous task can be created, and an output stream and a compressor can be created in the asynchronous task. Next, the compression parameters are set, and then the screen difference data is compressed and written to the output stream. Finally, the compressed screen difference data is obtained by calling the toByteArray() method of the output stream, thereby reducing the size of the screen difference data, saving storage space, and improving transmission efficiency.
[0074] Optionally, after compressing the screen difference data, the method of this embodiment may further include: creating a key generator and an encryptor based on the compressed screen difference data; using the key and encryptor generated by the key generator to encrypt the compressed screen difference data, and obtain the encrypted screen difference data.
[0075] In this embodiment, after obtaining the compressed screen difference data, a key generator and an encryptor can be created. Next, the encryptor is initialized with the key, and an input stream and an encrypted data output stream are created. Then, a loop is used to read the data in the input stream and the encryptor is used to write it to the output stream. Finally, the output stream is closed and the encrypted data is obtained, thereby reducing the chance of leaking user sensitive information and improving security.
[0076] Correspondingly, the Zlib algorithm is used to compress the input byte array, and the compressed screen difference data is stored in ByteArrayOutputStream. It can support multiple programming languages. Both the terminal and the background can use the same set of compression and decompression algorithms. The speed can be adjusted to match the data transmission, thereby improving the processing speed and reducing the impact on network transmission.
[0077] For example, the compressed screen difference data may be encrypted using the Advanced Encryption Standard (AES), with a key used for encryption, and the length of the key and the length of the initialization vector (IV) may both be 32 bits.
[0078] Optionally, after encrypting the compressed screen difference data using the key and encryptor generated by the key generator and obtaining the encrypted screen difference data, the method of this embodiment may further include: checking whether the Socket connection between the terminal and the server is normal; if the Socket connection between the terminal and the server is normal, encrypting the encrypted screen difference data again using a preset security protocol.
[0079] In this embodiment, another asynchronous task can be created to check whether the Socket connection between the terminal and the server is normal. If the Socket connection between the terminal and the server is normal, the input and output streams of the socket object are obtained, the original length and encrypted length of the data are written in the data header, and the encrypted data is encrypted again using a preset security protocol (for example: SSL, TLS) to ensure the security of the data. Finally, the output stream is written in segments until all data segments are transmitted.
[0080] Exemplarily, the transmission data format is as follows:
[0081]
[0082] The message ID+Universally Unique Identifier (UUID)+data may be data that needs to be compressed.
[0083] For example, Figure 5As shown, after obtaining the difference color value List, the List can be converted into a byte array, and then the byte array is compressed using a compression algorithm, and then the compressed data is encrypted using an encryption algorithm. Finally, the socket connection is checked to see if it is normal. If the socket connection is normal, the smart terminal id, original packet length, encrypted packet length, and encrypted data are transmitted to the background, and the background begins parsing after receiving the data. Specifically, the method of this embodiment can be used for auditing data transmission or data transmission, data collection, etc. in multiple fields. For example, it can be applied to the dialing test service of smart terminals. The large number of dialing test services of smart terminals need to be monitored every day. Without affecting the dialing test task, the smoothness of the monitoring dialing test process is improved. The differentiated transmission monitoring interface is generated through the encrypted screen difference data, and the differentiated transmission monitoring interface is used to visualize the background, which can achieve the purpose of balancing dialing test and monitoring.
[0084] Compared with the current existing technology, this embodiment can use the key and encryptor generated by the key generator to encrypt the compressed screen difference data, obtain the encrypted screen difference data, and then check whether the Socket connection between the terminal and the server is normal. If the Socket connection between the terminal and the server is normal, use the preset security protocol to encrypt the encrypted screen difference data again, thereby reducing the chance of leaking user sensitive information and improving security.
[0085] Further, as Figure 1 and Figure 2 The specific implementation of the method shown in the embodiment provides a screen monitoring device, such as Figure 6 As shown, the device includes: a receiving module 31, an acquiring module 32, a generating module 33, and a compressing module 34.
[0086] The receiving module 31 is configured to receive the screen monitoring instruction sent by the server;
[0087] The acquisition module 32 is configured to acquire a first screen Bitmap and a second screen Bitmap according to the screen monitoring instruction, wherein the first screen Bitmap is the first screen Bitmap of the terminal, and the second screen Bitmap is the screen Bitmap generated by the terminal after a preset time;
[0088] The generating module 33 is configured to compare the first screen Bitmap with the second screen Bitmap and generate screen difference data;
[0089] The compression module 34 is configured to compress the screen difference data and send the compressed screen difference data to the server, and the server is used to generate a monitoring interface corresponding to the terminal according to the compressed screen difference data.
[0090] In some examples of this embodiment, the acquisition module 32 is specifically configured to generate a first screen Bitmap according to the clarity in the screen monitoring instruction and the first screen pixel information of the terminal; use a preset timer to determine the preset time, and collect the second screen Bitmap according to the preset time.
[0091] In some examples of this embodiment, the generation module 33 is specifically configured to set the screen parameters and acquisition time interval corresponding to the first screen Bitmap according to the clarity in the screen monitoring instruction; obtain the first screen pixel information of the terminal based on the screen parameters and the acquisition time interval; and generate the first screen Bitmap using the first screen pixel information and screen parameters.
[0092] In some examples of this embodiment, the generation module 33 is specifically configured to obtain color value data corresponding to the first screen Bitmap and color value data corresponding to the second screen Bitmap; compare the color value data corresponding to the first screen Bitmap and the color value data corresponding to the second screen Bitmap to determine the difference color value data between the first screen Bitmap and the second screen Bitmap; generate screen difference data based on the difference color value data and the screen difference pixels corresponding to the difference color value data.
[0093] In some examples of this embodiment, the compression module 34 is specifically configured to create an asynchronous task, compress the screen difference data using the Zlib algorithm in the asynchronous task, and output the compressed screen difference data through an output stream corresponding to the asynchronous task.
[0094] In some examples of this embodiment, the compression module 34 is further configured to create a key generator and an encryptor based on the compressed screen difference data; use the key and encryptor generated by the key generator to encrypt the compressed screen difference data to obtain the encrypted screen difference data.
[0095] In some examples of this embodiment, the compression module 34 is further configured to check whether the Socket connection between the terminal and the server is normal; if the Socket connection between the terminal and the server is normal, the encrypted screen difference data is re-encrypted using a preset security protocol.
[0096] It should be noted that for other corresponding descriptions of the functional units involved in the screen monitoring device provided in this embodiment, reference can be made to Figure 1 and Figure 2 The corresponding description in will not be repeated here.
[0097] Based on the above Figure 1 and Figure 2The method shown in the embodiment also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned Figure 1 and Figure 2 The method shown.
[0098] Based on the above Figure 1 and Figure 2 The method shown in the embodiment also provides a computer program product, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned Figure 1 and Figure 2 The method shown.
[0099] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, USB flash drive, mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the method of the implementation scenario of the present application.
[0100] Based on the above Figure 1 and Figure 2 The method shown, and Figure 6 In order to achieve the above-mentioned purpose, the embodiment of the present application also provides an electronic device, such as a personal computer, a server, a laptop computer, a smart phone, an intelligent robot and other intelligent terminals, which includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to achieve the above-mentioned Figure 1 and Figure 2 The method shown.
[0101] Optionally, the above-mentioned physical device may also include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, etc. The user interface may include a display, an input unit such as a keyboard, etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), etc.
[0102] Those skilled in the art will appreciate that the above-mentioned physical device structure provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or a combination of certain components, or different arrangements of components.
[0103] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the above-mentioned physical device, and supports the operation of the information processing program and other software and / or programs. The network communication module is used to realize the communication between the components inside the storage medium, and the communication with other hardware and software in the information processing physical device.
[0104] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform, or by hardware. By applying the technical solution of this embodiment, the key and encryptor generated by the key generator can be used to encrypt the compressed screen difference data, obtain the encrypted screen difference data, and then check whether the Socket connection between the terminal and the server is normal. If the Socket connection between the terminal and the server is normal, the encrypted screen difference data is encrypted again using a preset security protocol, thereby reducing the chance of leaking user sensitive information and improving security.
[0105] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0106] The above is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features applied for herein.
Claims
1. A screen monitoring method, characterized in that: include: Receive screen monitoring instructions sent by the server; According to the screen monitoring instruction, a first screen Bitmap and a second screen Bitmap are obtained, wherein the first screen Bitmap is a first screen Bitmap of the terminal, and the second screen Bitmap is a screen Bitmap generated by the terminal after a preset time; Compare the first screen Bitmap with the second screen Bitmap to generate screen difference data; The screen difference data is compressed, and the compressed screen difference data is sent to the server, and the server is used to generate a monitoring interface corresponding to the terminal according to the compressed screen difference data.
2. The method according to claim 1, characterized in that The obtaining the first screen Bitmap and the second screen Bitmap according to the screen monitoring instruction includes: Generate the first screen Bitmap according to the definition in the screen monitoring instruction and the first screen pixel information of the terminal; The preset time is determined by using a preset timer, and the second screen Bitmap is collected according to the preset time.
3. The method according to claim 2, characterized in that The generating the first screen Bitmap according to the definition in the screen monitoring instruction and the first screen pixel information of the terminal includes: According to the definition in the screen monitoring instruction, set the screen parameters and acquisition time interval corresponding to the first screen Bitmap; Acquire the first screen pixel information of the terminal according to the screen parameters and the acquisition time interval; The first screen Bitmap is generated by using the first screen pixel information and the screen parameters.
4. The method according to claim 1, characterized in that: The comparing the first screen Bitmap with the second screen Bitmap to generate screen difference data includes: Obtaining color value data corresponding to the first screen Bitmap and color value data corresponding to the second screen Bitmap; Comparing the color value data corresponding to the first screen Bitmap with the color value data corresponding to the second screen Bitmap, and determining the difference color value data between the first screen Bitmap and the second screen Bitmap; The screen difference data is generated according to the difference color value data and the screen difference pixels corresponding to the difference color value data.
5. The method according to claim 1, characterized in that The compressing the screen difference data comprises: Creating an asynchronous task, and using a Zlib algorithm to compress the screen difference data in the asynchronous task; The compressed screen difference data is outputted through the output stream corresponding to the asynchronous task.
6. The method according to claim 5, characterized in that After compressing the screen difference data, the method further includes: Creating a key generator and an encryptor according to the compressed screen difference data; The compressed screen difference data is encrypted using the key generated by the key generator and the encryptor to obtain the encrypted screen difference data.
7. The method according to claim 6, characterized in that After encrypting the compressed screen difference data using the key generated by the key generator and the encryptor to obtain the encrypted screen difference data, the method further includes: Check whether the Socket connection between the terminal and the server is normal; If the Socket connection between the terminal and the server is normal, the encrypted screen difference data is re-encrypted using a preset security protocol.
8. A screen monitoring device, characterized in that: include: A receiving module, configured to receive a screen monitoring instruction sent by a server; An acquisition module is configured to acquire a first screen Bitmap and a second screen Bitmap according to the screen monitoring instruction, wherein the first screen Bitmap is a first screen Bitmap of the terminal, and the second screen Bitmap is a screen Bitmap generated by the terminal after a preset time; A generating module, configured to compare the first screen Bitmap with the second screen Bitmap to generate screen difference data; The compression module is configured to compress the screen difference data and send the compressed screen difference data to the server, and the server is used to generate a monitoring interface corresponding to the terminal according to the compressed screen difference data.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. An electronic device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
11. A computer program product having a computer program stored thereon, characterized in that: When the computer program product is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Virtual desktop system and method for refreshing on-screen display of virtual desktop client
CN102566910A
Terminal, jam measuring method, device, game jam measuring method and apparatus
CN105653407A
Industrial monitoring floating point data compression and encryption algorithm
CN105846993A
Screen monitoring methods, screen monitoring devices and screen monitoring system
CN107423187A
Terminal monitoring method and device, computer storage medium and terminal
CN108093068A
