Application operation method, device, electronic device, storage medium and product
By calculating the relative coordinates of input events in the desktop operating system and passing them directly to the preset operating system, the problem of low fluency caused by time-consuming coordinate calculation is solved, and instant updates and efficient responses of applications are achieved.
Patent Information
- Application Number
- CN202411767246.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2044-12-04
AI Technical Summary
When an Android application runs on a desktop operating system, the time-consuming coordinate calculation causes the application screen to be unable to update in a timely manner, reducing the smoothness of the application.
When an input event is received, the relative coordinates of the input event are calculated and passed directly to the preset operating system to determine the coordinate position in the target application window and perform corresponding operations, avoiding the complex global coordinate conversion process.
By simplifying the coordinate calculation process, the application's responsiveness and smoothness are improved, ensuring that user operations are reflected instantly and accurately in the application interface.
Smart Images

Figure CN119248138B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cross-system transmission technology, and in particular to an application operation method, device, electronic device, storage medium and computer program product. Background Art
[0002] When an Android application runs on a desktop operating system, whenever a user operation event of the desktop operating system is received, the coordinates of the mouse in the Android system need to be calculated to execute the user operation event on the Android application. The coordinate calculation process is time-consuming and the application screen display cannot be updated in time, which reduces the smoothness of the application operation. Therefore, the current Android application on the desktop operating system has the problem of low smoothness when running. Summary of the Invention
[0003] The main purpose of this application is to provide an application operation method, aiming to solve the technical problem of how to improve the smoothness of application operation.
[0004] To achieve the above objectives, the present application proposes an application operation method, which is applied to a desktop operating system, wherein the desktop operating system is compatible with a preset operating system, and at least one target application is running on the preset operating system, and the target application is displayed as a desktop application window in the desktop operating system, and the target application is displayed as a target application window in the preset operating system, and the desktop application window is the same size as the target application window. The application operation method includes:
[0005] When an input event related to the desktop application window is received, calculating the relative coordinates of the operation focus of the input event in the desktop application window;
[0006] The relative coordinates are passed to the preset operating system, wherein the preset operating system is used to determine the coordinate position of the operation focus in the target application window according to the relative coordinates, and perform the operation corresponding to the input event on the target application window based on the coordinate position.
[0007] In one embodiment, the startup position of the desktop application window on the desktop of the desktop operating system is unrestricted, and the startup position of the target application on the desktop of the preset operating system is desktop zero point. When the focus window in the desktop operating system is switched, the focus window in the preset operating system is also switched accordingly, and the switched focus window is displayed at the top layer of the preset operating system.
[0008] In one embodiment, the step of transmitting the relative coordinates to the preset operating system includes:
[0009] Recording a desktop window identifier of the desktop application window, where the desktop window identifier corresponds to an application identifier of the target application;
[0010] A transmission channel with the preset operating system is established, and the relative coordinates are transmitted to the preset operating system. The relative coordinates carry the desktop window identifier, and the desktop window identifier is used to determine the target application corresponding to the desktop application window.
[0011] In one embodiment, the application operation method further includes:
[0012] Monitor the operating status of the transmission channel with the preset operating system according to a preset period, and record the system network status and system resource allocation status;
[0013] When the change in the operating state exceeds a preset change threshold within a preset period, the transmission channel is determined to be unstable, and an optimization strategy is determined and executed according to the system network state and the system resource allocation state.
[0014] In one embodiment, the step of determining and executing an optimization strategy based on the system network status and the system resource allocation status includes:
[0015] Comparing each indicator in the system network status and the system resource allocation status with the corresponding preset indicator threshold range, recording the indicator that does not meet the preset indicator threshold range as an abnormal indicator;
[0016] Searching for an optimization method corresponding to the abnormal indicator in a preset method library and generating an optimization strategy;
[0017] Execute the optimization strategy and output the execution result.
[0018] In one embodiment, after the step of outputting the execution result, the method further includes:
[0019] If the execution result is a failure, adjusting the optimization strategy according to the abnormal indicator and executing the strategy, and recording the number of adjustments;
[0020] When the number of adjustments reaches a preset adjustment threshold, the adjustment of the optimization strategy is stopped, an alarm message is generated and notified to the system administrator.
[0021] In addition, to achieve the above-mentioned purpose, the present application further proposes an application operation device, which is applied to a desktop operating system, wherein the desktop operating system is compatible with a preset operating system, and at least one target application is run on the preset operating system, and the target application is displayed as a desktop application window in the desktop operating system, and the target application is displayed as a target application window in the preset operating system, and the desktop application window is the same size as the target application window. The application operation device includes:
[0022] a calculation module, configured to calculate relative coordinates of an operation focus of the input event in the desktop application window when an input event related to the desktop application window is received;
[0023] A transmission module is used to transmit the relative coordinates to the preset operating system, wherein the preset operating system is used to determine the coordinate position of the operation focus in the target application window according to the relative coordinates, and perform the operation corresponding to the input event on the target application window based on the coordinate position.
[0024] In addition, to achieve the above-mentioned purpose, the present application also proposes an electronic device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the application operation method described above.
[0025] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and stores a computer program on the storage medium. When the computer program is executed by the processor, the steps of the application operation method described above are implemented.
[0026] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the application operation method described above.
[0027] The present application provides an application operation method, which is applied to a desktop operating system. The desktop operating system is compatible with a preset operating system. At least one target application runs on the preset operating system. The target application is displayed as a desktop application window in the desktop operating system. The target application is displayed as a target application window in the preset operating system, and the desktop application window and the target application window are the same size. The application operation method includes: when an input event about the desktop application window is received, calculating the relative coordinates of the operation focus of the input event in the desktop application window; passing the relative coordinates to the preset operating system, wherein the preset operating system is used to determine the coordinate position of the operation focus in the target application window according to the relative coordinates, and perform the operation corresponding to the input event on the target application window based on the coordinate position.
[0028] This application identifies multiple desktop application windows running in a desktop operating system, accurately distinguishing and locating any one of them. When an input event is received for a particular desktop application window, the application calculates the relative coordinates of the input event's focus within the desktop application window. Furthermore, since the desktop application window and the target application window are the same size, the input event is accurately mapped to the target application regardless of the location or size of the desktop application window. The calculated relative coordinates are then passed to the default operating system, enabling the default operating system to directly execute the corresponding input event based on these coordinates. The default operating system uses the received relative coordinates to determine the specific location of the focus within the target application and executes the input event accordingly, ensuring that user operations are instantly and accurately reflected in the application interface. Compared to related solutions that require calculating the coordinates of the mouse in the default operating system upon receiving a user operation event from the desktop operating system, this application ensures that the desktop application window and the target application window are the same size, allowing the application to directly calculate the relative coordinates of the input event within the target application. This avoids the complex global-to-local coordinate conversion process, reduces the time spent on coordinate calculation, and enables the application to respond to user operations more quickly, improving the smoothness of application operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] 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.
[0030] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0031] Figure 1 A flowchart of the first embodiment of the application operation method of this application is provided;
[0032] Figure 2 A schematic diagram of the cross-system transmission scenario of events provided for the application operation method of this application;
[0033] Figure 3 A schematic diagram of the system window layout provided for the application operation method of this application;
[0034] Figure 4 A flowchart of the second embodiment of the application operation method of this application is provided;
[0035] Figure 5 This is a schematic diagram of the module structure of the operating device used in the embodiment of the present application;
[0036] Figure 6 This is a schematic diagram of the device structure of the hardware operating environment involved in the application operation method in the embodiment of the present application.
[0037] The purpose, features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0038] It should be understood that the specific embodiments described herein are merely used to explain the technical solutions of the present application and are not intended to limit the present application.
[0039] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0040] An embodiment of the present application is applied to a desktop operating system, which is compatible with a preset operating system. At least one target application runs on the preset operating system. The target application is displayed as a desktop application window in the desktop operating system. The target application is displayed as a target application window in the preset operating system, and the desktop application window is the same size as the target application window. The main solution is: when an input event about the desktop application window is received, the relative coordinates of the operation focus of the input event in the desktop application window are calculated; the relative coordinates are passed to the preset operating system, wherein the preset operating system is used to determine the coordinate position of the operation focus in the target application window according to the relative coordinates, and perform the operation corresponding to the input event on the target application window based on the coordinate position.
[0041] In this embodiment, for ease of description, the following description is made with the desktop operating system as the execution subject.
[0042] Because in the existing technology, when the target application runs on a desktop operating system, every time a user operation event of the desktop operating system is received, the coordinates of the mouse in the preset operating system need to be calculated. This calculation process is complicated and time-consuming, resulting in the application screen being unable to be updated in time, reducing the fluency of the application.
[0043] This application provides a solution that keeps the desktop application window and the target application window the same size, directly calculates the relative coordinates of the operation focus of the input event in the target application, promptly updates the application screen and provides instant feedback on user operations, thereby improving the user experience and making the target application run more smoothly and naturally on the desktop operating system.
[0044] It should be noted that the execution subject of this embodiment may be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, mobile phone, etc., or an electronic device capable of implementing the above functions, a desktop operating system, etc. The following uses a desktop operating system as an example to illustrate this embodiment and the following embodiments.
[0045] Based on this, the present application embodiment provides an application operation method, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the operating method of this application.
[0046] In this embodiment, the application is applied to a desktop operating system, the desktop operating system is compatible with a preset operating system, at least one target application is running on the preset operating system, the target application is displayed as a desktop application window in the desktop operating system, and the desktop application window is displayed as a target application window in the preset operating system, and the desktop application window and the target application window are the same size. The application operation method includes steps S01 to S02:
[0047] Step S01, when an input event about a desktop application window is received, calculating the relative coordinates of the operation focus of the input event in the desktop application window;
[0048] It should be noted that the desktop operating system refers to the host environment in which the preset operating system runs, such as the Linux desktop operating system. In the desktop operating system, each target application is represented as a desktop application window, which is the interface for user interaction with the application. The preset operating system refers to the operating system environment on which this application is based, which can be the Android system. The target application refers to the application running on the preset operating system. The target application window refers to the window of the application running in the preset operating system. Input events can be user keyboard taps, mouse clicks, touch operations, etc., which are captured and processed by the desktop operating system. The operation focus refers to the element or position targeted by the current user input event. The relative coordinates are the offset relative to the upper left corner of the current desktop application window, not the global screen coordinates.
[0049] In addition, it should be noted that the graphical user interface (GUI) of the desktop operating system monitors and records all user interactions and captures user input events. These events may include mouse clicks, keyboard strokes, touch operations, etc. When multiple desktop application windows coexist, the current window is determined to be the focus window, that is, the window with which the user is interacting by tracking the position of the mouse cursor and the user's interaction behavior (such as clicking, focusing, etc.). Once the focus window is determined, the relative coordinates of the input event within the window are calculated. The relative coordinates are the offset relative to the upper left corner of the focus window, which reflects the specific position of the input event within the window. For example, if the user clicks the mouse at a certain position in the focus window, the desktop operating system will calculate the coordinates of this click event relative to the upper left corner of the window (such as (180,152)).
[0050] It is understandable that, since the existing solution needs to convert user operation events (such as mouse clicks, touches, etc.) from the desktop operating system into coordinates that can be understood by the preset operating system each time these events are received, so as to perform corresponding user operations on the target application, however, the traditional coordinate calculation process is often complicated and time-consuming, because it needs to take into account multiple factors such as the layout, scaling ratio, and scroll bar position of the desktop operating system window. These factors make the coordinate calculation complicated, thereby increasing the delay in event processing and reducing the smoothness of application operation. Therefore, step S01 is performed. Since the desktop application window and the target application window are the same size, there is no scaling problem. By calculating the relative coordinates of the input event at the operation focus, the relative coordinates of the input event at the operation focus in the preset operating system can be directly obtained, avoiding the complicated coordinate conversion process, reducing the time-consuming coordinate calculation, and providing an efficient basis for subsequent input event processing.
[0051] Step S02 : passing the relative coordinates to a preset operating system, wherein the preset operating system is used to determine the coordinate position of the operation focus in the target application window according to the relative coordinates, and perform an operation corresponding to the input event on the target application window based on the coordinate position.
[0052] It should be noted that a transmission channel (such as a socket) is established between the desktop operating system and the preset operating system to transmit relative coordinates and other necessary information. The calculated relative coordinates are encapsulated into a specific data packet or message format and transmitted to the preset operating system through the transmission channel. The data packet also includes other information, such as the type of input event (click, drag, scroll, etc.), timestamp, etc. After receiving the data packet, the preset operating system parses the relative coordinates and, by creating a new Java service (such as InputManagerService) and using the InputManager class, simulates this information into corresponding input events, and determines the coordinate position of the operation focus in the target application window based on the simulated input event. The coordinate position refers to the specific position of the operation focus of the input event in the target application window, which is determined based on the relative coordinates. After determining the coordinate position, the input event can be executed in the preset operating system.
[0053] For example, to help understand the technical concept or technical principle of this application, please refer to Figure 2 , Figure 2 This paper provides a scenario diagram for cross-system event transmission. In the desktop operating system, user input events, including touch events, mouse click events, and sliding events, are received. These input events are packaged and transmitted to the preset operating system through a transmission channel. After the preset operating system receives the packaged input events, it creates a new Java service and uses the InputManager class to simulate this information into corresponding input events. The simulated input events are passed to the target application to execute the corresponding input events.
[0054] It is understandable that, since the existing solution needs to pass the relative coordinates of the input event to the preset operating system after calculating these coordinates, so as to perform the corresponding user operation in the target application, however, the traditional coordinate transmission method involves multiple levels of conversion and verification, which will also increase the delay in event processing. Therefore, step S02 is performed to directly pass the relative coordinates to the preset operating system, avoiding the complicated coordinate conversion and verification process. Since the relative coordinates are already the offset within the current desktop application window, they can be directly understood and used by the preset operating system, reducing the delay in event processing and improving the smoothness of application operation.
[0055] In a feasible implementation, in step S01, there is no restriction on the startup position of the desktop application window on the desktop of the desktop operating system. The startup position of the target application on the desktop of the preset operating system is desktop zero point. When the focus window in the desktop operating system is switched, the focus window in the preset operating system is also switched accordingly. The switched focus window is displayed at the top layer of the preset operating system.
[0056] It should be noted that the desktop application window and the target application window are exactly the same in width and height. The desktop application window can be started at any position on the desktop of the desktop operating system. In the preset operating system, all target application windows are started by default in the upper left corner of the desktop (that is, the coordinate origin, 0,0). This means that no matter how the desktop application window is located in the desktop operating system, the target application window is always located in the same position in the preset operating system. When the focus window of the desktop operating system is updated, the foreground application in the preset operating system is updated synchronously, and the corresponding focus window is switched to the top layer. The focus window refers to the window that the current user is interacting with, that is, the target window of the user's current operation. In the desktop operating system, the focus window is usually determined by mouse clicks or keyboard switching.
[0057] For example, to help understand the technical concept or technical principle of this application, please refer to Figure 3 , Figure 3 A schematic diagram of the system window layout is provided. Assuming that the size of desktop application window B is 800x600 pixels, the window size of the corresponding target application B' should also be 800x600 pixels in the preset operating system. In the desktop operating system, desktop application windows can be located anywhere. For example, the user can drag a desktop application window to the lower right corner of the screen, while another window is placed in the upper left corner. In the preset operating system, the target application defaults to the desktop zero point O in the upper left corner of the desktop. Since the focus window in the desktop operating system is window A, the focus window in the preset operating system is window A' corresponding to window A, and window A' is at the top layer. At this time, window B' is in the lower layer. The upper left corners of window A' and window B' are both started at desktop zero point O, and the positions are fixed.
[0058] In this implementation, since the window sizes are consistent and the target application startup position is fixed, there is no difference in the window management, coordinate system, etc. between the desktop operating system and the target operating system. Relative coordinates can be used directly to locate input events, and there is no need for complex coordinate conversion to ensure that input events can be correctly mapped to the target application, thereby simplifying the coordinate calculation process, reducing the delay in event processing, and improving the response speed of the application. At the same time, the window of the desktop operating system can be started at any position on the desktop, which increases the flexibility of user layout.
[0059] In a feasible implementation, in step S02, the step of transmitting the relative coordinates to the preset operating system includes steps A01 and A02:
[0060] Step A01, recording a desktop window identifier of a desktop application window, where the desktop window identifier corresponds to an application identifier of a target application;
[0061] It should be noted that the system captures user input events on the desktop operating system, such as mouse clicks, keyboard input or touch screen operations, and records the desktop window identifier (DWID) of the desktop application window that triggers these events. The desktop window identifier is a unique identifier used to distinguish different desktop application windows. Each desktop window identifier corresponds to the application identifier (AID) of a specific target application. This correspondence is established through pre-configuration or program logic.
[0062] Step A02: establishing a transmission channel with a preset operating system, transmitting relative coordinates to the preset operating system, wherein the relative coordinates include a desktop window identifier, and the desktop window identifier is used to determine a target application corresponding to the desktop application window.
[0063] It should be noted that a transmission channel is established with the preset operating system. This transmission channel can be a socket-based communication mechanism or other efficient communication methods. When a user triggers an input event in a window of the desktop operating system, the relative coordinates of the event (that is, the coordinates relative to the upper left corner of the window) are obtained, and the relative coordinates are packaged together with the desktop window identifier of the window that triggered the event into a data packet. This data packet is sent to the preset operating system through the previously established transmission channel. In the preset operating system, the java-services service is responsible for receiving these data packets, parsing the desktop window identifier and relative coordinates, and using the inputManager to simulate these relative coordinates into corresponding input events. These events can be mouse clicks, touch operations or keyboard input, etc. The preset operating system passes these simulated input events to the corresponding target application. Since each desktop window identifier corresponds to a specific application identifier, the system can accurately pass the event to the correct application.
[0064] In addition, it should be noted that when the focus window of the desktop operating system changes (such as the user switches to another window), the preset operating system needs to synchronously update the foreground application, which means that the preset operating system needs to switch the current foreground application to the application corresponding to the focus window of the desktop operating system. At the same time, the preset operating system also needs to ensure that keyboard, scroll wheel and other events can be correctly passed to the current foreground application.
[0065] In this embodiment, through the correspondence between the desktop window identifier and the application identifier, the user input event in the desktop operating system is accurately associated with the target application in the preset operating system. By utilizing efficient transmission channels such as sockets, the rapid transmission of relative coordinates and the timely response of the preset operating system are ensured, thereby improving the efficiency and accuracy of data transmission.
[0066] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above embodiment 1 can be referred to the above introduction and will not be described in detail later. Figure 4 The application operation method further includes steps S11 to S12:
[0067] Step S11, monitoring the operating status of the transmission channel with the preset operating system according to a preset period, and recording the system network status and system resource allocation status;
[0068] It should be noted that the system monitors the transmission channel between the preset operating system at a preset period (such as 1 minute). The monitoring content includes but is not limited to the operating status of the transmission channel. The operating status refers to the performance of the transmission channel at a specific time point, including key indicators such as data transmission rate, delay, packet loss rate, etc. At the same time, the system also records the system network status and system resource allocation status. The system network status includes network bandwidth, delay, jitter, etc. These parameters reflect the stability and reliability of the current network environment. The system resource allocation status involves the occupancy of system resources such as CPU, memory, disk I / O, etc. These resources are critical to maintaining the stable operation of the transmission channel.
[0069] Step S12: When the change in the operating state within a preset period exceeds a preset change threshold, the transmission channel is determined to be unstable, and an optimization strategy is determined and executed according to the system network state and the system resource allocation state.
[0070] It should be noted that within a preset period, if the system detects that the change in the operating status of the transmission channel exceeds a preset change threshold (for example, a sudden drop in data transmission rate, a significant increase in latency, or a sharp increase in packet loss rate, etc.), the transmission channel is determined to be unstable. This preset change threshold is set based on historical data and experience, and is used to distinguish between normal operating status fluctuations and abnormal operating status changes. Once the transmission channel is determined to be unstable, an optimization strategy is determined based on the current system network status and system resource allocation status. The optimization strategy refers to measures determined based on the current system network status and system resource allocation status to restore stable operation of the transmission channel, including adjusting network configuration (such as changing network protocols, optimizing routing paths, etc.), optimizing system resource allocation (such as releasing unnecessary memory usage, reducing CPU usage, etc.), or adjusting transmission channel parameters (such as increasing the number of retransmissions, adjusting data packet size, etc.).
[0071] In this embodiment, the operating status of the transmission channel is monitored through a preset period, and the current network status is recorded, which provides a basis for subsequent abnormality judgment and the formulation of optimization strategies. When an abnormality is detected in the operating status of the transmission channel, the transmission channel is promptly judged to be unstable, and an optimization strategy is formulated based on the current network status and resource allocation status. By executing these optimization strategies, the system can quickly restore the stable operation of the transmission channel, ensuring that the target application can still run smoothly under complex and changeable network environments and system resource conditions, providing users with a stable and efficient application experience.
[0072] In a feasible implementation, in step S12, the steps of determining and executing the optimization strategy according to the system network status and the system resource allocation status include steps B01 to B03:
[0073] Step B01: Compare each indicator of the system network status and the system resource allocation status with the corresponding preset indicator threshold range, and record the indicator that does not meet the preset indicator threshold range as an abnormal indicator;
[0074] It should be noted that the real-time collected system network status and system resource allocation status data include, but are not limited to, key performance indicators (KPIs) such as network bandwidth utilization, network latency, packet loss rate, CPU usage, memory occupancy, and disk I / O speed. The system sets a reasonable preset indicator threshold range for each key performance indicator based on historical data, experience values, and application requirements. This range is usually an interval that defines the "normal" range of the KPI. The actual value of each KPI is compared with the preset threshold range. If the actual value of a KPI exceeds its preset threshold range, the KPI is marked as an abnormal indicator and its detailed information is recorded, including the indicator name, actual value, threshold range, and time when the threshold is exceeded.
[0075] Step B02: Searching for an optimization method corresponding to an abnormal indicator in a preset method library and generating an optimization strategy;
[0076] It should be noted that the system maintains a preset method library based on experience summary, expert advice or machine learning algorithms, which contains a series of optimization methods and strategies for different types of abnormal indicators. According to the abnormal indicators recorded in step B01, the corresponding optimization method is searched in the preset method library. After finding the corresponding optimization method through algorithms such as keyword matching, fuzzy search or rule-based reasoning, the system will generate one or more optimization strategies based on factors such as the current system status, application requirements and the priority of the optimization method, including adjusting network parameters, optimizing resource allocation, increasing hardware resources, etc. For multiple abnormal indicators, a comprehensive optimization strategy is generated, and multiple optimization methods are combined to achieve the best overall effect.
[0077] Step B03: execute the optimization strategy and output the execution result.
[0078] It should be noted that according to the generated optimization strategy, corresponding operations are automatically performed, including modifying system configuration, adjusting resource allocation, updating software version, etc. After the optimization strategy is executed, a detailed execution report is generated based on the execution results, including the execution time of the optimization strategy, KPIs comparison before and after execution, optimization effect evaluation, etc., as a reference and basis for subsequent optimization work.
[0079] In this embodiment, by setting and comparing preset indicator threshold ranges, potential factors affecting the smoothness of the target application's operation are discovered and located in a timely manner, providing precise targets for the formulation of subsequent optimization strategies. By introducing a preset method library, optimization methods for specific problems are quickly found, thereby greatly shortening the formulation time of the optimization strategy and improving the pertinence and effectiveness of the optimization strategy. By executing the optimization strategy and outputting the execution results, the actual effect of the optimization work is intuitively demonstrated, providing data support and feedback for subsequent optimization work.
[0080] In a feasible implementation manner, in step B03, after the step of outputting the execution result, steps B11 to B12 are further included:
[0081] Step B11: If the execution result is failure, adjust the optimization strategy according to the abnormal indicators and execute it, and record the number of adjustments;
[0082] It should be noted that after step B03 is executed, if the system detects that the execution result is a failure (i.e., the expected performance improvement is not achieved or the problem is not resolved), the optimization strategy will be adjusted based on the currently detected abnormal indicators (such as extended application response time, abnormally high CPU usage, memory leak, etc.). The adjusted optimization strategy will be executed again, and the system will record the number of times this adjustment has been made.
[0083] Step B12: When the number of adjustments reaches a preset adjustment threshold, the optimization strategy adjustment is stopped, an alarm message is generated, and the system administrator is notified.
[0084] It should be noted that when the number of adjustments reaches the preset adjustment threshold (that is, the system has attempted multiple optimization strategy adjustments but the problem has not been resolved), the system will stop further optimization strategy adjustments and enter the alarm message generation process. Based on the reason for the execution failure, relevant log information, and previously recorded abnormal indicators, the system constructs an alarm message, detailing the execution failure. An alarm message is information automatically generated to notify the system administrator when the system detects an abnormal or error situation, including the time and location of the failure (that is, which system component or application), the cause (such as insufficient resources, configuration errors, etc.), and related abnormal indicator values (such as excessive CPU usage, excessive memory usage, etc.). The generated alarm message is sent to the system administrator through the preset notification channel (such as email, SMS, instant messaging tools, etc.). The system administrator is the professional responsible for maintaining and managing the normal operation of the system. In addition to the alarm message itself, the system can also provide the system administrator with follow-up processing suggestions, such as possible solutions and recommended optimization methods, based on historical experience and expert advice.
[0085] In this embodiment, by automatically adjusting the optimization strategy according to abnormal indicators, the system can respond to various performance issues more flexibly, improve the pertinence and effectiveness of the optimization strategy. At the same time, recording the number of adjustments helps in subsequent analysis and evaluation of the effectiveness of the optimization strategy, and provides data support for further optimization. By setting a preset adjustment threshold and stopping the strategy adjustment when the threshold is reached, the system can avoid invalid optimization attempts and reduce resource waste. At the same time, generating alarm messages and notifying system administrators helps to detect problems in a timely manner and take manual intervention measures to ensure the stable operation of the application.
[0086] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the application and operation methods of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0087] The present application also provides an application operating device, which is applied to a desktop operating system. The desktop operating system is compatible with a preset operating system. The preset operating system runs multiple target applications. The target applications are represented as desktop application windows in the desktop operating system. Please refer to Figure 5 , the application operating device includes:
[0088] The calculation module 10 is used to calculate the relative coordinates of the operation focus of the input event in the desktop application window when receiving the input event about the desktop application window;
[0089] The transmission module 20 is used to transmit the relative coordinates to the preset operating system, wherein the preset operating system is used to determine the coordinate position of the operation focus in the target application window according to the relative coordinates, and perform the operation corresponding to the input event on the target application window based on the coordinate position.
[0090] Optionally, there is no restriction on the startup position of the desktop application window on the desktop of the desktop operating system. The startup position of the target application on the desktop of the preset operating system is desktop zero. When the focus window in the desktop operating system is switched, the focus window in the preset operating system is also switched accordingly. The switched focus window is displayed at the top layer of the preset operating system.
[0091] Optionally, the transmission module 20 is further configured to:
[0092] Recording a desktop window identifier of the desktop application window, where the desktop window identifier corresponds to an application identifier of the target application;
[0093] A transmission channel with a preset operating system is established, and relative coordinates are transmitted to the preset operating system. The relative coordinates include a desktop window identifier, and the desktop window identifier is used to determine the target application corresponding to the desktop application window.
[0094] Optionally, the application operation device further includes a monitoring module 30, which is further configured to:
[0095] Monitor the running status of the transmission channel with the preset operating system according to the preset period, and record the system network status and system resource allocation status;
[0096] When the change in the operating status within a preset period exceeds a preset change threshold, the transmission channel is determined to be unstable, and an optimization strategy is determined and executed based on the system network status and system resource allocation status.
[0097] Optionally, the monitoring module 30 is further configured to:
[0098] Compare each indicator in the system network status and system resource allocation status with the corresponding preset indicator threshold range, and record the indicators that do not meet the preset indicator threshold range as abnormal indicators;
[0099] Search for optimization methods corresponding to abnormal indicators in the preset method library and generate optimization strategies;
[0100] Execute the optimization strategy and output the execution results.
[0101] Optionally, the monitoring module 30 is further configured to:
[0102] If the execution result is a failure, adjust the optimization strategy based on the abnormal indicators and execute it, and record the number of adjustments;
[0103] When the number of adjustments reaches the preset adjustment threshold, the optimization strategy adjustment is stopped, an alarm message is generated and notified to the system administrator.
[0104] The application operation device provided in this application, employing the application operation method described in the aforementioned embodiments, can address the technical problem of improving the smoothness of application operation. Compared to the prior art, the application operation device provided in this application achieves the same beneficial effects as the application operation method described in the aforementioned embodiments. Other technical features of the application operation device are the same as those disclosed in the aforementioned embodiments and are not further elaborated upon here.
[0105] The present application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the application operation method in the above-mentioned embodiment one.
[0106] Reference below Figure 6 , which shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present application. The electronic devices in the embodiments of the present application may include, but are not limited to, mobile terminals such as mobile phones, laptop computers, PADs (Portable Application Description: tablet computers), and fixed terminals such as digital TVs and desktop computers. Figure 6 The electronic device shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.
[0107] like Figure 6As shown, an electronic device may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes based on programs stored in a read-only memory (ROM) 1002 or programs loaded from a storage device 1003 into a random access memory (RAM) 1004. RAM 1004 also stores various programs and data required for the operation of the electronic device. Processing device 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems may be connected to I / O interface 1006: input devices 1007, such as a touchscreen, touchpad, keyboard, or mouse; output devices 1008, such as a liquid crystal display (LCD), speaker, or vibrator; storage device 1003, such as a magnetic tape or hard disk; and communication devices 1009. Communication devices 1009 may allow the electronic device to communicate with other devices wirelessly or wired to exchange data. Although the figures show electronic devices with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have instead.
[0108] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0109] The electronic device provided in this application, using the application operation method in the above-mentioned embodiment, can solve the technical problem of how to improve the smoothness of application operation. Compared with the prior art, the beneficial effects of the electronic device provided in this application are the same as the beneficial effects of the application operation method provided in the above-mentioned embodiment, and the other technical features of the electronic device are the same as those disclosed in the method of the above-mentioned embodiment, and are not further described here.
[0110] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0111] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
[0112] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer program) stored thereon, wherein the computer-readable program instructions are used to execute the application operation method in the above-mentioned embodiment.
[0113] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0114] The computer-readable storage medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0115] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by an electronic device, the application operation device: when receiving an input event regarding a desktop application window, calculates the relative coordinates of the operation focus of the input event in the desktop application window; passes the relative coordinates to a preset operating system, wherein the preset operating system is used to determine the coordinate position of the operation focus in the target application window based on the relative coordinates, and performs the operation corresponding to the input event on the target application window based on the coordinate position.
[0116] Computer program code for performing the operations of the present application may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0117] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.
[0118] The modules described in the embodiments of the present application may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.
[0119] The computer-readable storage medium provided in this application stores computer-readable program instructions (i.e., a computer program) for executing the aforementioned application operation method, thereby solving the technical problem of improving the smoothness of application operation. Compared to the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the application operation method provided in the aforementioned embodiments, and are not further elaborated here.
[0120] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned application operation method when executed by a processor.
[0121] The computer program product provided in this application can solve the technical problem of how to improve the smoothness of application operation. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as the beneficial effects of the application operation method provided in the above embodiment, and will not be repeated here.
[0122] The above description is only part of the embodiments of the present application and does not limit the patent scope of the present application. All equivalent structural transformations made by using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.
Claims
1. An application operation method, characterized in that: Applied to a desktop operating system, the desktop operating system is compatible with a preset operating system, at least one target application is running on the preset operating system, the target application is displayed as a desktop application window in the desktop operating system, the target application is displayed as a target application window in the preset operating system, and the desktop application window is the same size as the target application window, the application operation method includes: Upon receiving an input event regarding the desktop application window, calculating the relative coordinates of the operation focus of the input event in the desktop application window, wherein the startup position of the desktop application window on the desktop of the desktop operating system is not restricted, the startup position of the target application on the desktop of the preset operating system is the desktop zero point, and when the focus window in the desktop operating system switches, the focus window in the preset operating system also switches accordingly, and the switched focus window is displayed on the top layer of the preset operating system; establishing a transmission channel between the desktop operating system and the preset operating system, and transmitting the relative coordinates to the preset operating system, wherein the preset operating system is configured to determine the coordinate position of the operation focus in the target application window based on the relative coordinates, and perform the operation corresponding to the input event on the target application window based on the coordinate position; The application operation method further includes: Monitor the operating status of the transmission channel with the preset operating system according to a preset period, and record the system network status and system resource allocation status; When the change in the operating state exceeds a preset change threshold within a preset period, the transmission channel is determined to be unstable, and each indicator in the system network state and the system resource allocation state is compared with the corresponding preset indicator threshold range, and the indicator that does not meet the preset indicator threshold range is recorded as an abnormal indicator; Searching for an optimization method corresponding to the abnormal indicator in a preset method library, and generating an optimization strategy based on the current system state, application requirements, and the priority of the optimization method, wherein a comprehensive optimization strategy is generated for multiple abnormal indicators; Execute the optimization strategy and output the execution result; In the case where the execution result is a failure, the optimization strategy is adjusted and executed according to the abnormal indicator.
2. The application operation method according to claim 1, wherein: The relative coordinates include a desktop window identifier of the desktop application window, and the step of establishing a transmission channel between the desktop operating system and the preset operating system includes: A desktop window identifier of the desktop application window is recorded, where the desktop window identifier corresponds to an application identifier of the target application, and is used to determine the target application corresponding to the desktop application window.
3. The application operation method according to claim 1, wherein: After the step of adjusting and executing the optimization strategy according to the abnormal indicator, the following steps are further included: The number of adjustments is recorded, and when the number of adjustments reaches a preset adjustment threshold, the adjustment of the optimization strategy is stopped, an alarm message is generated, and a system administrator is notified.
4. An application operating device, characterized in that: Applied to a desktop operating system, the desktop operating system is compatible with a preset operating system, at least one target application is running on the preset operating system, the target application is displayed as a desktop application window in the desktop operating system, the target application is displayed as a target application window in the preset operating system, and the desktop application window is the same size as the target application window, the application operating device includes: a calculation module configured to, upon receiving an input event regarding the desktop application window, calculate the relative coordinates of an operation focus of the input event within the desktop application window, wherein the startup position of the desktop application window on the desktop of the desktop operating system is unlimited, the startup position of the target application on the desktop of the preset operating system is desktop zero point, and when the focus window in the desktop operating system switches, the focus window in the preset operating system also switches accordingly, and the switched focus window is displayed at the top layer of the preset operating system; a transmission module, configured to establish a transmission channel between the desktop operating system and the preset operating system, and transmit the relative coordinates to the preset operating system, wherein the preset operating system is configured to determine the coordinate position of the operation focus in the target application window based on the relative coordinates, and perform the operation corresponding to the input event on the target application window based on the coordinate position; A monitoring module is used to monitor the operating status of the transmission channel with the preset operating system according to a preset period, and record the system network status and system resource allocation status; when the change in the operating status within the preset period exceeds a preset change threshold, it is determined that the transmission channel is unstable, and each indicator in the system network status and the system resource allocation status is compared with the corresponding preset indicator threshold range, and the indicators that do not meet the preset indicator threshold range are recorded and recorded as abnormal indicators; the optimization method corresponding to the abnormal indicator is searched in the preset method library, and an optimization strategy is generated according to the current system status, application requirements and the priority of the optimization method, wherein, for multiple abnormal indicators, a comprehensive optimization strategy is generated; the optimization strategy is executed, and the execution result is output; if the execution result is a failure, the optimization strategy is adjusted according to the abnormal indicator and executed.
5. An electronic device, characterized in that: The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the application operation method according to any one of claims 1 to 3.
6. A storage medium, characterized in that The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the application operation method according to any one of claims 1 to 3 are implemented.
7. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the application operation method according to any one of claims 1 to 3 are implemented.
Citation Information
Patent Citations
Cross-operating-environment low-delay mouse drive optimization method
CN115309465A