Graphical user interface synchronization method and device and computer equipment
By intercepting local interface changes data and sending it to remote devices, the problem of high network bandwidth requirements of traditional GUI synchronization methods is solved, and GUI synchronization under low bandwidth conditions is realized in embedded application scenarios.
Patent Information
- Application Number
- CN202411962846.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-18
AI Technical Summary
The traditional GUI device synchronization method is implemented through remote desktop applications, resulting in very high network bandwidth requirements and cannot adapt to scenarios where embedded applications are limited in hardware resources.
A graphical user interface synchronization method is provided, by intercepting local interface change data, sending local operational signals and automatic changes signals to corresponding response functions, and sending interface change data to remote devices, and using response functions to process interface change signals to realize GUI synchronization under extremely low data communication bandwidth conditions.
Under extremely low network bandwidth conditions, the dual-machine display and operation of the graphical interface application is synchronized, suitable for embedded application scenarios, and has extremely low requirements for system software and hardware.
Smart Images

Figure CN119847466A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of computer programming, and in particular to a graphical user interface synchronization method, apparatus and computer equipment. Background Art
[0002] Devices with graphical user interfaces (GUIs) are widely used in the embedded field, and the need to synchronize two GUI devices in different locations is also common. The traditional method of synchronizing GUI devices is to synchronize GUI devices through remote desktop applications, which has very high requirements on network bandwidth and cannot adapt to scenarios where embedded application hardware resources are limited. Summary of the invention
[0003] Based on this, it is necessary to provide a graphical user interface synchronization method, apparatus and computer device that can meet the resource-constrained scenarios of embedded applications in order to address the above technical problems.
[0004] In a first aspect, the present application provides a graphical user interface synchronization method. The method comprises:
[0005] Intercept local interface change data; local interface change data includes local operation type signals and local automatic change data; local automatic change data includes local automatic change signals and local automatic change independent data;
[0006] Sending the local operation signal and the local automatic change signal to the corresponding first local response function respectively, and sending the local interface change data to the remote device;
[0007] According to the first local response function and the local automatic change independent data, respond to the local interface change data to update the graphical user interface of the local device; the remote device is used to synchronously update the graphical user interface of the remote device according to the local interface change data.
[0008] In one embodiment, intercepting local interface change data includes:
[0009] Identify local cursor operations and local keyboard operations in local operations;
[0010] Generate local operation signals according to local cursor operations and local keyboard operations; local operation signals include local cursor signals and local keyboard signals;
[0011] According to the automatic change of the graphical user interface of the local device, local automatic change data is obtained.
[0012] In one embodiment, sending the local operation signal and the local automatic change signal to the corresponding first local response function respectively includes:
[0013] intercepting the local operation class signal and the local automatic change signal through the local signal collector, and sending the local operation class signal and the local automatic change signal to the first local signal repeater;
[0014] Sending the local operation type signal and the local automatic change signal to the corresponding first local response function respectively through the first local signal repeater;
[0015] Through the local change data forwarder, local automatic change independent data is intercepted.
[0016] In one embodiment, sending the local interface change data to the remote device includes:
[0017] The local operation type signal and the local automatic change signal are respectively sent to the local network data transmitter through the first local signal repeater;
[0018] Sending local automatic change independent data to the local network data sender via the local change data forwarder;
[0019] Through the local network data transmitter, according to the data communication link between the local device and the remote device, the local operation type signal, the local automatic change data and the local automatic change independent data are sent to the remote network data receiver of the remote device.
[0020] In one embodiment, the first local response function includes a first local cursor slot function and a first local keyboard slot function; responding to the local interface change data according to the first local response function and the local automatic change independent data to update the graphical user interface of the local device includes:
[0021] Responding to the signals received respectively through the first local cursor slot function and the first local keyboard slot function to obtain the first local cursor action and the first local keyboard action;
[0022] Acquire a first local interface automatic change result according to local automatic change independent data;
[0023] The graphical user interface of the local device is updated according to the first local cursor action, the first local keyboard action and the first local interface automatic change result.
[0024] In one embodiment, the method further comprises:
[0025] Receive remote interface change data sent by remote devices;
[0026] Sending the remote interface change data to a second local response function corresponding to the remote interface change data;
[0027] Respond to the remote interface change data according to the second local response function and synchronously update the graphical user interface of the local device.
[0028] In one embodiment, the method further comprises:
[0029] Receiving remote interface change data sent by a remote network data transmitter of a remote device through a local network data receiver according to a data communication link between the local device and the remote device; the remote interface change data includes remote operation type signals and remote automatic change data, and the remote automatic change data includes remote automatic change signals and remote automatic change independent data;
[0030] Obtaining the remote operation type signal and the remote automatic change signal through the second local signal repeater, and sending the remote operation type signal and the remote automatic change signal to the corresponding second local response function respectively;
[0031] Obtain remote automatic change independent data through the local change data forwarder.
[0032] In one embodiment, the second local response function includes a second local cursor type slot function and a second local keyboard type slot function; the method further includes:
[0033] Responding to the signals received respectively through the second local cursor slot function and the second local keyboard slot function to obtain the second local cursor action and the second local keyboard action;
[0034] Acquire the second local interface automatic change result according to the remote automatic change independent data;
[0035] The graphical user interface of the local device is updated according to the second local cursor action, the second local keyboard action and the second local interface automatic change result.
[0036] In a second aspect, the present application also provides a graphical user interface synchronization device. The device includes:
[0037] Data acquisition module, used to intercept local interface change data;
[0038] A data sending module, used to send the local operation type signal and the local automatic change signal to the corresponding first local response function respectively, and send the local interface change data to the remote device;
[0039] The data response module is used to respond to the local interface change data according to the first local response function and the local automatic change independent data to update the graphical user interface of the local device; the remote device is used to synchronously update the graphical user interface of the remote device according to the local interface change data.
[0040] In a third aspect, the present application further provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any of the above method embodiments when executing the computer program.
[0041] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of any of the above method embodiments when executed by a processor.
[0042] In a fifth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of any of the above method embodiments are implemented.
[0043] The above-mentioned graphical user interface synchronization method, device, computer equipment, storage medium and computer program product intercept local change data, send local change data to the remote device, and use the response function to process the interface change signal. It can achieve the synchronization of dual-machine display and operation of graphical interface applications under extremely low data communication bandwidth conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 A diagram of an application environment of a graphical user interface synchronization method in an embodiment;
[0045] Figure 2 A flowchart of a graphical user interface synchronization method according to an embodiment;
[0046] Figure 3 A schematic diagram of a flow chart of a step of intercepting local interface change data in one embodiment;
[0047] Figure 4 It is a flowchart of sending the local operation type signal and the local automatic change signal to the corresponding first local response function step respectively in one embodiment;
[0048] Figure 5 A flowchart of the steps of sending local interface change data to a remote device in one embodiment;
[0049] Figure 6 A flowchart of the steps of responding to local interface change data to update the graphical user interface of a local device according to a first local response function and local automatic change independent data in one embodiment;
[0050] Figure 7 A schematic diagram of a process of synchronizing a local interface with a remote interface change in one embodiment;
[0051] Figure 8A flowchart of a step of receiving remote interface change data in one embodiment;
[0052] Fig. 9 A flowchart of the steps of processing remote interface change data in one embodiment;
[0053] Fig.10 A schematic diagram of a graphical user interface synchronization method in one embodiment;
[0054] Fig.11 A schematic diagram of a flow chart of a graphical user interface synchronization method in another embodiment;
[0055] Fig.12 A schematic diagram of a process of initializing an interface synchronization library in an embodiment;
[0056] Fig.13 A schematic diagram of a flow chart of a registration operation and a data registration function in one embodiment;
[0057] Fig.14 A schematic diagram of a local operation flow of an interface synchronization library in an embodiment;
[0058] Fig.15 A schematic diagram of a remote operation process of an interface synchronization library in an embodiment;
[0059] Fig.16 is a structural block diagram of a graphical user interface synchronization device in one embodiment;
[0060] Fig.17 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0061] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0062] Devices with graphical user interfaces (GUIs) are widely used in the embedded field. In many application scenarios, the need for synchronous operation of two GUI devices in different locations is also common. For example, the execution end of the control device is usually close to the controlled unit, and its built-in GUI interface provides support for on-site operation, while the GUI interface located in the control center provides support for remote operation. In such an application scenario, the display interface and operation method of the two GUI devices are exactly the same, and there is no need to care about the location of the operating device and the connection relationship with the controlled unit during operation.
[0063] Among the traditional dual-machine / multi-machine graphical interface synchronization technologies, remote desktop is widely used. Although the technologies used by various remote desktop applications are different, they all have certain commonalities:
[0064] 1. The desktop of the graphical operating system is used as the synchronization object, rather than a specific application. When the user operates on the desktop (for example, using the left and right buttons of the mouse to click or double-click) an object on the desktop, the local and remote devices will respond synchronously and update the desktop. Furthermore, if the operation evokes a new application, since the application interface is part of the updated desktop, subsequent operations on the application will naturally be performed synchronously on both the local and remote desktops.
[0065] 2. Remote desktop technology is based on network communication. Remote desktops launched by different companies all have a control center in the form of a server. Users (i.e. the device running the desktop) need to report their location (IP address) by logging in, and then be authorized by the control center to communicate between the two machines and synchronize the desktop.
[0066] 3. The desktop image data of the operating system is directly related to the resolution of the display. The higher the resolution, the better the image quality, and the higher the network data bandwidth requirement. Remote desktop application manufacturers have even designed different image quality transmission solutions based on this to meet business needs.
[0067] 4. Most commercial remote desktop applications already support multi-operating system platform operation and cross-platform operation. That is, remote desktop applications for multiple platforms such as Windows, Linux, and Android have been launched, and can operate remote desktops on the same or different platforms.
[0068] However, the control center of the remote desktop needs to authorize the synchronization device and ensure a certain image synchronization quality, which has very high requirements on network bandwidth and cannot meet the needs of embedded graphical interface applications.
[0069] A basic feature of embedded applications is the limited hardware resources. First, remote desktop applications themselves have a large demand for resources and require more CPU resources and memory resources to support them during operation. Second, in most industrial and medical application scenarios, applications are run independently. Although they are based on the system (Windows / Linux), they have a low dependence on other applications and the desktop, and may not even rely on this so-called "desktop" application at all, resulting in a waste of resources. Third, in scenarios such as embedded GUI synchronization, there is no so-called control or authorization center. The communication between applications on different devices can be completed only by their own mutual authorization and recognition. Fourth, in most cases, the network used for data communication of these devices is a local area network or a subnet in an industry network. There are many devices in the network, and the bandwidth is shared by all devices. For each device, the data bandwidth may be limited or not ideal.
[0070] The above characteristics determine that traditional remote desktop technology is not suitable for most embedded applications. QT is a cross-platform development framework launched by NOKIA. Applications developed based on this framework can easily adapt to different operating systems and have been widely used in the development of various applications.
[0071] This application proposes a QT-based programming technology that can achieve the synchronization of dual-machine display and operation of graphical interface applications under extremely low data communication bandwidth conditions. It is suitable for embedded application scenarios, has extremely low requirements on system software and hardware, and can provide services for applications in the form of API (Application Programming Interface) and integrate with the applications.
[0072] Under the working mechanism of QT, the user's operations are ultimately abstracted into signals, and the responses to these operations, that is, the corresponding changes in the interface, are processed by what is called slot functions. In other words, different QT signals will trigger different slot functions. If multiple signals trigger the same slot function, then from the changes in the interface, the user cannot distinguish which source of the QT signal caused the change in the interface. This is the basis for achieving synchronization of the interfaces at both ends. The difference from general desktop synchronization technology is that the present invention does not transmit the data of the graphical interface itself. Instead, the reasons for the interface changes are transmitted, and the reconstruction of the interface is completed by the device that receives the reasons for the changes. Therefore, the requirements for network transmission bandwidth are greatly reduced.
[0073] The graphical user interface synchronization method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the local device 102 communicates with the remote device 104 through the network. If there is a GUI change in the local device 102, the local device 102 updates the local interface and sends the GUI change to the remote device 104; the remote device 104 receives the GUI change, updates the remote interface, and realizes the synchronization of the local and remote GUIs. If there is a GUI change in the remote device 104, or there are GUI changes in both the local device 102 and the remote device 104, the GUI synchronization is similar to the above method. Among them, the local device 102 and the remote device 104 can be but are not limited to various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc.
[0074] In an exemplary embodiment, Figure 2 As shown, a graphical user interface synchronization method is provided, which is applied to Figure 1 Taking the local device 102 in the example as an example, the following steps are included:
[0075] Step 202, intercepting local interface change data; the local interface change data includes local operation type signals and local automatic change data; the local automatic change data includes local automatic change signals and local automatic change independent data.
[0076] Optionally, when a graphical user interface change occurs locally, local interface change data is intercepted. Local interface change data can be divided into two different types: one is a signal generated by operating an interactive control, such as clicking a graphical user interface with a mouse or controlling a graphical user interface with a keyboard; the other is an automatic change of the graphical user interface, such as reflecting the result of the operation on the interface in some way due to the operation needs of the embedded system.
[0077] Step 204: Send the local operation signal and the local automatic change signal to the corresponding first local response function respectively, and send the local interface change data to the remote device.
[0078] Optionally, the intercepted local operation signal and local automatic change signal are sent to the corresponding first local response function respectively; the local automatic change independent data is transmitted to the local device; and the local interface change data is sent to the remote device. The first local response function is a response function set for processing local interface change data. Each signal in the local interface change data corresponds to a response function. Different signals correspond to different response functions. This correspondence can be adjusted according to the task objectives.
[0079] Step 206, responding to the local interface change data according to the first local response function and the local automatic change independent data to update the graphical user interface of the local device; the remote device is used to synchronously update the graphical user interface of the remote device according to the local interface change data.
[0080] Optionally, the first local response function responds to the local interface change data according to the above correspondence, processes the signal generated by the interactive control, and combines the automatic change of the graphical user interface to update the graphical user interface of the local device. The remote device synchronizes and processes in the same way as the local device, and receives the local interface change data to synchronize and update the graphical user interface of the remote device.
[0081] In the above GUI synchronization method, the data transmission between the local device and the remote device only includes the reasons that lead to different interfaces, that is, the automatic changes of signals and interfaces (data generated by the actuator). The reasons for these interface changes have nothing to do with the properties of the GUI display interface, such as resolution, color depth, etc., so the amount of data is greatly reduced, and the requirements for network bandwidth are also significantly reduced.
[0082] In an exemplary embodiment, Figure 3 As shown, intercepting local interface change data includes:
[0083] Step 302: Identify local cursor operations and local keyboard operations in local operations.
[0084] Step 304: Generate local operation signals according to local cursor operations and local keyboard operations; local operation signals include local cursor signals and local keyboard signals.
[0085] Step 306: Acquire local automatic change data according to the automatic change of the graphical user interface of the local device.
[0086] For example, the operation performed by the user on the interface will trigger QT to send an operation signal (local cursor signal or local keyboard signal). In the case of single-machine operation, the local operation signal is directly linked to the corresponding slot function. The slot function is stimulated to run, and the interface changes. In the dual-machine networking environment, the local signal collector intercepts the signal sent by QT and obtains the local cursor signal and local keyboard signal.
[0087] The situation of automatic interface changes is slightly more complicated and requires a slightly different treatment. Local automatic change data is intercepted and distributed by the local change data forwarder. The reason for the automatic interface change is that the actuator in the background of the system will generate data independent of the signal in addition to the QT signal. This data will also be displayed in some form on the interface.
[0088] In the above embodiment, the data transmission performed locally and remotely only includes the reasons causing the different interfaces, that is, only the data generated by the signal and the actuator is obtained, which greatly reduces the amount of transmitted data, improves synchronization efficiency, and reduces dependence on hardware resources.
[0089] The following embodiments specifically illustrate the method of intercepting and forwarding local change data in the present application.
[0090] In an exemplary embodiment, Figure 4 As shown, sending the local operation signal and the local automatic change signal to the corresponding first local response function respectively includes:
[0091] Step 402: intercepting the local operation class signal and the local automatic change signal through the local signal collector, and sending the local operation class signal and the local automatic change signal to the first local signal repeater.
[0092] Exemplarily, the local interface change data includes local operation class signals and local automatic change data. Among them, the operation performed on the local device interface will trigger QT to send a local operation class signal (cursor class signal or keyboard class signal). The local automatic change data includes a local automatic change signal and a local automatic change independent data, wherein the processing method of the local automatic change signal is the same as the processing method of the local operation class signal. After the interception is completed, the local operation class signal and the local automatic change signal are sent to the first local signal repeater.
[0093] Step 404: Send the local operation signal and the local automatic change signal to the corresponding first local response function through the first local signal repeater.
[0094] Exemplarily, the first local signal repeater sends local operation type signals and local automatic change signals to the first local response function. This path is the same as the path of stand-alone operation, triggering the corresponding local response function, so that the local interface will undergo corresponding changes as when the stand-alone operation is in progress.
[0095] Step 406, intercepting the local automatic changing independent data through the local changing data forwarder; the local automatic changing independent data is used to update the graphical user interface of the local device.
[0096] For example, the reason for the automatic interface change is that the actuator in the background of the system will generate data independent of the signal (local automatic change independent data) in addition to the QT signal (local automatic change signal). These data will also be displayed on the interface in a certain form, such as the sampling of a certain external electrical signal by the system, which requires to be displayed in the form of a waveform. Therefore, the local automatic change independent data is intercepted and distributed by the local change data forwarder, and the local automatic change independent data can be received and processed by the local device to update the local GUI.
[0097] In this embodiment, by dividing the GUI interface changes into two categories, processing the change signal through the first local signal repeater, and processing the change data through the local change data repeater, the synchronization information transmission can be completed without obtaining all the pixels of the entire graphical interface, thereby greatly reducing the requirements of GUI synchronization on the network bandwidth.
[0098] In an exemplary embodiment, Figure 5 As shown, sending local interface change data to a remote device includes:
[0099] Step 502: Send the local operation signal and the local automatic change signal to the local network data transmitter respectively through the first local signal repeater.
[0100] Step 504: Send the local automatic change independent data to the local network data sender through the local change data forwarder.
[0101] Step 506, through the local network data transmitter, according to the data communication link between the local device and the remote device, the local operation type signal, the local automatic change data and the local automatic change independent data are sent to the remote network data receiver of the remote device.
[0102] Exemplarily, the local network data transmitter receives local interface change data, including local operation class signals and local automatic change signals from the first local signal repeater and local automatic change independent data from the local change data repeater, and sends the packaged local interface change data to the remote network data receiver of the remote device.
[0103] In this embodiment, the change signal and the change data are processed respectively by the first local signal repeater and the local change data repeater, and the local interface change data is sent to the remote device through the local network data transmitter, so the amount of transmitted data is greatly reduced, and GUI synchronization between the two ends is achieved with extremely low network bandwidth.
[0104] In an exemplary embodiment, Figure 6As shown, the first local response function includes a first local cursor slot function and a first local keyboard slot function; responding to the local interface change data according to the first local response function and the local automatic change independent data to update the graphical user interface of the local device includes:
[0105] Step 602: Respond to the signals received respectively through the first local cursor slot function and the first local keyboard slot function to obtain the first local cursor action and the first local keyboard action.
[0106] Step 604, obtaining the first local interface automatic change result according to the local automatic change independent data.
[0107] Step 606: Update the graphical user interface of the local device according to the first local cursor action, the first local keyboard action and the first local interface automatic change result.
[0108] Exemplarily, the first local response function responds to the local interface change data, and obtains the slot functions corresponding to the local operation class signal and the local automatic change signal respectively. The slot functions in the first local response function also correspond to each local signal one by one, so that the first local cursor action, the first local keyboard action and the first local automatic change execution step corresponding to each signal can be obtained. Finally, the first local cursor action, the first local keyboard action and the first local automatic change execution step are executed, and when the GUI changes on the local device, the graphical user interface of the local device can be updated, just like when working on a single machine.
[0109] The following embodiments specifically illustrate the method of synchronizing remote GUI changes with a local device of the present application.
[0110] In an exemplary embodiment, Figure 7 As shown, the above method also includes: a step of synchronizing the local interface with the remote interface changes, the step including:
[0111] Step 702: Receive remote interface change data sent by a remote device.
[0112] Step 704: Send the remote interface change data to the second local response function corresponding to the remote interface change data.
[0113] Step 706: Respond to the remote interface change data according to the second local response function and synchronously update the graphical user interface of the local device.
[0114] Exemplarily, to achieve dual-end synchronization, the local device needs to synchronize the remote interface changes on the remote device. When there are no remote interface changes on the remote device, the local network data receiver is on standby; when there are remote interface changes on the remote device, the local network data receiver receives the remote interface change data sent by the remote device, and sends the remote interface change data to the second local response function corresponding to the remote interface change data. The second local response function is a local response function set, for example, it can be a set of slot functions that correspond one-to-one to each change signal in the remote interface change data. The second local response function responds to the remote interface change data to update the graphical user interface of the local device.
[0115] In this embodiment, the remote interface change data is received through the local network data receiver, and the graphical user interface of the local device is updated through the second local response function to synchronize the interface changes of the remote device in a timely manner.
[0116] In an exemplary embodiment, Figure 8 As shown, the above method also includes: a step of receiving remote interface change data, which step includes:
[0117] Step 802, through the local network data receiver, according to the data communication link between the local device and the remote device, receives the remote interface change data sent by the remote network data transmitter of the remote device; the remote interface change data includes remote operation type signals and remote automatic change data, and the remote automatic change data includes remote automatic change signals and remote automatic change independent data.
[0118] Step 804: Obtain the remote operation type signal and the remote automatic change signal through the second local signal repeater, and send the remote operation type signal and the remote automatic change signal to the second local response function.
[0119] Step 806, obtaining remote automatic change independent data through the local change data forwarder.
[0120] Exemplarily, the remote interface change data includes remote operation class signals and remote automatic change data, and the remote automatic change data includes remote automatic change signals and remote automatic change independent data, which are first received and unpacked by the local network data receiver through network communication. The local network data receiver sends the remote operation class signals and the remote automatic change signals to the second local signal repeater, and sends the remote automatic change independent data to the local change data repeater. After receiving the remote operation class signals and the remote automatic change signals, the second local signal repeater sends them to the second local response function. After receiving the remote automatic change independent data, the local change data repeater sends it to the local device.
[0121] In the above embodiment, the two types of data, signal type and automatically changing independent data, need to have their own corresponding transmission methods. Signal type data indicates the reason for the GUI change, including automatic interface change signals and operation type signals, such as cursor / keyboard human-machine operation type, because the data volume is very small, so it is transmitted through the signal method; while the automatically changing independent data indicates the data change caused by the GUI change, and this classification transmission method is more efficient.
[0122] In an exemplary embodiment, Fig. 9 As shown, the second local response function includes a second local cursor slot function and a second local keyboard slot function; the above method also includes a step of processing remote interface change data, which step includes:
[0123] Step 902: Respond to the signals received respectively through the second local cursor slot function and the second local keyboard slot function to obtain the second local cursor action and the second local keyboard action.
[0124] Step 904: Obtain the second local interface automatic change result according to the remote automatic change independent data.
[0125] Step 906: Update the graphical user interface of the local device according to the second local cursor action, the second local keyboard action and the second local interface automatic change result.
[0126] Exemplarily, the second local response function responds to the remote interface change data, and obtains the slot functions corresponding to the remote operation class signal and the remote automatic change signal respectively. Since the slot function corresponds to each signal one by one, the remote cursor action, remote keyboard action and remote automatic change execution step corresponding to each signal can be obtained. Finally, by executing the remote cursor action, remote keyboard action and remote automatic change execution step, the graphical user interface of the local device can be synchronously updated when the GUI changes on the remote device.
[0127] In this embodiment, the correspondence between various types of signals is used by slot functions to identify and process remote operation signals and remote automatic change signals. Combined with the remote interface automatic change data, when the remote GUI changes, the synchronization of the local GUI and the remote GUI is completed efficiently and accurately.
[0128] In an exemplary embodiment, Fig.10 This is a schematic diagram of the design of the graphical user interface synchronization method of this application, combined with Fig.10The GUI synchronization scheme of the present application can be understood from the above embodiments. Among them, user operations generate operation-type signals (cursor-type signals and keyboard-type signals), and the actuator generates interface automatic change independent data (change data) and automatic change signals. The QT signal repeater intercepts operation-type signals and automatic change signals, generates a local Signal, and sends it to the slot function and the network data transmitter through the first QT signal repeater. The change data repeater intercepts the change data and sends it to the local GUI interface one way for GUI synchronization, and sends it to the network data transmitter the other way. The local network data transmitter sends the local GUI change data to the remote network data receiver of the remote GUI, and the local network data receiver receives the remote GUI change data sent by the remote network data transmitter. Finally, the local GUI changes and the remote GUI changes are combined to achieve synchronization between the local GUI and the remote GUI.
[0129] The specific implementation of the present application is explained below in conjunction with an embodiment. The following embodiment describes the implementation of a low-level library called AGUI_SYNC_LIB (interface synchronization library), which provides service functions for upper-level applications in the form of APIs, and implements GUI synchronization of two devices connected via a network. The specific implementation of the library function is encapsulated, and application developers only need to use a simple API to implement GUI synchronization of two devices connected to the network. AGUI_SYNC_LIB provides two basic functions for upper-level applications: an initialization function and an operation and data registration function.
[0130] In another exemplary embodiment, Fig.11 As shown, a graphical user interface synchronization method is provided, the method comprising:
[0131] Step 1102, initializing the interface synchronization library.
[0132] For example, the flowchart of initializing the interface synchronization library is as follows: Fig.12 The process steps include: initializing the device; registering the IP addresses of the device and the remote device; establishing a data communication link between the device and the remote device; and initializing a list of correspondence between signals and slot functions.
[0133] The interface synchronization library initialization completes several basic tasks, laying the foundation for GUI synchronization. First, the application records the IP addresses of the two devices that need to synchronize the GUI and establishes a communication data channel between the two devices. Second, initialize the data space required for the GUI synchronization mechanism, the most important of which is the signal-slot-mapping table. In the process of interface synchronization, because the "signal collector" intercepts the signal sent by the system, it is necessary to establish a corresponding relationship between the original signal and the user slot function, so that the original design of the application can be guaranteed and the planned task can be completed when the slot function is distributed later.
[0134] Step 1104, register operation and data registration function.
[0135] For example, the flowchart of the registration operation and data registration function is as follows: Fig.13 The process steps include: operation registration; signal registration; slot function registration; signal marking; associating the signal with the library processing function; if the corresponding relationship table has data for the marked signal, the process ends; if the corresponding relationship table does not have data for the marked signal, the signal data is registered in the data area information.
[0136] Registering a function is the process of registering the signal triggered by the operation on the interface and the original slot function designed by it into the corresponding table of the signal and slot function of the interface synchronization library. At the same time, if the data source that causes the interface change is involved, the information of the data source, such as the data buffer and data length, is also registered in the interface synchronization library so that the interface synchronization library can forward this data.
[0137] Step 1106, run the library function.
[0138] For example, the local operation flow diagram of the interface synchronization library is as follows: Fig.14 As shown. After initialization, the "Interface Synchronization Library" is ready to start the synchronization of the graphical interfaces of the two machines. When the user operates on the interface, it will trigger the QT system to generate a signal corresponding to the operation. The signal processing function in the library function is called up by the QT signal to run. The library processing function first checks to confirm that the signal is a registered valid signal, finds the user-defined slot function from the signal / slot function correspondence table and runs it, and the local interface responds according to the user's design. At the same time, the library processing function sends the marked signal and the corresponding data to the remote device respectively.
[0139] The remote operation flow diagram of the interface synchronization library is as follows Fig.15As shown. On the remote device, after receiving the signal, the signal is handed over to the local library processing function. Similarly, first confirm the legitimacy of the signal and whether there is any accompanying variable data. Then find the user-defined slot function from the signal / slot function correspondence table and run it. Because the interfaces of the two devices connected through the network are driven by the same signal, the corresponding slot functions are also exactly the same, and the graphical interfaces of the two devices will keep changing synchronously.
[0140] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0141] Based on the same inventive concept, the embodiment of the present application also provides a graphical user interface synchronization device for implementing the graphical user interface synchronization method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more graphical user interface synchronization device embodiments provided below can refer to the limitations of the graphical user interface synchronization method above, and will not be repeated here.
[0142] In an exemplary embodiment, Fig.16 As shown, a graphical user interface synchronization device is provided, including: a data acquisition module 1602, a data sending module 1604 and a data response module 1606, wherein:
[0143] The data acquisition module 1602 is used to intercept local interface change data.
[0144] The data sending module 1604 is used to send the local interface change data to the first local response function and the remote device corresponding to the local interface change data respectively.
[0145] The data response module 1606 responds to the local interface change data according to the first local response function to update the graphical user interface of the local device; the remote device is used to synchronously update the graphical user interface of the remote device according to the local interface change data.
[0146] In an exemplary embodiment, the data acquisition module 1602 is also used to identify local cursor type operations and local keyboard type operations in local operations; generate local operation type signals based on local cursor type operations and local keyboard type operations; local operation type signals include local cursor type signals and local keyboard type signals; and obtain local automatic change data based on the automatic changes of the graphical user interface of the local device.
[0147] In an exemplary embodiment, the data sending module 1604 further includes:
[0148] A local data sending module is used to intercept local operation signals and local automatic change signals through a local signal collector, and send the local operation signals and local automatic change signals to a first local signal repeater; send the local operation signals and local automatic change signals to a first local response function through the first local signal repeater; intercept local automatic change independent data through a local change data repeater; the local automatic change independent data is used to update the graphical user interface of the local device.
[0149] In an exemplary embodiment, the data sending module 1604 further includes:
[0150] The network data sending module is used to send the local operation type signal and the local automatic change signal to the local network data transmitter respectively through the first local signal repeater; send the local automatic change independent data to the local network data transmitter through the local change data repeater; and send the local operation type signal, the local automatic change data and the local automatic change independent data to the remote network data receiver of the remote device through the local network data transmitter according to the data communication link between the local device and the remote device.
[0151] In an exemplary embodiment, the data response module 1606 further includes:
[0152] The remote response module is used to receive remote interface change data sent by the remote device; send the remote interface change data to the second local response function corresponding to the remote interface change data, and the second local response function is used to synchronously update the graphical user interface of the local device according to the remote interface change data.
[0153] In an exemplary embodiment, the data response module 1606 further includes:
[0154] The remote receiving module is used to receive the remote interface change data sent by the remote network data transmitter of the remote device through the local network data receiver according to the data communication link between the local device and the remote device; the remote interface change data includes remote operation type signals and remote automatic change data, and the remote automatic change data includes remote automatic change signals and remote automatic change independent data; through the second local signal repeater, the remote operation type signals and remote automatic change signals are obtained, and the remote operation type signals and remote automatic change signals are sent to the second local response function; through the local change data repeater, the remote automatic change independent data is obtained.
[0155] In an exemplary embodiment, the remote response module is further used to identify a remote cursor type slot function, a remote keyboard type slot function and a remote automatic change signal slot function in the second local response function;
[0156] According to the remote cursor slot function and the remote keyboard slot function, obtain the remote cursor action and the remote keyboard action; according to the remote automatic change signal slot function and the remote automatic change independent data, obtain the automatic change result of the remote interface; according to the remote cursor action, the remote keyboard action and the automatic change result of the remote interface, update the graphical user interface of the local device.
[0157] In an exemplary embodiment, the data response module 1606 further includes:
[0158] A local response module is used to identify the local cursor class slot function, the local keyboard class slot function and the local automatic change signal slot function in the first local response function; obtain local cursor actions and local keyboard actions according to the local cursor class slot function and the local keyboard class slot function; obtain the automatic change results of the local interface according to the local automatic change signal slot function and the local automatic change independent data; update the graphical user interface of the local device according to the local cursor action, local keyboard action and the automatic change results of the local interface.
[0159] Each module in the above-mentioned graphical user interface synchronization device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.
[0160] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.17As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a graphical user interface synchronization method is realized. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0161] Those skilled in the art will understand that Fig.17 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0162] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps of any method embodiment when executing the computer program.
[0163] In an exemplary embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of any method embodiment are implemented.
[0164] In an exemplary embodiment, a computer program product is provided, including a computer program, which implements the steps of any of the above method embodiments when executed by a processor.
[0165] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0166] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0167] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0168] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A graphical user interface synchronization method, characterized in that: The method comprises: Intercepting local interface change data; the local interface change data includes local operation class signals and local automatic change data; the local automatic change data includes local automatic change signals and local automatic change independent data; Sending the local operation signal and the local automatic change signal to the corresponding first local response function respectively, and sending the local interface change data to the remote device; According to the first local response function and the local automatic change independent data, respond to the local interface change data to update the graphical user interface of the local device; the remote device is used to synchronously update the graphical user interface of the remote device according to the local interface change data.
2. The graphical user interface synchronization method according to claim 1, characterized in that: The interception of local interface change data includes: Identify local cursor operations and local keyboard operations in local operations; Generate a local operation signal according to the local cursor operation and the local keyboard operation; the local operation signal includes a local cursor signal and a local keyboard signal; According to the automatic change of the graphical user interface of the local device, local automatic change data is obtained.
3. The graphical user interface synchronization method according to claim 1, characterized in that: The sending the local operation type signal and the local automatic change signal to the corresponding first local response function respectively comprises: intercepting the local operation class signal and the local automatic change signal through a local signal collector, and sending the local operation class signal and the local automatic change signal to a first local signal repeater; Sending the local operation signal and the local automatic change signal to the corresponding first local response function respectively through the first local signal repeater; The local automatic change independent data is intercepted by the local change data forwarder.
4. The graphical user interface synchronization method according to claim 3, characterized in that: The sending of the local interface change data to the remote device comprises: The local operation type signal and the local automatic change signal are respectively sent to the local network data transmitter through the first local signal repeater; sending the local automatic change independent data to the local network data sender via the local change data forwarder; The local operation class signal, the local automatic change data and the local automatic change independent data are sent to the remote network data receiver of the remote device through the local network data transmitter according to the data communication link between the local device and the remote device.
5. The graphical user interface synchronization method according to claim 1, characterized in that: The first local response function includes a first local cursor slot function and a first local keyboard slot function; the step of responding to the local interface change data according to the first local response function and the local automatic change independent data to update the graphical user interface of the local device includes: Responding to the signals received respectively by the first local cursor slot function and the first local keyboard slot function to obtain a first local cursor action and a first local keyboard action; Acquire a first local interface automatic change result according to the local automatic change independent data; The graphical user interface of the local device is updated according to the first local cursor action, the first local keyboard action and the first local interface automatic change result.
6. The graphical user interface synchronization method according to claim 1, characterized in that: The method further comprises: Receive remote interface change data sent by remote devices; Sending the remote interface change data to a second local response function corresponding to the remote interface change data; Respond to the remote interface change data according to the second local response function, and synchronously update the graphical user interface of the local device.
7. The graphical user interface synchronization method according to claim 6, characterized in that: The method further comprises: Receiving remote interface change data sent by a remote network data transmitter of a remote device through a local network data receiver according to a data communication link between the local device and the remote device; the remote interface change data includes remote operation type signals and remote automatic change data, and the remote automatic change data includes remote automatic change signals and remote automatic change independent data; Obtaining the remote operation type signal and the remote automatic change signal through a second local signal repeater, and sending the remote operation type signal and the remote automatic change signal to a corresponding second local response function respectively; The remote automatic change independent data is obtained through the local change data forwarder.
8. The graphical user interface synchronization method according to claim 7, characterized in that: The second local response function includes a second local cursor type slot function and a second local keyboard type slot function; the method further includes: Responding to the signals received respectively through the second local cursor slot function and the second local keyboard slot function to obtain a second local cursor action and a second local keyboard action; Acquire a second local interface automatic change result according to the remote automatic change independent data; The graphical user interface of the local device is updated according to the second local cursor action, the second local keyboard action and the second local interface automatic change result.
9. A graphical user interface synchronization device, characterized in that: The device comprises: Data acquisition module, used to intercept local interface change data; A data sending module, used to send the local operation type signal and the local automatic change signal to the corresponding first local response function respectively, and send the local interface change data to the remote device; The data response module is used to respond to the local interface change data according to the first local response function and the local automatic change independent data to update the graphical user interface of the local device; the remote device is used to synchronously update the graphical user interface of the remote device according to the local interface change data.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the graphical user interface synchronization method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Automatic testing method for non-intrusive type embedded software graphical user interface
CN105988924A
Quick interface interaction method and device for remote operation
CN108304239A
Analysis equipment remote control method and device, computer equipment and storage medium
CN112506080A
A method for realizing remote desktop data acquisition
CN1630246A