Window service implementation method and related apparatus

By abstracting the window management interface into a universal interface across different operating system versions, the adaptation problem of window business logic across different operating system versions is solved, program code decoupling is achieved, and development and maintenance costs are reduced.

CN122363789APending Publication Date: 2026-07-10ZHEJIANG GEELY HLDG GRP CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG GEELY HLDG GRP CO LTD
Filing Date
2026-03-11
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Differences in the implementation logic and compatibility of window services across different operating system versions lead to high development and maintenance costs, necessitating adaptation for different operating system versions.

Method used

By abstracting the window management interfaces of different operating system versions, a general interface is obtained, and the window management interface of the current operating system version is called through this general interface to achieve the target function.

Benefits of technology

This decouples the window business logic code from the operating system, reducing development cycle and cost, and lowering maintenance difficulty.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122363789A_ABST
    Figure CN122363789A_ABST
Patent Text Reader

Abstract

This application proposes a method and related apparatus for implementing window services, relating to the field of software technology. The method includes: upon triggering a target function of a target window service, determining a target general interface in an adapter module corresponding to the target function; wherein the adapter module includes at least one general interface, which is an interface abstracted from a target-class window management interface in the operating system, and the target-class window management interface has differences in the target window service across different versions of the operating system; and implementing the target function by calling the corresponding target window management interface in the current operating system version through the target general interface. The technical solution provided by this application can solve the problem in the prior art where window service program code needs to be adapted for different versions of the operating system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of software technology, and more specifically, to a method and related apparatus for implementing window services. Background Technology

[0002] In smart cockpits, smartphones, tablets, and other smart terminal devices, window functionality is a core foundation for human-computer interaction. The implementation of window functionality relies on the window management interface within the operating system. And the operating system undergoes version iterations and updates, such as upgrading from Android 9 to Android 10.

[0003] The window management interfaces used to implement window services may differ across different operating system versions. For example, the type of window management interface used to implement the same window service function may vary in different operating system versions; furthermore, higher versions of operating systems may add or remove some window management interfaces compared to lower versions. These differences lead to variations in the implementation logic and compatibility of window services across different operating system versions. This necessitates developing adaptable window service program code for different operating system versions, resulting in long development cycles and high costs. Furthermore, maintaining window service program code across different versions also presents challenges. Summary of the Invention

[0004] Based on the defects and shortcomings of the prior art, this application proposes a window service implementation method and related apparatus, which can solve the problem that the window service program code in the prior art needs to be adapted to different versions of the operating system.

[0005] According to a first aspect of this application, a method for implementing window services is provided, the method comprising: When the target function of the target window service is triggered, the target general interface corresponding to the target function in the adapter module is determined; wherein, the adapter module includes at least one general interface, the general interface is an interface abstracted from the target class window management interface in the operating system, and the target class window management interface is an interface that differs in different versions of the operating system regarding the target window service; The target function is achieved by calling the corresponding target window management interface in the current operating system version through the target general interface.

[0006] According to a second aspect of this application, a window service implementation apparatus is provided, the apparatus comprising: The determination module is used to determine the target general interface in the adapter module corresponding to the target function when the target function of the target window service is triggered; wherein, the adapter module includes at least one general interface, the general interface is an interface abstracted from the target class window management interface in the operating system, and the target class window management interface is an interface that differs in different versions of the operating system regarding the target window service; The implementation module is used to call the corresponding target window management interface in the current operating system version through the target general interface to implement the target function.

[0007] According to a third aspect of this application, an electronic device is provided, comprising: a memory and a processor; The memory is connected to the processor and is used to store programs; The processor is used to implement the window service implementation method as described in the first aspect by running the program in the memory.

[0008] According to a fourth aspect of this application, a storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the window service implementation method as described in the first aspect.

[0009] According to a fifth aspect of this application, a computer program product or computer program is provided, the computer program product including the computer program, wherein when a processor executes the computer program, it implements the steps in the window business implementation method as described in the first aspect.

[0010] Beneficial effects: This application abstracts a universal interface from the window management interfaces that differ across different operating system versions, thus decoupling the window business logic code from the operating system. The window business logic code can use this universal interface to call the corresponding window management interfaces in different operating system versions to implement the corresponding window functions. This decoupling eliminates the need for adapting the window business logic code to operating system version updates, shortening the development cycle, reducing development costs, and eliminating the need to maintain different versions of window business logic code, thus reducing maintenance difficulties. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0012] Figure 1 This is a flowchart illustrating the window service implementation method provided in the embodiments of this application.

[0013] Figure 2 This is one of the block diagrams of a control system provided in an embodiment of this application.

[0014] Figure 3 This is a schematic diagram illustrating the construction concept of a control system provided in an embodiment of this application.

[0015] Figure 4 This is a second block diagram of a control system provided in an embodiment of this application.

[0016] Figure 5 This is a block diagram of a window service implementation device provided in an embodiment of this application.

[0017] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0019] Exemplary methods This application provides a method for implementing target window services in smart terminal devices with screens, such as smart cockpits, smartphones, and tablets. This method addresses the problem in existing technologies where window service program code needs to be adapted to different operating system versions. The method is executed by the smart terminal device.

[0020] The target window service mentioned here can be either a full-screen window service or a small window service. The small window service refers to a window whose area displayed on the target screen of a smart terminal device is smaller than the area of ​​a full-screen window displayed on that target screen. The small window displayed through this service can float above the full-screen window, and, where functionality allows, parameters such as the small window's position, size, color, background, and display effects can be adjusted.

[0021] The following examples provide a detailed description of the window service implementation method. These examples can be combined with each other, and similar concepts or processes may not be repeated in some examples.

[0022] like Figure 1 As shown, the method may include steps 101 and 102, as described below: Step 101: When the target function of the target window business is triggered, determine the target general interface in the adapter module that corresponds to the target function.

[0023] like Figure 2 As shown, the software system used to implement the target window's business logic may include: a window business logic module, an adapter module, and an operating system module.

[0024] The window service module includes the program code corresponding to the target window service.

[0025] This program code is used to implement various functions of the target window service, such as opening and closing the window, and adjusting the window's position, size, color, background, and display effects. When the target function of the target window service is detected to be triggered, the program code can execute the method provided in the embodiments of this application. The target function mentioned herein can be at least one of the various functions of the target window service. Optionally, the program code can be encapsulated into a window service code package isolated from the operating system, forming a service code portion independent of the operating system.

[0026] The adapter module includes at least one general-purpose interface.

[0027] This generic interface is an abstraction of the target-class window management interface in the operating system. The target-class window management interface described here refers to the interface whose target window functionality differs across different versions of the operating system.

[0028] The interfaces that differ as described herein may include, but are not limited to: interfaces that implement the same window functionality but differ in different versions of the operating system, or interfaces added by one version of the operating system for new window functionality for the target window business compared to other versions.

[0029] For window management interfaces used to implement the same window functionality but with different interfaces, for example, in Android 9-10, the ActivityStack (component stack) class window management interface is configured to implement the window functionality in the target window business logic, while in Android 12 and higher, the Task (task) class window management interface is configured to implement the same window functionality in the target window business logic. For Android 12 and higher, if the target window business logic's application code is not updated for compatibility and continues to call the ActivityStack class interface, a window functionality crash will occur.

[0030] For new window functionalities added to the target window business, for example, in Android 10 of the smart cockpit, the lifecycle of the window Activity (i.e., window component) in the target window business is no different from that of a normal page. When the target window business is running in the background, it is easily killed by the system's Out Of Memory (OOM) killing mechanism. However, in Android 12 and higher versions of the smart cockpit, the vehicle keep-alive priority of the target window business can be set through CarService, thereby reducing the probability of the window Activity being killed by the killing mechanism. However, this logic depends on the CarActivityManager interface, which is not available in older operating systems. If the program code of the target window business is not updated for compatibility, this function cannot be used.

[0031] For window management interfaces that differ, a generic interface can be obtained by abstracting the interface based on window functionality. The window functionality mentioned here may include, but is not limited to, functions related to windows such as launching a window, closing a window, and adjusting the window's size, position, background, and shape. For example, when the window management interface for launching a window differs across different versions of the operating system, a generic interface can be abstracted based on this functionality.

[0032] The operating system module includes window management interfaces for implementing various functions of the target window's services. These include interfaces for starting or stopping the target window's services, and interfaces for adjusting the size, position, background, and shape of the window displayed through the target window's services. The operating system can be, but is not limited to, Android, Windows, or Linux.

[0033] Step 102: Call the corresponding target window management interface in the current operating system version through the target general interface to achieve the target function.

[0034] In this embodiment, the program code corresponding to the target window service can call the corresponding window management interface in the operating system through the general interface in the adapter module to implement the corresponding window function.

[0035] For example, if the startup function of the target window service has a corresponding general interface in the adapter module, after the user triggers the startup function, the program code corresponding to the target window service can call the corresponding window management interface in the operating system through the corresponding general interface in the adapter module to start the target window service.

[0036] The following section will use the example of changing the ActivityStack class interface to the Task class interface in different versions of the operating system to illustrate the implementation process of the target window business.

[0037] The program code corresponding to the target window's business logic can call the corresponding general interface, namely the Task adapter class, through the adapter module. The Task adapter class then calls the corresponding window management interface in the operating system. For example, if the current operating system version is Android 11, the window management interface corresponding to the Task adapter class is ActivityStack.getStack(); if the current operating system version is Android 12, the window management interface corresponding to the Task adapter class is Task.getRootTask().

[0038] This application's embodiments abstract a universal interface from the window management interfaces that differ across different operating system versions, thus decoupling the window business logic code from the operating system. The program code corresponding to the window business logic can use this universal interface to call the corresponding window management interfaces in different operating system versions to implement the corresponding window functions. This decoupling eliminates the need for adapting the window business logic code to operating system version updates, shortening the development cycle, reducing development costs, and eliminating the need to maintain different versions of the window business logic code, thus reducing maintenance difficulties.

[0039] In some alternative embodiments, the adapter module may also include an implementation class corresponding to the generic interface.

[0040] An implementation class is a concrete, instantiable class that carries and implements the logic. It contains the actual algorithms, data manipulations, and calls to external systems. An implementation can be completed by one or more different implementation classes.

[0041] Therefore, step 102: calling the corresponding target window management interface in the current operating system version through the target general interface to implement the target function can include steps A1 and A2, as described below: Step A1: Determine the corresponding target implementation class through the target generic interface in the adapter module.

[0042] Step A2: Implement the target function by calling the corresponding target window management interface through the target implementation class.

[0043] When determining the corresponding target implementation class, it can be done according to class naming rules. In this embodiment, the naming rule for the implementation class can be: general interface name + Impl. For example, when the general interface name is Task, the class TaskImpl can be found in the current ClassLoader. After determining the corresponding target implementation class, the target implementation class can be called, and the target implementation class can call the target window management interface, obtain the default constructor through reflection, construct the corresponding instance according to the default constructor, and then save the instance in the global cache list to implement the corresponding window function. An instance refers to a concrete, operable object created in memory during program runtime. The constructor is mainly used to initialize the object when it is created, that is, to assign initial values ​​to the object's member variables.

[0044] When adding new general interfaces, implementations need to be done at the operating system implementation layer to avoid compilation failures.

[0045] In some alternative embodiments, for window functions that the target window service does not have in the lower version of the operating system compared to the higher version, in addition to abstracting the corresponding general interface, it is also necessary to define the parameters for implementing the window function and the required window management interface in the corresponding implementation class in the adapter module.

[0046] Therefore, when the target function is a window function that is not available in the lower version of the operating system compared to the higher version, and the current operating system version is a lower version, step A1: Determine the corresponding target implementation class through the target generic interface in the adapter module, which may include: The version of the current operating system is determined through the target generic interface in the adapter module; and the corresponding target implementation class is determined based on the version of the current operating system and the target function.

[0047] The adapter module includes implementation classes for different versions of the operating system. Therefore, before determining the target implementation class, it is necessary to first determine the version of the current operating system in order to accurately locate the target implementation class.

[0048] After the program code of the target window calls the target generic interface in the adapter module, this target generic interface can automatically determine the current operating system version. For example, this target generic interface can communicate with the operating system module to inquire about the operating system version and determine the current operating system version based on the feedback information from the operating system module. Then, the target implementation class is determined in the corresponding version's implementation class. Of course, this is just an example; other feasible methods can also be used to determine the current operating system version.

[0049] Step A2: Implement the target functionality by calling the corresponding target window management interface through the target implementation class, which may include: The target function is implemented by calling the target window management interface based on the parameters used in the target implementation class to implement the target function.

[0050] For example, in window animation processing, in higher versions of operating systems, a bouncing animation can be generated when the window is moved to a target position. The program code for the target window's business logic can achieve this by calling the corresponding window management interface A in the higher version of the operating system. However, in lower versions of operating systems, this window functionality is not available, and the operating system does not have a window management interface A.

[0051] In this embodiment, to implement this function in a lower version operating system, a general interface can be abstracted first, and then an implementation class corresponding to this general interface can be designed. In the implementation class, parameters for implementing this type of window animation are defined, such as the coordinates of the target position, the start and end points of the window bounce, and the path of the window bounce. The implementation of this window animation function also requires calling the window management interface in the operating system; therefore, it is also possible to predetermine which window management interfaces can be used to implement this animation effect, and then define the required operating system window management interfaces to be called in the implementation class.

[0052] The above solution enables the features of higher-version operating systems to be implemented in lower-version operating systems, thereby improving the user experience of smart terminal devices with different versions of operating systems installed.

[0053] In some alternative embodiments, the adapter module can be built based on target difference factors, that is, the general window and the corresponding implementation class, etc., can be built based on target difference factors.

[0054] The target difference factors mentioned here may include, but are not limited to, at least one of the following: differences in the type of window management interface, differences in the newly added window management interface, differences in the name of the window management interface, differences in the path of the window management interface, and differences in the name of system constants related to the implementation of the target window business.

[0055] This application embodiment can construct and implement the adapter module based on the differences in target window business between different versions of the operating system. The following uses the Android operating system as an example to explain the reason for abstracting the general interface (i.e., the difference factors).

[0056] 1. Differences in the types of window management interfaces Due to changes in the Android version architecture, the task unit for the window manager has changed. For example, in Android 11, it is the ActivityStack class, while in Android 12 and later, it is the Task class. The interface type has also changed. Therefore, for this type of window management interface, it is necessary to abstract a general interface and the corresponding implementation class.

[0057] 2. Differences in the newly added window management interface With the improvement of in-vehicle configuration, some vehicles are now equipped with multiple displays, such as the driver's screen, the passenger's screen, and the rear screen. Android 12 has added a window management interface for the three screens, which requires abstracting a general interface and the corresponding implementation class.

[0058] 3. The system constant definition name has changed. In Android 11 and Android 12, the names of system constants related to the implementation of the target window business logic may change, such as the addition, deletion or modification of some system constant names. For this, it is necessary to abstract a general interface and the corresponding implementation class.

[0059] 4. Some interface paths have changed. For example, in Android 11, TaskSnapShot was a static inner class under ActivityTaskManager. However, in Android 12, TaskSnapShot is defined separately under com.android.server.wm. Since the class paths are different, a generic interface and corresponding implementation class need to be abstracted for this purpose.

[0060] 5. Differences in the names of window management interfaces For example, compared to Android 11, the name of the window management interface with the same function has changed in Android 12. Therefore, it is necessary to abstract a general interface and the corresponding implementation class.

[0061] Based on the differences mentioned above, the embodiments of this application can construct an adapter module to improve the adaptability of the adapter module.

[0062] Among them, such as Figure 3 As shown, after completing the encapsulation of the program code for window services and the construction of the adapter module, it is also possible to perform differentiated compilation for different versions of the operating system, outputting different system artifacts for system adaptation.

[0063] Finally Figure 4 For example, the method provided in the embodiments of this application will be illustrated.

[0064] When the target window business is a small window application (corresponding to the aforementioned window business module), the functions supported by the small window application (corresponding to the small window's window business code package) may include, but are not limited to: pull-down hover function, small window control function, application event listening function, multi-tasking control function, refresh rate control function, screen casting listening and control function, etc. These functions are implemented by the small window application's program code.

[0065] System services for small window applications may include: window management service, window controller, and platform adapter (corresponding to the adapter module mentioned above).

[0066] Small window applications can use the Android Interface Definition Language (AIDL) to call system services.

[0067] The window management service may include: hover control and implementation service, window control and implementation service, multi-tasking control and implementation service, and other services such as other function extension services, in-vehicle entertainment restriction service, screen splitting service, application status distribution service, etc.

[0068] The window controllers can include mini window controllers, pin window controllers, and welt window controllers. Each type of controller can perform corresponding window information management, window state management, and window drawing management. A mini window can be a window with an area less than or equal to one-third of the full-screen window area. A pin window is a window that deviates from conventional window management rules and can be fixed in a specific position or state, such as a window used to display the image captured by the vehicle's right-side camera when the vehicle is turning right.

[0069] The platform adapter can include various general interfaces, such as WindowContainer, TaskDisplay Area, Float Window Info, and Task. The platform adapter can also include implementation classes corresponding to different versions of the operating system, such as Android11 ​​Adapter Impl, Android12 Adapter Impl, and Android16 Adapter Impl. There must be at least one implementation class for each different version.

[0070] For example, when the window control function of a small window application (corresponding to functions with general interfaces) is triggered, it can communicate with the corresponding window control and implementation service in the system service through the AIDL channel. This window control and implementation service can send the function implementation requirements to the corresponding window controller, such as the mini window controller, based on the window type. Then, the mini window controller calls the corresponding general interface in the platform adapter, which determines the current operating system version and calls the corresponding implementation class accordingly. If the current operating system version is Android 11, the corresponding implementation class in Android 11Adapter Impl is called, and this implementation class hooks into the Android Open Source Project (AOSP) (corresponding to the aforementioned operating system module) to call the corresponding window management interface in the Android Open Source Project to implement the window function.

[0071] Exemplary device Accordingly, this application also provides a window service implementation device, which is applied to smart terminal devices with screens such as smart cockpits, smartphones and tablets.

[0072] like Figure 5 As shown, the device may include: The determination module 501 is used to determine the target general interface in the adapter module corresponding to the target function when the target function of the target window service is triggered.

[0073] The adapter module includes at least one general interface, which is an interface abstracted from the target class window management interface in the operating system. The target class window management interface is an interface with differences in the target window business in different versions of the operating system.

[0074] The implementation module 502 is used to call the corresponding target window management interface in the current operating system version through the target general interface to implement the target function.

[0075] In some alternative embodiments, the target class window management interface is an interface used in different versions of the operating system to implement the same window function but with differences, or the target class window management interface is an interface added by one version of the operating system for new window functions of the target window business compared to other versions.

[0076] In some alternative embodiments, the program code corresponding to the target window service is encapsulated as a window service code package for implementing isolation from the operating system.

[0077] In some alternative embodiments, the implementation module 502 may include: The determining unit is used to determine the corresponding target implementation class through the target general interface in the adapter module.

[0078] The implementation unit is used to call the corresponding target window management interface through the target implementation class to implement the target function.

[0079] In some optional embodiments, where the target function is a window function that is not available in a lower version of the operating system compared to a higher version, and the current operating system version is a lower version, the determining unit may be specifically used to: determine the current operating system version through the target general interface in the adapter module; and determine the corresponding target implementation class based on the current operating system version and the target function; wherein the adapter module includes implementation classes for different versions of the operating system. The implementation unit may be specifically used to: implement the target function based on the parameters in the target implementation class used to implement the target function and the call to the target window management interface.

[0080] In some alternative embodiments, the adapter module is constructed based on target difference factors.

[0081] The target difference factors include at least one of the following: differences in the type of window management interface, differences in the name of window management interface, differences in the path of window management interface, differences in the names of system constants related to the implementation of the target window business, and differences in newly added window management interfaces.

[0082] In some alternative embodiments, the area of ​​the window displayed on the target screen via the target window service is smaller than the area of ​​the full-screen window displayed on the target screen.

[0083] The window service implementation apparatus provided in this embodiment belongs to the same application concept as the window service implementation method provided in the above embodiments of this application. It can execute the window service implementation method provided in any of the above embodiments of this application and has the corresponding functional modules and beneficial effects of the execution method. Technical details not described in detail in this embodiment can be found in the specific processing content of the window service implementation method provided in the above embodiments of this application, and will not be repeated here.

[0084] It should be understood that the modules in the above window service implementation device can be implemented in the form of processor calling software. For example, the device includes a processor connected to a memory that stores instructions. The processor calls the instructions stored in the memory to implement any of the above methods or to implement the functions of each unit of the device. The processor can be a general-purpose processor, such as a CPU or microprocessor, and the memory can be internal or external to the device. Alternatively, the units in the device can be implemented in the form of hardware circuits. By designing the hardware circuits, some or all of the unit functions can be implemented. The hardware circuit can be understood as one or more processors. For example, in one implementation, the hardware circuit is an ASIC, and the functions of some or all of the above units are implemented by designing the logical relationships of the components within the circuit. In another implementation, the hardware circuit can be implemented using a PLD, such as an FPGA, which can include a large number of logic gates. The connection relationships between the logic gates are configured through configuration files to implement the functions of some or all of the above units. All units of the above device can be implemented entirely through processor calling software, entirely through hardware circuits, or partially through processor calling software with the remaining parts implemented through hardware circuits.

[0085] In this application embodiment, a processor is a circuit with signal processing capabilities. In one implementation, the processor can be a circuit with instruction reading and execution capabilities, such as a CPU, microprocessor, GPU, or DSP. In another implementation, the processor can implement certain functions through the logical relationships of hardware circuits. These logical relationships are fixed or reconfigurable. For example, the processor may be a hardware circuit implemented as an ASIC or PLD, such as an FPGA. In a reconfigurable hardware circuit, the process of the processor loading a configuration document and configuring the hardware circuit can be understood as the processor loading instructions to implement the functions of some or all of the above units. Furthermore, it can also be a hardware circuit designed for artificial intelligence, which can be understood as an ASIC, such as an NPU, TPU, or DPU.

[0086] As can be seen, each unit in the above device can be one or more processors (or processing circuits) configured to implement the above methods, such as: CPU, GPU, NPU, TPU, DPU, microprocessor, DSP, ASIC, FPGA, or a combination of at least two of these processor forms.

[0087] Furthermore, the units in the above devices can be integrated in whole or in part, or they can be implemented independently. In one implementation, these units are integrated together and implemented in the form of a System-on-Chip (SoC). The SoC may include at least one processor for implementing any of the above methods or implementing the functions of the units in the device. The at least one processor may be of different types, such as CPU and FPGA, CPU and artificial intelligence processor, CPU and GPU, etc.

[0088] Exemplary electronic devices This application also provides an electronic device, such as... Figure 6 As shown, the electronic device includes a memory 600 and a processor 610.

[0089] The memory 600 is connected to the processor 610 and is used to store programs.

[0090] The processor 610 is used to implement the window service implementation method in the above embodiments by running the program stored in the memory 600.

[0091] Specifically, the aforementioned electronic device may also include: a communication interface 620, an input device 630, an output device 640, and a bus 650.

[0092] The processor 610, memory 600, communication interface 620, input device 630, and output device 640 are interconnected via a bus. Among them: Bus 650 may include a pathway for transmitting information between various components of a computer system.

[0093] The processor 610 can be a general-purpose processor, such as a general-purpose central processing unit (CPU), a microprocessor, etc., or an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of the program of the present invention. It can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0094] The processor 610 may include a main processor, as well as a baseband chip, modem, etc.

[0095] The memory 600 stores a program that executes the technical solution of this invention, and may also store an operating system and other key business functions. Specifically, the program may include program code, which includes computer operation instructions. More specifically, the memory 600 may include read-only memory (ROM), other types of static storage devices capable of storing static information and instructions, random access memory (RAM), other types of dynamic storage devices capable of storing information and instructions, disk storage, flash memory, etc.

[0096] Input device 630 may include a device for receiving user input data and information, such as a keyboard, mouse, camera, scanner, light pen, voice input device, touch screen, pedometer, or gravity sensor.

[0097] Output device 640 may include devices that allow information to be output to a user, such as a display screen, printer, speaker, etc.

[0098] The communication interface 620 may include a device that uses any transceiver to communicate with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), Wireless Local Area Network (WLAN), etc.

[0099] The processor 610 executes the program stored in the memory 600 and calls other devices, which can be used to implement the various steps in the window service implementation method provided in the above embodiments of this application.

[0100] Exemplary computer program products and storage media In addition to the methods and devices described above, embodiments of this application may also be computer program products, which include computer program instructions that, when executed by a processor, cause the processor to perform the steps in the window service implementation method described in the embodiments of this application.

[0101] The aforementioned computer program product can be implemented through hardware, software, or a combination thereof. In one optional embodiment, the computer program product is specifically embodied in a computer storage medium; in another optional embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.

[0102] The computer program product can be written in any combination of one or more programming languages ​​to perform the operations of the embodiments of this application. The programming languages ​​include object-oriented programming languages ​​such as Java and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0103] Furthermore, embodiments of this application may also be storage media storing a computer program, which is executed by a processor of the steps in the window service implementation method described in the embodiments of this application.

[0104] In addition, embodiments of this application may also be chips, which include processors and data interfaces. The processor reads instructions stored in the memory through the data interface to execute the steps in the window service implementation method described in the embodiments of this application.

[0105] For the foregoing method embodiments, in order to simplify the description, they are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, because according to this application, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0106] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For apparatus embodiments, since they are basically similar to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0107] The steps in the methods of the various embodiments of this application can be adjusted, merged, or deleted in order according to actual needs, and the technical features described in each embodiment can be replaced or combined.

[0108] The modules and sub-modules in the devices and terminals in the various embodiments of this application can be merged, divided, and deleted according to actual needs.

[0109] It should be understood that the disclosed terminals, devices, and methods can be implemented in other ways, given the several embodiments provided in this application. For example, the terminal embodiments described above are merely illustrative. For instance, the division of modules or sub-modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple sub-modules or modules may be combined or integrated into another module, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or modules, and may be electrical, mechanical, or other forms.

[0110] The modules or submodules described as separate components may or may not be physically separate. The components that constitute a module or submodule may or may not be physical modules or submodules; that is, they may be located in one place or distributed across multiple network modules or submodules. Some or all of the modules or submodules can be selected to achieve the purpose of this embodiment's solution, depending on actual needs.

[0111] Furthermore, the functional modules or sub-modules in the various embodiments of this application can be integrated into one processing module, or each module or sub-module can exist physically separately, or two or more modules or sub-modules can be integrated into one module. The integrated modules or sub-modules described above can be implemented in hardware or in the form of software functional modules or sub-modules.

[0112] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0113] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software unit executed by a processor, or a combination of both. The software unit can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0114] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

Claims

1. A method for implementing window services, characterized in that, The method includes: When the target function of the target window service is triggered, the target general interface corresponding to the target function in the adapter module is determined; wherein, the adapter module includes at least one general interface, the general interface is an interface abstracted from the target class window management interface in the operating system, and the target class window management interface is an interface that differs in different versions of the operating system regarding the target window service; The target function is achieved by calling the corresponding target window management interface in the current operating system version through the target general interface.

2. The window service implementation method according to claim 1, characterized in that, The target class window management interface is an interface used in different versions of the operating system to implement the same window function but with differences, or the target class window management interface is an interface added by one version of the operating system for new window functions of the target window business compared to other versions.

3. The window service implementation method according to claim 1, characterized in that, The method is executed by the program code corresponding to the target window service, and the program code corresponding to the target window service is encapsulated into a window service code package for implementing isolation from the operating system.

4. The window service implementation method according to claim 1, characterized in that, The step of calling the corresponding target window management interface in the current operating system version through the target general interface to implement the target function includes: The corresponding target implementation class is determined through the target generic interface in the adapter module; The target function is achieved by calling the corresponding target window management interface through the target implementation class.

5. The window service implementation method according to claim 4, characterized in that, When the target function is a window function that is not available in a lower version of the operating system compared to a higher version, and the current operating system version is a lower version, determining the corresponding target implementation class through the target general interface in the adapter module includes: The adapter module determines the current operating system version through the target generic interface; and determines the corresponding target implementation class based on the current operating system version and the target function; wherein the adapter module includes implementation classes for different versions of the operating system; The step of implementing the target function by calling the corresponding target window management interface through the target implementation class includes: The target function is achieved by using the parameters in the target implementation class to implement the target function and by calling the target window management interface.

6. The window service implementation method according to claim 1, characterized in that, The adapter module is constructed based on target difference factors; The target difference factors include at least one of the following: differences in the type of window management interface, differences in the name of window management interface, differences in the path of window management interface, differences in the names of system constants related to the implementation of the target window business, and differences in newly added window management interfaces.

7. The window service implementation method according to claim 1, characterized in that, The area of ​​the window displayed on the target screen through the target window service is smaller than the area of ​​the full-screen window displayed on the target screen.

8. A window service implementation device, characterized in that, The device includes: The determination module is used to determine the target general interface in the adapter module corresponding to the target function when the target function of the target window service is triggered; wherein, the adapter module includes at least one general interface, the general interface is an interface abstracted from the target class window management interface in the operating system, and the target class window management interface is an interface that differs in different versions of the operating system regarding the target window service; The implementation module is used to call the corresponding target window management interface in the current operating system version through the target general interface to implement the target function.

9. An electronic device, characterized in that, include: Memory and processor; The memory is connected to the processor and is used to store programs; The processor is used to implement the window service implementation method as described in any one of claims 1 to 7 by running the program in the memory.

10. A computer program product, characterized in that, The computer program product stores a computer program, which, when executed by a processor, implements the window service implementation method as described in any one of claims 1 to 7.

11. A storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the window service implementation method as described in any one of claims 1 to 7.