Graphics control method, device, terminal equipment and readable storage medium

By dynamically adjusting the display and control ratio, the problem of inconsistent attenuation speed of the display and control ratio when operating different graphics with two-finger pinch is solved, providing a unified operation experience and clear prompt effect, which is suitable for graphic enlargement and reduction operations of terminal devices.

CN113849104BActive Publication Date: 2024-11-15HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010600422.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-28
Publication Date
2024-11-15
Estimated Expiration
2040-06-28

AI Technical Summary

Technical Problem

When the two-finger pinch operation is used for different graphics, the attenuation speed of the display control ratio is not uniform, which indicates that the effect is not good.

Method used

By determining the second display control ratio based on the magnification of the graphics and the target magnification, dynamically adjusting the display control ratio so that its attenuation function matches the graphics with different resolutions, providing clear and clear feedback and prompts for the progress of control operation.

Benefits of technology

After the magnification ratio of graphics with different resolutions exceeds the target magnification, the attenuation speed of the display control ratio is unified, improving the user's operation experience and prompt effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113849104B_ABST
    Figure CN113849104B_ABST
Patent Text Reader

Abstract

The present application is applicable to the field of terminal control technology, and provides a graphic control method, device, terminal equipment and readable storage medium. The graphic control method includes: responding to a zoom operation, zooming in the graphic according to a preset first display control ratio. When the magnification of the graphic is greater than the target magnification, the second display control ratio is determined according to the magnification of the graphic and the target magnification. Continue to zoom in the graphic according to the second display control ratio. Since the display control ratio is determined according to the magnification of the graphic and the target magnification, and the target magnification is related to the display resolution of the screen and the graphic resolution of the graphic. Therefore, zooming in the graphic according to the second display control ratio can adapt to graphics of different resolutions, so that when zooming in graphics of different resolutions, after the magnification is greater than the target magnification, it has a uniform display control ratio attenuation speed. The effect of prompting the user that the magnification of the graphic exceeds the target magnification is more obvious, giving the user clear and unambiguous feedback and prompts.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal control technology, and in particular to a graphics control method, apparatus, terminal device and readable storage medium. Background Art

[0002] The two-finger pinch operation is widely used in various terminal devices to control the zooming in and out of graphics. For example, on a mobile phone, you can zoom in on a graphic by pinching two fingers away from each other, or zoom out by pinching two fingers together. After zooming in on a graphic to the maximum magnification supported by the system (i.e., the maximum magnification after leaving the hands), if you continue to pinch the two fingers, the graphic can continue to be zoomed in to the maximum magnification of the two-finger pinch operation. After the two-finger pinch operation is terminated and the two fingers leave the screen, the graphic will be reduced from the size of the graphic when it leaves the hands to the maximum magnification supported by the system.

[0003] In the prior art, after the magnification factor of a two-finger pinch operation exceeds the maximum magnification factor supported by the system, the display-control ratio of the two-finger pinch operation continuously decays until further magnification is impossible (i.e., the display-control ratio decays to 0), prompting the user that the current magnification factor exceeds the maximum magnification factor supported by the system.

[0004] However, when two-finger pinching is used to operate different graphics, the maximum magnification of the two-finger pinching operation and the maximum magnification supported by the system are different due to the different resolutions of the graphics. When the display control ratio is attenuated, the display control ratio attenuation speed of each graphic is not uniform, resulting in poor prompt effect. Summary of the invention

[0005] The embodiments of the present application provide a graphics control method, apparatus, terminal device and readable storage medium, which can solve the problem that when operating different graphics with a two-finger pinch operation, the display control ratio attenuation speed of each graphic is not uniform due to the different resolutions of the graphics, resulting in poor prompt effect.

[0006] In a first aspect, an embodiment of the present application provides a graphics control method, which is applied to a terminal device, and a graphics is displayed on a screen of the terminal device. The terminal device may be a smart phone, a smart watch, a tablet computer, a laptop computer, a desktop computer, or other device that can display graphics and control the scaling of graphics. The method includes:

[0007] In response to the zoom operation, the graphic is zoomed in according to a preset first display control ratio. The display control ratio is used to indicate the ratio of the zoom factor of the graphic to the zoom operation control parameter. When the zoom factor of the graphic is greater than the target zoom factor, a second display control ratio is determined according to the zoom factor of the graphic and the target zoom factor, wherein the target zoom factor is determined according to the display resolution of the screen and the graphic resolution of the graphic. The graphic is continued to be zoomed in according to the second display control ratio.

[0008] Among them, the graphic can be a resizable image object such as a picture, a web page, a zoomable application interface (such as a map in a map application). The display-control ratio refers to the ratio of the graphic magnification to the control parameter of the zoom operation when a touch operation is performed. For example, when a graphic is zoomed in by a pinch operation with two fingers away, the display-control ratio is the ratio of the graphic magnification to the distance between the two fingers in contact with the touch screen in the pinch operation. The target magnification refers to the maximum magnification that can be magnified after the zoom operation is performed and the hand is released. For example, when the graphic is displayed at the screen resolution, the magnification of the graphic is 1 times. If the graphic can be magnified 5 times after the zoom operation is performed and the hand is released, the target magnification is 5 times.

[0009] In this embodiment, in response to the zoom operation, when the graphics are enlarged with a preset display control ratio and the magnification of the graphics is greater than the target magnification, the second display control ratio is determined according to the magnification of the graphics and the target magnification. And the graphics are enlarged according to the second display control ratio. Since the second display control ratio is determined according to the magnification of the graphics and the target magnification, and the target magnification is related to the display resolution of the screen and the graphic resolution of the graphics. Therefore, by enlarging the graphics with the second display control ratio, graphics of different resolutions can be adapted, so that when graphics of different resolutions are enlarged, after the magnification is greater than the target magnification, the attenuation function is unified, and there is a unified display control ratio attenuation speed. The effect of prompting the user that the magnification of the graphics exceeds the target magnification is more obvious, giving the user clear and clear feedback and prompts on the progress of the control operation.

[0010] In some implementations, the target magnification factor is related to the display resolution of the screen and the graphic resolution of the graphic, including: the target magnification factor is linearly related to the ratio of the display resolution to the graphic resolution.

[0011] In some implementations, the target magnification is linearly related to the ratio of the display resolution to the graphic resolution, including: multiplying the ratio of the display resolution to the graphic resolution by a first preset coefficient and then adding a second preset coefficient to obtain the target magnification.

[0012] In some embodiments, determining the second display control ratio based on the magnification of the graphic and the target magnification includes: calculating and obtaining the second display control ratio based on the magnification of the graphic, the target magnification and the maximum magnification, wherein the maximum magnification is the maximum magnification that can be achieved when the graphic is magnified by the zoom operation.

[0013] In some implementations, the second display control ratio is calculated based on the magnification of the graphic, the target magnification, and the maximum magnification, including: according to the formula Calculate the second display control ratio. Where Gain(s) is the second display control ratio, s is the magnification of the graph, Scale offTarget magnification, Scale pinch is the maximum magnification, λ is the third preset coefficient, and the third preset coefficient is linearly related to the target magnification.

[0014] In some implementations, when a graphic is enlarged in response to a zoom-in operation, it includes: providing a prompt when the magnification of the graphic is equal to the target magnification, and / or when the magnification of the graphic is equal to the maximum magnification.

[0015] In a second aspect, an embodiment of the present application provides a graphic control device, which is applied to a terminal device, and a graphic is displayed on the screen of the terminal device, including: a response module, which is used to respond to a zoom operation and zoom in on the graphic according to a preset first display control ratio. The display control ratio is used to indicate the ratio of the magnification of the graphic to the control parameter of the zoom operation. A determination module is used to determine a second display control ratio according to the magnification of the graphic and the target magnification when the magnification of the graphic is greater than the target magnification, wherein the target magnification is determined according to the display resolution of the screen and the graphic resolution of the graphic. The response module is also used to continue to zoom in on the graphic according to the second display control ratio.

[0016] In some implementations, the target magnification factor is related to the display resolution of the screen and the graphic resolution of the graphic, including: the target magnification factor is linearly related to the ratio of the display resolution to the graphic resolution.

[0017] In some implementations, the target magnification is linearly related to the ratio of the display resolution to the graphic resolution, including: multiplying the ratio of the display resolution to the graphic resolution by a first preset coefficient and then adding a second preset coefficient to obtain the target magnification.

[0018] In some implementations, the determination module is specifically configured to calculate and obtain the second display control ratio according to the magnification of the graphic, the target magnification and the maximum magnification, wherein the maximum magnification is the maximum magnification that can be achieved when the graphic is magnified by the magnification operation.

[0019] In some implementations, the determination module is specifically configured to determine the Calculate the second display control ratio. Where Gain(s) is the second display control ratio, s is the magnification of the graph, Scale off Target magnification, Scale pinch is the maximum magnification, λ is the third preset coefficient, and the third preset coefficient is linearly related to the target magnification.

[0020] In some implementations, the device further includes a prompt module for providing a prompt when the magnification of the graphic is equal to the target magnification and / or the magnification of the graphic is equal to the maximum magnification.

[0021] In a third aspect, an embodiment of the present application provides a terminal device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method provided in the first aspect when executing the computer program.

[0022] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the method provided in the first aspect is implemented.

[0023] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed on a terminal device, enables the terminal device to execute the method provided in the first aspect.

[0024] In a sixth aspect, an embodiment of the present application provides a chip system, the chip system comprising a memory and a processor, the processor executing a computer program stored in the memory to implement the method provided in the first aspect.

[0025] In the seventh aspect, an embodiment of the present application provides a chip system, which includes a processor, the processor is coupled to the computer-readable storage medium provided in the fourth aspect, and the processor executes a computer program stored in the computer-readable storage medium to implement the method provided in the first aspect.

[0026] It can be understood that the beneficial effects of the second to seventh aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 A schematic diagram of a hardware structure diagram of a terminal device provided in an embodiment of the present application;

[0028] Figure 2 A schematic diagram of an application scenario of a graphics control method provided in an embodiment of the present application;

[0029] Figure 3 A schematic diagram of an application scenario of a graphics control method provided by another embodiment of the present application;

[0030] Figure 4 A flowchart of a graphics control method provided in one embodiment of the present application;

[0031] Figure 5 Schematic diagram of the display-control ratio attenuation function in the graphics control method provided in one embodiment of the present application

[0032] Figure 6 A schematic diagram of enlarging a graphic to a target magnification in a graphic control method provided in an embodiment of the present application;

[0033] Figure 7A schematic diagram of continuing to magnify a graphic after the magnification factor of the graphic is greater than the target magnification factor in a graphic control method provided in an embodiment of the present application;

[0034] Figure 8 A schematic diagram of the structure of a graphics control device provided in one embodiment of the present application;

[0035] Fig. 9 A schematic diagram of the structure of a graphics control device provided in another embodiment of the present application;

[0036] Fig.10 A schematic diagram of the structure of a terminal device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0037] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0038] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0039] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0040] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting" depending on the context.

[0041] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. appearing in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways.

[0042] The graphics control method provided in the embodiment of the present application is applied to a terminal device that can display graphics and control the scaling of graphics, such as a smart phone, a smart watch, a tablet computer, a laptop computer, a desktop computer, etc.

[0043] Figure 1 A hardware structure diagram of a terminal device is shown.

[0044] like Figure 1 As shown, the terminal device includes: a processor 110, a vibration motor 111, a button 112, an audio module 120, a screen 130, a camera module 140, a storage module 150, an interface 160, a power module 170, a sensor module 180, a communication module 190 and other components. Those skilled in the art can understand that Figure 1 The terminal device structure shown in the figure does not constitute a limitation on the terminal device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0045] Combine the following Figure 1 The following is a detailed introduction to the components and modules of the terminal equipment:

[0046] The processor 110 is the control center of the terminal device. It can use various interfaces and lines to connect various parts of the terminal device, and execute various functions of the terminal device and process data by running or executing software programs and / or modules stored in the storage module 150, and calling data stored in the storage module 150, thereby reminding people to make calls.

[0047] In some implementations, the processor 110 may include one or more processing units, such as a central processing unit (CPU), or a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0048] In some other implementations, the processor 110 may integrate an application processor and a modem processor. The application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 110, and this application does not limit this.

[0049] The vibration motor 111 may vibrate upon receiving a signal, thereby providing a reminder in the form of vibration.

[0050] The input module 112 may be used to receive input information and key signals. The input information includes digital or character information, touch information, etc. The key signals include pressing signals of physical keys, pressing signals of virtual keys, etc.

[0051] In one embodiment, the input module 112 may include a touch panel and other input devices. The touch panel and the screen 130 may form a touch screen, and the touch panel may collect the user's touch operation on or near it (such as the user using a finger, a stylus, etc. that can generate a touch signal on the touch panel or an accessory on the touch panel or near the touch screen), and execute the corresponding function according to a pre-set program drive. Optionally, the touch panel may include a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller. The touch controller receives the touch information from the touch detection device, converts it into the contact coordinates, and then sends it to the processor 110. The processor 180 receives the contact coordinates sent, converts it into a touch command and executes it. The touch panel can be implemented using various types such as resistive, capacitive, infrared and surface acoustic waves. Other input devices may include but are not limited to one or more of a physical keyboard, a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick.

[0052] The audio module 120 is used to process audio signals. For example, the audio module 120 can convert the analog audio signal received by the microphone 123 into digital audio data and send it to the processor 110. Alternatively, the digital audio data sent by the processor 110 is converted into an analog signal that can be played by the speaker 121 and the receiver 122 and sent to the speaker 121 or the receiver 122.

[0053] The screen 130 is used to display the content output by the terminal device through visual output. For example, it can display information input by the user, display information provided to the user, display the system interface of the terminal device, and the interface of the application running on the terminal device. The material of the display panel of the screen 130 can be a liquid crystal display (LCD), a thin film transistor (TFT), a light-emitting semiconductor (LED), an organic light-emitting semiconductor (OLED), etc., which is not limited here.

[0054] In some embodiments, the touch panel may be overlaid on the display panel of the screen. When the touch panel detects a touch operation on or near it, it transmits it to the processor 110 to determine the type of touch event. Then the processor 110 provides corresponding visual output on the display panel according to the type of touch event. Figure 1 The screen and the touch panel (not shown) are two independent components to realize the input and output functions of the mobile phone, but in some embodiments, the touch panel can be integrated with the display panel to realize the input and output functions of the mobile phone. Among them, when the touch panel is integrated with the screen, it can be used as a touch screen, and the touch screen can receive the touch signal on the touch panel and feed it back to the processor 110. The processor 110 responds according to the touch signal and displays the result of the response through the display panel of the screen.

[0055] The camera module 140 includes at least one camera, which may be a front camera 141 or a rear camera 142 .

[0056] Just as an example, the terminal device can be a single camera, a dual camera, a triple camera, or a quad camera. For example, in the case of quad cameras, one camera is a front camera 141, and three are rear cameras 142. The three rear cameras 142 can be cameras with different focal lengths. For example, a main camera with an equivalent focal length of 35 mm, a wide-angle camera with an equivalent focal length of 20 mm, and a telephoto camera with an equivalent focal length of 105 mm. This embodiment of the present application is not limited to this.

[0057] It should be noted that when the terminal device includes multiple cameras, these multiple cameras can all be front-mounted, or all be rear-mounted, or some can be front-mounted and others can be rear-mounted, and this is not limited to the embodiments of the present application.

[0058] The storage module 150 includes an internal memory 151 and an external memory interface 152. The internal memory 151 may be a flash memory, a hard disk, a computing memory, etc. For example, the internal memory may include at least one hard disk or flash memory and one computing memory. The external memory interface 152 is used to connect to an external memory, and the external memory may include a memory card, a mobile hard disk, a USB flash drive, an optical disk, etc.

[0059] The storage module 150 can be used to store software programs and modules. The processor 110 executes various functional applications and data processing of the terminal device by running the software programs and modules stored in the storage module 150. The storage module 150 may mainly include a program storage area and a data storage area. Among them, the program storage area is usually located on the internal memory 151, and can store an operating system and at least one application required for a function (such as a sound playback function, a touch response function). The data storage area can be located on the internal memory 151, or on an external memory connected to the external memory interface 152, or on both the internal memory and the external memory. The data storage area can store data (such as audio data, image data, video data) created according to the use of the mobile phone.

[0060] The interface 160 includes but is not limited to a Subscriber Identity Module (SIM) card interface 161, a USB interface 162, and an earphone interface 163. The SIM card interface is used to insert a SIM card provided by an operator, so that when the terminal device communicates with a base station through the mobile communication module 191, it can identify and verify the user's identity, and after verification, send call requests and data requests to the base station, and receive calls, data, and text messages forwarded by the base station.

[0061] The USB interface 162 can connect the terminal device to the computer through a USB data cable to exchange data. At the same time, the USB interface 162 is also connected to the power module 170. When the USB data cable is connected to the computer or the charging socket, the input power can be transmitted to the power module 170 to charge the terminal device. Among them, the USB interface 162 can be micro-USB, mini-USB, USB Type-c, etc., which are not limited here.

[0062] The headphone jack 163 is used to connect the headphone. The headphone jack 163 can be an independent interface, for example, the headphone jack 163 can be a 3.5mm headphone jack. Alternatively, the headphone jack 163 can also be integrated in the USB interface 162, for example, the headphone jack can be integrated in the USB Type-c. When a headphone is inserted into the headphone jack 163, the audio module 120 can no longer send the output analog audio signal to the speaker 121 or the receiver 122, but send it to the headphone through the headphone jack 163, and play the audio through the headphone. When the headphone is inserted, if it is detected that the headphone does not include a microphone, the audio module still receives the analog audio signal sent by the microphone 123. If it is detected that the headphone includes a microphone, the audio module receives the analog audio signal sent by the headphone microphone, processes it and sends it to the processor 110.

[0063] The terminal device also includes a power module 170 for supplying power to various components. The power module may include a battery, a power management module, etc. The power management module may be logically connected to the processor 110, so that the power management module can realize functions such as managing the charging, discharging, and power consumption management of the battery.

[0064] The terminal device may also include a sensor module 180. The sensor module includes at least one sensor, such as a pressure sensor 181, a gyroscope sensor 182, a distance sensor 183, a proximity light sensor 184, a touch sensor 185 or an acceleration sensor 186. Among them, the proximity light sensor 184 may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 141 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel and / or backlight of the screen 130 when the mobile phone is moved to the ear. As a kind of motion sensor, the acceleration sensor 186 can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary, which can be used to identify the posture of the terminal device (such as picking up or putting down the terminal device, placing the terminal device horizontally or vertically, etc.). It can also be used to identify related actions (such as step counting, tapping) through vibration. Other sensors of the terminal device are not described here.

[0065] The communication module 190 includes a mobile communication module 191 and a wireless communication module 192. The mobile communication module 191 can support any communication standard or protocol, including but not limited to Global System of Mobilecommunication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), Time-Division WCDMA (TD-WCDMA), Time-Division LTE (TD-LTE), the 5th generation New Radio (5G NR), etc. The wireless communication module 192 can support Bluetooth, Wireless Fidelity (Wi-Fi), Near Field Communication (NFC), etc.

[0066] The mobile communication module 191 can be used to connect to a communication base station through an antenna to establish a call link between the terminal device and other terminal devices and receive call audio. The wireless communication module 192 is used to wirelessly connect to an external call device, where the external call device can be an external device with playback and reception functions such as a Bluetooth headset and a Bluetooth speaker. When the external call device is connected to the terminal device through the wireless communication module 192, audio can be played through the external call device, and the analog audio signal collected by the external call device can be received, processed and sent to the processor 110.

[0067] During the operation of the terminal device, the screen 130 can display graphics, and the touch panel is used to receive the user's zoom operation (such as a pinch operation with two fingers apart) and send the operation to the processor 110. The processor 110 can implement the graphics control method provided in the present application by running the software program stored in the storage module 150.

[0068] Figure 2 and Figure 3 An application scenario of the graphics control method provided by the present application is respectively shown.

[0069] Figure 2 The scenario in which the terminal device is a smartphone is shown. In this scenario, a graphic is displayed on the touch screen of the smartphone. The graphic can be a picture, a web page, a scalable application interface (such as a map in a map application), or other image objects that can be resized. The specific type is not limited here. Figure 2 The graphics in the figure are explained using pictures as examples.

[0070] Reference Figure 2 , the smartphone can respond to the user's two-finger pinch operation to zoom in and out on the picture displayed on the touch screen. The two-finger pinch operation is a touch gesture that controls the image by changing the distance between two fingers on the touch medium (such as the touch screen). The zoom-in operation can be achieved by increasing the distance between the two fingers, and the zoom-out operation can be achieved by reducing the distance between the two fingers. For example, Figure 2 The user's thumb and index finger touch the touch screen, and the smartphone detects the two touch points and the distance between the touch points. When the thumb and index finger move in opposite directions, the distance between the thumb and index finger increases, and the distance between the two detected touch points also increases accordingly. The smartphone zooms in on the image based on the increased distance and the preset display-control ratio.

[0071] The display-control ratio refers to the ratio of the image magnification to the control parameter of the magnification operation when performing a touch operation. Figure 2 When you zoom in on a graphic by pinching your fingers together, the display-control ratio is the ratio of the graphic's magnification to the increased distance between the two touch points.

[0072] Figure 3 The scenario in which the terminal device is a laptop computer is shown. In this scenario, a graphic is displayed on the screen. The laptop computer scales the graphic on the screen in response to a two-finger pinch operation on the touchpad. The graphic type and scaling principle are similar to Figure 1 It is similar to the above, so I will not go into details here.

[0073] It should be noted that in Figure 2 and Figure 3 In the present invention, two-finger pinching operation is used as a control means to control the zooming of graphics, but the control means are not limited to this. For example, when applied to a laptop computer, if an external mouse is connected, the zooming of graphics can also be controlled by the mouse wheel. In this case, the amplitude of the graphics zooming can be determined according to the scrolling direction and the scrolling angle corresponding to the mouse wheel. The graphics can be enlarged when the mouse wheel is rolled forward, and the graphics can be reduced when the mouse wheel is rolled backward. The display-control ratio uses the angle of the wheel when it is rolled as a control parameter. For example, when the mouse wheel is rolled forward to enlarge the graphics, the display-control ratio is the ratio of the magnification of the graphics to the angle of the wheel when it is rolled forward.

[0074] When zooming in on a graphic, due to the limitations of the screen resolution and graphic resolution of the terminal device, there is an upper limit to the magnification. Among them, after the graphic is zoomed in and released, the maximum magnification that can be magnified is the target magnification. For example, let the target magnification be 5 times. When zooming in on a graphic, the magnification of the graphic gradually increases from 1 times. If the magnification of the graphic increases to 10 times as the zoom operation is terminated. After the zoom operation is terminated, the magnification of the graphic is adjusted to 5 times (i.e., the target magnification).

[0075] In the process of enlarging the graphics in response to the user's operation, if the magnification of the graphics exceeds the target magnification, it is necessary to prompt the user that the enlargement operation has reached the limit. In the prior art, the display control ratio can be attenuated by an exponential function to reduce the amplitude of the enlarged graphics by the enlargement operation to prompt the user that the enlargement limit has been reached. For example, if the enlargement operation is a pinch operation with two fingers away. During normal zooming, the graphics increase by 1 times for every 0.5 cm away from the two fingers. After the display control ratio is attenuated, the graphics can only increase by 0.5 times for every 0.5 cm away from the two fingers. If it continues to attenuate, the graphics may only be increased by 0.1 times for every 0.5 cm away from the two fingers. In this way, when the user exceeds the limit of the enlargement operation, it can be perceived that the ongoing enlargement operation has exceeded the limit. It is convenient for users to perform enlargement operations according to their needs and improve the user's operating experience.

[0076] However, the target magnification is related to the screen resolution of the terminal device and the resolution of the graphics. When controlling different graphics on the same terminal device, the resolutions of the graphics are different, resulting in different target magnifications for each graphic. After the magnification of the graphic is greater than the target magnification, if the display-control ratio is attenuated by exponential attenuation or other methods, the function of the display-control ratio changing with the magnification of the graphic is different, resulting in the speed at which the display-control ratio of each graphic decays from the target magnification to the maximum multiple (that is, the functional relationship between the display-control ratio and the graphic magnification) is not uniform, the boundary of the magnification operation is not clear enough, and it is impossible to provide a clear and accurate prompt effect.

[0077] To this end, the present application provides a graphics control method that can dynamically adjust the display-control ratio so that the attenuation function of the display-control ratio matches graphics of different resolutions, giving users clear and unambiguous control operation progress feedback and prompts.

[0078] Figure 4 A schematic flow chart of the graphics control method provided by the present application is shown. As an example but not a limitation, the method can be applied to the above-mentioned terminal device. When applying the graphics control method provided by the present application, it is necessary to first respond to a series of user operations so that the resizable graphics are displayed on the screen of the terminal device. For example, in response to a user's click operation, the photo album application can be opened to display a graphical interface including pictures. Alternatively, in response to a user's click operation, a map application can be opened to display a graphical interface including a map, etc. Then, the graphics can be controlled according to the following steps.

[0079] S11, responding to a zoom-in operation, and zooming in the graphic according to a preset first display-control ratio.

[0080] S12. When the magnification of the graphic is greater than the target magnification, a second display-control ratio is determined according to the magnification of the graphic and the target magnification.

[0081] In some embodiments, the zoom operation may be a two-finger pinch operation of the user. When the user places two fingers on the touch medium of the terminal device, the terminal device may detect two touch points and the distance d between the touch points. When the user performs a two-finger pinch operation, the distance between the two touch points changes with the two-finger pinch operation. After the terminal device detects the change, the distance between the two touch points is D. If the display control ratio is Gain(s), the magnification s of the graphic is:

[0082] s=(Dd)×Gain(s) (Formula 1)

[0083] When s is greater than 0, it indicates that the two-finger pinch operation is a zoom-in operation; when s is less than 0, it indicates that the two-finger pinch operation is a zoom-out operation; when s is equal to 0, the distance between the touch points does not change, and neither zoom-in nor zoom-out occurs.

[0084] Furthermore, Gain(s) is a piecewise function as shown in Formula 2:

[0085]

[0086] Where Gain(s) is less than or equal to Scale off When s>Scale off When the display control ratio attenuation function is The second display-control ratio is calculated and obtained. is the first parameter, and λ is the third preset coefficient. off is the target magnification, Scale pinch The maximum magnification that can be achieved when the image is enlarged. pinch It is the magnification when the display-control ratio decays to 0.

[0087] Referring to Formula 2, when the magnification of the graphic is less than or equal to the target magnification, the display control ratio is the preset display control ratio, that is, the display control ratio is 1. When the magnification of the graphic is greater than the target magnification, the difference between the magnification of the graphic and the target magnification (s-Scale off ), the difference between the maximum magnification and the target magnification (Scale pinch -Scale off ) is multiplied by the third preset coefficient λ to obtain the first parameter, and then the display control ratio of the amplification operation is determined as the first parameter power of the natural constant, that is, the display control ratio is

[0088] Furthermore, the target magnification is linearly related to the ratio of the display resolution to the graphics resolution. off When the ratio of the display resolution to the graphic resolution is multiplied by the first preset coefficient, and then added to the second preset coefficient, the target magnification factor can be obtained. That is, it can be calculated by formula 3:

[0089]

[0090] Among them, Resolution display is the resolution of the terminal device screen. graph is the resolution of the graphics. k is the first preset coefficient and b is the second preset coefficient, which are user-defined preset parameters. The target magnification Scale0 = k + b when the graphics resolution is equal to the screen resolution. For example, if k is 5 and b is 3, the target magnification is 8 times when the graphics resolution is equal to the screen resolution.

[0091] It should be noted that in the calculation When you need to determine whether the graphic is aligned with the screen in height or width, then calculate the number of pixels on the aligned side. For example, refer to Figure 1 In the scene shown, the image is aligned with the screen width. If the image resolution is 2160×3840 and the screen resolution is 1200×2640, the image width is aligned with the screen width when the image is displayed. When k is 5 and b is 3, Scale off About 5.78 times.

[0092] For example, refer to Figure 2 The scene shown in the figure is aligned with the screen height. If the image resolution is 6880×4584 and the screen resolution is 2560×1440, then When k is 5 and b is 3, Scale off About 4.57 times.

[0093] Furthermore, the maximum magnification is the maximum magnification that can be achieved when the zoom operation magnifies the graphic, for example, pinch Scale off A constant times of . pinch It can be expressed by formula 4:

[0094] Scale pinch =mScale off (Formula 4)

[0095] Here, m is also a custom preset parameter, and m is greater than 1. For example, it can be 2, 3, 3.2, etc., depending on the setting in actual application.

[0096] Furthermore, the preset coefficient λ can be expressed by Formula 5:

[0097]

[0098] Among them, λ0 is also a custom preset parameter, which is the λ value when the graphics resolution is equal to the screen resolution. For example, λ0 can be set to 2, 3, 4.5, etc.

[0099] In this embodiment, through Formula 2, after the graphic magnification is greater than the target magnification, the display-control ratio (second display-control ratio) during the two-finger pinch operation can be determined and updated according to the four parameters of display resolution, graphic resolution, target magnification, and maximum magnification, so as to realize dynamic adjustment of the display-control ratio, unify the attenuation speed of the display-control ratio, and provide a unified operating experience.

[0100] S13, continue to enlarge the graphic according to the second display control ratio.

[0101] In some implementations, when the magnification of the graphic is greater than the target magnification, the magnification factor can be calculated according to formula 2: s>Scale off situation, that is Determine the second display control ratio, and then continue to enlarge the graphic according to the second display control ratio.

[0102] Reference Figure 5 , Figure 5 In the figure, function 1 and function 2 are display control ratio attenuation functions provided by the prior art, and function 3 is Gain(s). Figure 5 It can be seen that when the graphics control method provided by this application is not used, the speed of the display control ratio attenuation is obviously different for different graphics, and a unified operation experience cannot be provided. However, the display control ratio attenuation function of this application can dynamically adjust the attenuation of the display control ratio according to the parameters of different graphics and terminal devices. The speed of the display control ratio attenuation is unified, and the operation experience is also unified, providing a clearer and more accurate prompt effect.

[0103] In some embodiments, when a graphic is enlarged in response to a zoom-in operation, a prompt may be given when the magnification of the graphic is equal to the target magnification and / or equal to the maximum magnification. This further provides a clear and accurate prompt effect. The prompt may be provided in the form of vibration, text pop-up, sound prompt, etc. For example, when the magnification of the graphic is equal to the target magnification and / or equal to the maximum magnification, vibration may be provided, and a prompt "maximum magnification has been reached" may be popped up.

[0104] Here, combined Figure 2 , Figure 6 and Figure 7 The scenario shown illustrates the process of applying the graphics control method provided in this application.

[0105] The terminal device first responds to the user's click operation and opens applications such as photo albums, maps, browsers, etc. that display graphics. Figure 2 , Figure 6 and Figure 7 Taking opening the photo album as an example, the graphics displayed in the figure are the pictures pre-stored in the photo album.

[0106] After opening the album, the picture is displayed in a size suitable for the screen, and the graphic magnification s=1. The terminal device waits to receive the user's operation. If it is detected that the user has performed a two-finger pinch operation and the distance between the two touch points increases, the two-finger pinch operation is determined to be a zoom operation. Then, according to the preset display control ratio 1, the zoom operation is responded to and the graphic is enlarged. Until it is enlarged to Figure 5 The amplitude shown, that is, when the graphic magnification is equal to the target magnification (such as 10 times), the display control ratio begins to decay, and the decay function is Gain (s), s>10. Figure 6 When the magnification of the graphic is greater than the target magnification, continue to zoom in, the distance between the two touch points continues to increase, and the display control ratio is adjusted according to Gain(s) until the graphic magnification reaches Scale pinch (e.g. 25 times), and Gain(s) approaches 0 at this time, that is, it is no longer possible to enlarge the image as the distance between the two touch points continues to increase (i.e. Figure 6 If the user lets go when the magnification of the graphic is less than or equal to 10, the terminal device detects that the two touch points disappear, and the magnification of the graphic remains at the magnification when the user lets go. If the user lets go when the magnification of the graphic is greater than 10, the magnification of the graphic is adjusted to the target magnification, that is, restored to Figure 5 Multiples shown.

[0107] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0108] Corresponding to the graphics control method described in the above embodiment, Figure 7 A structural block diagram of a graphics control device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.

[0109] Reference Figure 8 The device includes: a response module 21, which is used to respond to the zoom operation and zoom in the graphic according to a preset first display control ratio. A determination module 22, which is used to determine a second display control ratio according to the magnification of the graphic and the target magnification when the magnification of the graphic is greater than the target magnification, wherein the target magnification is determined according to the display resolution of the screen and the graphic resolution of the graphic, and the second display control ratio is less than the first display control ratio. The response module 21 is also used to continue to zoom in the graphic according to the second display control ratio.

[0110] In some implementations, the target magnification factor is related to the display resolution of the screen and the graphic resolution of the graphic, including: the target magnification factor is linearly related to the ratio of the display resolution to the graphic resolution.

[0111] In some implementations, the target magnification is linearly related to the ratio of the display resolution to the graphic resolution, including: multiplying the ratio of the display resolution to the graphic resolution by a first preset coefficient and then adding a second preset coefficient to obtain the target magnification.

[0112] In some implementations, the determination module 22 is specifically configured to calculate and obtain the second display control ratio according to the magnification of the graphic, the target magnification and the maximum magnification, wherein the maximum magnification is the maximum magnification that can be achieved when the graphic is magnified by the zoom operation.

[0113] In some implementations, the determination module 22 is specifically configured to determine the Calculate the second display control ratio. Where Gain(s) is the second display control ratio, s is the magnification of the graph, Scale off Target magnification, Scale pinch is the maximum magnification, λ is the third preset coefficient, and the third preset coefficient is linearly related to the target magnification.

[0114] In some embodiments, Fig. 9 As shown, the device further comprises a prompt module 23 for giving a prompt when the magnification of the graphic is equal to the target magnification and / or the magnification of the graphic is equal to the maximum magnification.

[0115] It should be noted that the information interaction, execution process and other contents between the above-mentioned modules are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0116] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0117] An embodiment of the present application also provides a terminal device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor implements the steps in any of the above-mentioned method embodiments when executing the computer program.

[0118] Fig.10 It is a schematic diagram of the structure of the terminal equipment. Fig.10 As shown, the terminal device 3 includes: at least one processor 31 ( Fig.10Only one processor is shown in the figure), a memory 32, and a computer program 33 stored in the memory 32 and executable on at least one processor 31, wherein the processor 31 implements the steps of any of the above-mentioned embodiments of the graphic control method when executing the computer program 33.

[0119] The terminal device 3 may be a desktop computer, a notebook, a PDA, a smart phone, etc. The terminal device 3 may include, but is not limited to, a processor 31 and a memory 32. Those skilled in the art will appreciate that Figure 3 It is only an example of the terminal device 3 and does not constitute a limitation on the terminal device 3. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.

[0120] The processor 31 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0121] In some embodiments, the memory 32 may be an internal storage unit of the terminal device 3, such as a hard disk or memory of the terminal device 3. In other embodiments, the memory 32 may also be an external storage device of the terminal device 3, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 3. Further, the memory 32 may also include both an internal storage unit and an external storage device of the terminal device 3. The memory 32 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as program codes of a computer program, etc. The memory 32 may also be used to temporarily store data that has been output or is to be output.

[0122] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0123] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0124] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device capable of carrying the computer program code to the terminal device, a recording medium, a computer memory, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0125] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0126] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0127] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the network equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0128] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0129] Finally, it should be noted that the above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A graphics control method, applied to a terminal device, wherein a graphics is displayed on a screen of the terminal device, characterized in that: include: In response to the zoom operation, the graphic is zoomed in according to a preset first display control ratio, where the display control ratio is used to indicate a ratio of the zoom factor of the graphic to a control parameter of the zoom operation; When the magnification of the graphic is greater than the target magnification, a second display-control ratio is determined according to the magnification of the graphic, the target magnification and the maximum magnification, wherein the target magnification is determined according to the display resolution of the screen and the graphic resolution of the graphic, the second display-control ratio is less than the first display-control ratio, the maximum magnification is the maximum magnification that can be achieved when the magnification operation magnifies the graphic, and the target magnification refers to the maximum magnification that can be achieved after the magnification operation is performed and the hand is released; The graphic continues to be enlarged according to the second display-control ratio.

2. The method according to claim 1, characterized in that Determining the target magnification factor according to the display resolution of the screen and the graphic resolution of the graphic includes: The target magnification factor is obtained by multiplying the ratio of the display resolution to the graphic resolution by a first preset coefficient and adding the second preset coefficient.

3. The method according to claim 1 or 2, characterized in that: The determining the second display-control ratio according to the magnification of the graphic, the target magnification and the maximum magnification includes: According to the formula calculating the second display-control ratio; Wherein, Gain(s) is the second display control ratio, s is the magnification of the graphic, Scale off The magnification of the target, Scale pinch is the maximum magnification, λ is a third preset coefficient, and the third preset coefficient is linearly related to the target magnification.

4. The method according to claim 3, characterized in that When the graphic is enlarged in response to the enlargement operation, the method includes: A prompt is given when the magnification of the graphic is equal to the target magnification, or when the magnification of the graphic is equal to the maximum magnification.

5. A graphics control device, applied to a terminal device, wherein a graphic is displayed on a screen of the terminal device, characterized in that: include: A response module, used for responding to the zoom operation and zooming in the graphic according to a preset first display control ratio, wherein the display control ratio is used to indicate a ratio of the zoom multiple of the graphic to a control parameter of the zoom operation; a determination module, configured to determine a second display control ratio according to the magnification of the graphic, the target magnification and the maximum magnification when the magnification of the graphic is greater than the target magnification, wherein the target magnification is determined according to the display resolution of the screen and the graphic resolution of the graphic, the second display control ratio is less than the first display control ratio, the maximum magnification is the maximum magnification that can be achieved when the magnification operation magnifies the graphic, and the target magnification is the maximum magnification that can be achieved after the magnification operation is performed and the hand is released; The response module is further used to continue to enlarge the graphic according to the second display-control ratio.

6. The device according to claim 5, characterized in that The determining module is specifically used for: According to the formula calculating the second display-control ratio; Wherein, Gain(s) is the second display control ratio, s is the magnification of the graphic, Scale off The magnification of the target, Scale pinch is the maximum magnification, λ is a third preset coefficient, and the third preset coefficient is linearly related to the target magnification.

7. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 4 is implemented.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.