A screen rotation implementation method and system for a windows tablet
By obtaining the X, Y, and Z coordinate values of the accelerometer through EC firmware and modifying the EC RAM value, combined with the WinIO library and Socket transmission mode, the problem of poor compatibility and complex maintenance of the screen rotation function on Windows tablets under Win7 and WinXP systems is solved, and screen rotation control without device drivers is realized.
Patent Information
- Application Number
- CN202210806147.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-08
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2042-07-08
AI Technical Summary
In the existing technology, the screen rotation function of Windows tablet computers is not supported under WinXP and WIN7 systems, and the existing implementation methods have problems such as compatibility issues, complex development and maintenance, and high costs.
The EC firmware polls the X, Y, and Z coordinate values of the accelerometer, obtains the X, Y, and Z coordinate values of the accelerometer through the EC firmware, performs calculations using the WinIO library to determine whether the screen orientation has changed, modifies the EC RAM value at a specific location in the EC firmware, and the tablet service program reads the EC RAM value through the WinIO library and transmits it to the screen rotation application using the Socket transmission mode, calling the Windows system interface to realize screen rotation control.
It enables operation on Windows 7 and Windows XP systems without the need to install device drivers, avoids compatibility issues caused by hotkeys, reduces development and maintenance costs, and simplifies the development process.
Smart Images

Figure CN115167797B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of tablet rotation, in particular to a screen rotation implementation method and system for windows tablet. BACKGROUND
[0002] Rotation is a function of making Windows desktop automatically rotate according to the current position of the tablet. At present, Windows only supports the rotation function in win10, but winXP and WIN7 do not support the rotation function, so the rotation function needs to be implemented by itself. The existing method for implementing the rotation function is: obtaining the X, Y, Z coordinate values of the ACC sensor through the SMBUS bus, and calculating the current screen direction according to the XYZ values, and the EC implements the rotation function by sending a keyboard combination hot key to Windows. This method uses hot keys to achieve, and the hot keys are easy to repeat with the hot keys of other application software, resulting in that the EC sends the hot key and cannot implement the rotation function under certain application software running conditions; the hot key needs the support of the graphics card driver, and some manufacturers' latest graphics card driver does not support the hot key rotation function. Another method is that the EC obtains the X, Y, Z coordinate values of the ACC sensor through the SMBUS bus, and calculates the current screen direction according to the XYZ values. The EC polls the query command issued by the windows driver, and when the screen direction changes, the EC reports the new screen direction value to the windows driver. The windows driver notifies the upper application of the screen change message, and the upper application implements the rotation function. This method has the following problems: 1. Multiple versions of windows driver need to be developed to adapt to different operating systems: winXP, win7 32-bit and win7 64-bit, etc., and the development and maintenance workload is large; 2. Each time the driver is modified and released, it needs to pass the WHQL authentication of Microsoft, which is time-consuming and increases the cost; 3. The device driver runs in the kernel state, and the debugging and testing are difficult, and the compatibility and stability of the program are required higher for the device driver; in different software and hardware environments, the processing mode of the driver may need to be adjusted. If not handled properly, it is easy to cause system blue screen, freezing and other serious problems, which has a great impact on user experience. SUMMARY
[0003] In view of the above technical problems, the present application provides a screen rotation implementation method and system for windows tablet, which solves the technical problems of poor universality and complex maintenance cost in the prior art when implementing the rotation function of the tablet. It achieves the technical effect of saving development cost and simple maintenance by avoiding the compatibility problem caused by hot keys and directly adding a tablet service in the windows system without installing a device driver, without the need to open different versions for different operating systems.
[0004] In view of the above problems, the application provides a screen rotation implementation method and system for a windows tablet.
[0005] In the first aspect, the application provides a screen rotation implementation method for a windows tablet, which comprises: obtaining X, Y and Z coordinate values of an acceleration sensor by an EC firmware in a polling mode, and performing operation based on the X, Y and Z coordinate values of the acceleration sensor to determine whether a screen direction changes; when the screen direction changes, the EC firmware modifies an EC RAM value at a specific position; a tablet service program reads the EC RAM value in the EC firmware by a WinIO library, and determines screen direction change information according to the EC RAM value; the tablet service program transmits the screen direction change information to a screen rotation application by a Socket transmission mode, and the screen rotation application determines a screen rotation direction value according to the received Socket information, and calls a Windows system interface to implement screen rotation control.
[0006] Preferably, before obtaining the X, Y and Z coordinate values of the acceleration sensor by the EC firmware in the polling mode, the method comprises: downloading the WinIO library; creating the tablet service program based on the WinIO library; creating the screen rotation application based on the tablet service program; and packaging and storing the tablet service program, the screen rotation application and the WinIO library in the tablet.
[0007] Preferably, the Windows system interface is a standard API, which has a screen rotation interface function.
[0008] Preferably, the method is applied to a win7 or winXP system.
[0009] Preferably, before the tablet service program reads the EC RAM value in the EC firmware by the WinIO library, the method comprises: the tablet service program obtains a permission to read the EC RAM by the WinIO interface.
[0010] Preferably, the screen rotation application always remains in a Socket message listening state.
[0011] Preferably, the tablet service program reads the EC RAM value in the EC firmware by the WinIO library, and determines screen direction change information according to the EC RAM value, which comprises: the tablet service program determines whether the EC RAM value at a specific position changes according to the read EC RAM value; when the change occurs, the tablet service program determines a screen change direction according to the EC RAM value, and generates the screen direction change information. Preferably, the tablet service program reads the EC RAM value in the EC firmware by the WinIO library, and determines screen direction change information according to the EC RAM value, which comprises: the tablet service program determines whether the EC RAM value at a specific position changes according to the read EC RAM value; when the change occurs, the tablet service program determines a screen change direction according to the EC RAM value, and generates the screen direction change information.
[0012] In a second aspect, the application provides a system for implementing screen rotation on a Windows tablet, comprising: a position coordinate acquisition module, configured to acquire X, Y, Z coordinate values of an acceleration sensor by using a polling method via an EC firmware, and to determine whether a screen direction has changed based on the X, Y, Z coordinate values of the acceleration sensor; an EC RAM value modification module, configured to modify an EC RAM value at a specific position via the EC firmware when the screen direction has changed; a screen direction change determination module, configured to read the EC RAM value in the EC firmware via a WinIO library by a tablet service program, and to determine screen direction change information based on the EC RAM value; and a screen rotation control module, configured to transmit the screen direction change information to a screen rotation application via a Socket transmission mode by the tablet service program, and configured to determine a screen rotation direction value based on received Socket information by the screen rotation application, and to implement screen rotation control by calling a Windows system interface.
[0013] The one or more technical solutions provided in the application have at least the following technical effects or advantages:
[0014] The X, Y, Z coordinate values of the acceleration sensor are acquired by using a polling method via an EC firmware, and an operation is performed based on the X, Y, Z coordinate values of the acceleration sensor to determine whether a screen direction has changed; an EC RAM value at a specific position is modified via the EC firmware when the screen direction has changed; the EC RAM value in the EC firmware is read via a WinIO library by a tablet service program, and screen direction change information is determined based on the EC RAM value; and the screen direction change information is transmitted to a screen rotation application via a Socket transmission mode by the tablet service program, a screen rotation direction value is determined based on received Socket information by the screen rotation application, and screen rotation control is implemented by calling a Windows system interface. The screen rotation function is implemented by using a system interface of Windows itself, without the need to install a device driver, and the compatibility problem caused by hot keys is avoided. The tablet service program is added in a service addition tool under the Windows system, without the need to open different versions for different operating systems, which has the technical effect of saving development cost and being simple to maintain, thereby solving the technical problems of poor universality and complex maintenance and high cost in the prior art when implementing the screen rotation function of a tablet computer.
[0015] The above description is only a summary of the technical solutions of the application. In order to enable one skilled in the art to better understand the technical means of the application, the application can be implemented according to the content of the description, and in order to make the above and other purposes, features and advantages of the application more obvious and easy to understand, the following specific embodiments of the application are described. BRIEF DESCRIPTION OF DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the application or the prior art, the accompanying drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced. Obviously, the accompanying drawings in the following description are only exemplary and, for those skilled in the art, other drawings can be obtained without creative effort on the basis of the provided drawings.
[0017] Figure 1 A flowchart of a screen rotation implementation method for a windows tablet computer according to an embodiment of the application is shown.
[0018] Figure 2 A schematic diagram of a software design framework in a screen rotation implementation method for a windows tablet computer according to an embodiment of the application is shown.
[0019] Figure 3 A structural schematic diagram of a screen rotation implementation system for a windows tablet computer according to an embodiment of the application is shown. DETAILED DESCRIPTION
[0020] The application provides a screen rotation implementation method and system for a windows tablet computer, which solves the technical problem of poor universality and high maintenance cost in the prior art when implementing the screen rotation function of a tablet computer.
[0021] In the technical solution of the application, the acquisition, storage, use, processing, etc. of data comply with the relevant provisions of national laws and regulations.
[0022] The technical solutions in the application will be described clearly and completely below with reference to the accompanying drawings. Obviously, the described embodiments are only some of the embodiments of the application, not all embodiments of the application. It should be understood that the application is not limited by the exemplary embodiments described herein. Based on the embodiments of the application, all other embodiments obtained by those skilled in the art without creative effort fall within the scope of the application. In addition, it should be noted that, for convenience of description, only parts related to the application are shown in the drawings, not all parts.
[0023] Embodiment one
[0024] As shown in the drawings, the application provides a screen rotation implementation method for a windows tablet computer, which comprises: Figure 1
[0025] S1: obtaining the X, Y, Z coordinate values of the acceleration sensor by the EC firmware using a polling method, and performing an operation based on the X, Y, Z coordinate values of the acceleration sensor to determine whether the screen direction has changed.
[0026] Further, before the EC firmware obtains the X, Y, Z position values of the acceleration sensor by polling, the method comprises: downloading the WinIO library; creating the tablet service program based on the WinIO library; creating the screen rotation application based on the tablet service program; and packaging and storing the tablet service program, the screen rotation application and the WinIO library in the tablet computer.
[0027] Further, the method is applied to a win7 or winXP system.
[0028] Specifically, the WinIO library matched with the windows system is downloaded, and the permission of reading and writing the EC RAM is obtained through the interface in the WinIO library, wherein the EC is an embedded controller embedded in the tablet computer, and is connected with the CPU processor through the LPC interface to control the power supply, keyboard, battery and other key components of the system. The windows system provides the function OEM of adding services for developers, and the tablet service program is created based on the WinIO library. Since the tablet service program is added in the service function of the system itself, the effect of strong compatibility is achieved, different versions do not need to be developed for different operating systems, the effect of simple development and maintenance is achieved, and the coordinate value of the acceleration sensor ACCsensor is obtained through the SMBUS bus in the prior art. Therefore, multiple versions of the windows driver need to be developed to adapt to different operating systems, such as winXP for 32 bits and win7 for 64 bits, and the development and maintenance workload is large. Moreover, each modification and release of the driver needs to be authenticated by the WHQL of Microsoft, which is time-consuming and increases the cost. The device driver runs in the kernel state, and the debugging and testing are difficult, and the compatibility and stability of the program are required to be higher by the device driver. The processing mode of the driver needs to be adjusted in different software and hardware environments. If the processing is not proper, the system may be blue-screened or deadlocked, which greatly affects the user experience.
[0029] On the basis of the tablet service, the screen rotation application is created, the tablet service program, the screen rotation application and the WinIO library are packaged and installed in the tablet computer, and the screen rotation operation is realized by using the interface of the windows system itself.
[0030] Please refer to Figure 2 The software design framework of the embodiment of the application is divided into three layers, namely, an application layer, a system layer and a hardware layer, wherein the application layer comprises a tablet service program and a screen rotation application, the system layer comprises a WinIO interface library and a windows system interface, and the hardware layer comprises an EC FW, i.e., an EC firmware.
[0031] EC FW obtains the X, Y, Z coordinate values of the acceleration sensor through polling, and modifies the EC RAM value of a specific position when the EC calculates that the direction of the screen changes, so as to be acquired by the tablet service. The specific position corresponds to the direction of the screen change, and the direction of the screen change is determined by modifying the position of the screen change coordinate value in the EC RAM.
[0032] S2: When the direction of the screen changes, the EC firmware modifies the EC RAM value of a specific position.
[0033] S3: The tablet service program reads the EC RAM value in the EC firmware through the WinIO library, and determines the screen direction change information according to the EC RAM value.
[0034] Further, before the tablet service program reads the EC RAM value in the EC firmware through the WinIO library, the tablet service program includes: the tablet service program acquires the permission of reading the EC RAM through the WinIO interface.
[0035] Further, the tablet service program reads the EC RAM value in the EC firmware through the WinIO library, and determines the screen direction change information according to the EC RAM value, including: the tablet service program determines whether the EC RAM value of a specific position changes according to the read EC RAM value; when the change occurs, the tablet service program determines the screen change direction according to the EC RAM value, and generates the screen direction change information.
[0036] Specifically, the tablet service program acquires the permission of reading the EC RAM value through the interface in the WinIO library, reads the EC RAM value in the EC firmware through the WinIO interface, determines the direction of the screen change according to the EC RAM value when the EC RAM value of a specific position changes, and generates the screen direction change information, that is, the screen change direction value. That is, when the EC obtains the new screen direction, the direction value is directly written into the EC RAM, which can be acquired by the upper application in the manner that the tablet service program acquires the screen direction value through the call of the winIO library to realize the screen switching function.
[0037] S4: The tablet service program transmits the screen direction change information to the screen switching application by using the Socket transmission mode, and the screen switching application determines the screen switching direction value according to the received Socket information, and calls the Windows system interface to realize the screen switching control.
[0038] Further, the screen switching application always maintains in the Socket message listening state.
[0039] Further, the Windows system interface is a standard API, which has a screen rotation interface function.
[0040] Specifically, without changing the hardware circuit design, the function of obtaining the screen direction is realized under win7 and winXP by accessing the EC RAM through the windows system service. The screen rotation interface function exists in the Windows standard API (application programming interface), and the screen rotation function of the tablet computer is realized by calling the standard API of the windows system itself.
[0041] The screen rotation application always keeps in the socket listening state. When the socket message sent by the server, i.e., the tablet service program, is received, the screen rotation application determines the new direction value of the screen according to the received socket message, and realizes the screen rotation function by calling the Windows API system interface. The socket message transmission mode is to agree on the values and corresponding information content in advance, such as customizing 0, 1, 2, 0 for rotating 90 degrees to the right, 1 for rotating 180 degrees to the left, etc. According to the received screen change direction value, the socket message is converted and transmitted to the screen rotation application. The screen rotation application analyzes the direction value according to the agreed value, and realizes the screen rotation function through the screen rotation interface function in the API interface. The screen rotation function is realized by using the interface of the windows itself without installing the device driver, which avoids the compatibility problem caused by the hot key, directly adds the tablet service in the windows system, and does not need to develop different versions for different operating systems, which has the technical effects of saving the development cost and simple maintenance. Thus, the technical problems of poor universality and complex maintenance and high cost in the prior art are solved.
[0042] In summary, the embodiment of the present application has the following beneficial effects:
[0043] 1. The screen rotation function of the tablet computer is realized on win7 and winXP, and does not need to install the device driver.
[0044] 2. The tablet service does not need to develop different versions for different operating systems, and the development and maintenance are simple.
[0045] 3. The screen direction value is obtained by calling the winIO through the tablet service program, and the screen rotation function is realized through the system interface, which avoids the compatibility problem caused by the hot key of the EC.
[0046] Embodiment Two
[0047] Based on the same inventive concept as the screen rotation implementation method of the tablet computer under the Windows in the foregoing embodiment, such as Figure 3As shown, the application also provides a screen rotation implementation system for a windows tablet, which comprises:
[0048] a position coordinate acquisition module, configured to acquire X, Y, Z coordinate values of an acceleration sensor by using a polling mode by EC firmware, and to determine whether a screen direction changes based on operations on the X, Y, Z coordinate values of the acceleration sensor;
[0049] an EC RAM value modification module, configured to modify EC RAM values of specific positions by EC firmware when the screen direction changes;
[0050] a screen direction change determination module, configured to read the EC RAM values in the EC firmware by a tablet service program through a WinIO library, and to determine screen direction change information based on the EC RAM values;
[0051] a screen rotation control module, configured to transmit the screen direction change information to a screen rotation application by the tablet service program through a Socket transmission mode, and to determine a screen rotation direction value by the screen rotation application based on received Socket information, and to call a Windows system interface to implement screen rotation control.
[0052] Further, the system further comprises:
[0053] a downloading unit, configured to download the WinIO library;
[0054] a service creation unit, configured to create the tablet service program based on the WinIO library;
[0055] a screen rotation application creation unit, configured to create the screen rotation application based on the tablet service program;
[0056] a packaging and installation unit, configured to package and store the tablet service program, the screen rotation application and the WinIO library in a tablet computer.
[0057] Further, the system further comprises:
[0058] a system interface determination unit, configured to select the Windows system interface as a standard API, which has a screen rotation interface function.
[0059] Further, the system is applied to a win7 or winXP system.
[0060] Further, the system further comprises:
[0061] a permission unit, configured to acquire the permission of reading the EC RAM by the tablet service program through the WinIO interface.
[0062] Further, the system further comprises:
[0063] A state setting unit is configured to keep the screen switching application in a socket message listening state at all times.
[0064] Further, the system further comprises:
[0065] A judging unit is configured to judge whether the ECRAM value at a specific position changes according to the read ECRAM value by the tablet service program.
[0066] A screen change determining unit is configured to determine the screen change direction according to the ECRAM value by the tablet service program when the change occurs, and generate the screen direction change information.
[0067] The screen rotation implementation method and the specific example in the foregoing embodiment one are also applicable to the screen rotation implementation system of a windows tablet computer in the embodiment, and through the foregoing detailed description of the screen rotation implementation method of a windows tablet computer, those skilled in the art can clearly know the screen rotation implementation system of a windows tablet computer in the embodiment, so as to avoid the description of the screen rotation implementation system of a windows tablet computer in the embodiment.
[0068] The above description of the disclosed embodiments enables a person skilled in the art to implement or use the present application. Various modifications to the embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for implementing screen rotation on a Windows tablet computer, characterized in that, The method includes: The X, Y, and Z coordinate values of the accelerometer are obtained by polling through the EC firmware, and calculations are performed based on the X, Y, and Z coordinate values of the accelerometer to determine whether the screen orientation has changed. When the screen orientation changes, the EC firmware modifies the EC RAM value at a specific location; The tablet service program reads the EC RAM value in the EC firmware through the WinIO library and determines the screen orientation change information based on the EC RAM value; The tablet service program transmits the screen orientation change information to the screen rotation application using the Socket transmission mode. The screen rotation application determines the screen rotation orientation value based on the received Socket information and calls the Windows system interface to implement screen rotation control. The tablet service program reads the EC RAM value from the EC firmware using the WinIO library and determines the screen orientation change information based on the EC RAM value, including: The tablet service program determines whether the EC RAM value at a specific location has changed based on the read EC RAM value. When a change occurs, the tablet service program determines the screen change direction based on the EC RAM value and generates the screen direction change information.
2. The method as described in claim 1, characterized in that, Before obtaining the X, Y, and Z position values of the accelerometer via polling using the EC firmware, the method includes: Download the WinIO library; The tablet service program is created based on the WinIO library; The screen-switching application is created based on the tablet service program; The tablet service program, the screen-switching application, and the WinIO library are packaged and stored on the tablet computer.
3. The method as described in claim 1, characterized in that, The Windows system interface is a standard API, which includes screen rotation interface functions.
4. The method as described in claim 1, characterized in that, The method is applicable to Windows 7 or Windows XP systems.
5. The method as described in claim 1, characterized in that, Before the tablet service program reads the ECRAM value from the EC firmware through the WinIO library, it includes: The tablet service program obtains permission to read EC RAM through the WinIO interface.
6. The method as described in claim 1, characterized in that, The screen-switching application remains in a Socket message listening state at all times.
7. A screen rotation system for Windows tablet computers, characterized in that, The system includes: The position coordinate acquisition module is used to obtain the X, Y, and Z coordinate values of the accelerometer through the EC firmware using a polling method, and to perform calculations based on the X, Y, and Z coordinate values of the accelerometer to determine whether the screen orientation has changed. The EC RAM value modification module is used to modify the EC RAM value at a specific location in the EC firmware when the screen orientation changes. The screen orientation change determination module is used by the tablet service program to read the EC RAM value in the EC firmware through the WinIO library and determine the screen orientation change information based on the EC RAM value. The screen rotation control module is used by the tablet service program to transmit the screen orientation change information to the screen rotation application using the Socket transmission mode. The screen rotation application determines the screen rotation orientation value based on the received Socket information and calls the Windows system interface to implement screen rotation control. The judgment unit is used by the tablet service program to determine whether the EC RAM value at a specific location has changed based on the read EC RAM value; A screen change determination unit is used to determine the screen change direction based on the EC RAM value when a change occurs, and to generate the screen direction change information.
Citation Information
Patent Citations
Method and system for implementation of virtual input equipment in driving layer
CN102854974A
Method and device for automatically rotating screen image based on feiteng processor and all-in-one machine
CN107943371A
Interface display method and electronic equipment
CN114500732A