Multiplying power display method and electronic equipment

By detecting the hover position and target magnification of the stylus, automatically zooming the display content and animating the magnification control, the cumbersome problem of magnification display in the stylus interactive scene is solved, and the user experience and content visibility is optimized.

CN119311177APending Publication Date: 2025-01-14HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310857417.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-12
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

In paperless office environment, in elderly people with poor vision, eye disease patients and complex image scenarios that use electronic devices to learn, it is difficult for the existing technology to achieve convenient content magnification display in the interactive scenarios between stylus and electronic devices, resulting in cumbersome user operations .

Method used

By detecting the position and target magnification of the stylus hovering on the electronic device display screen, the display content is automatically scaled, and the magnification display control is displayed in an animation in the first interface, reducing the impact of occlusion on other content, supporting drag operations and Exit function.

Benefits of technology

It realizes convenient multiplier display when interacting with stylus and electronic devices, optimizes the user experience, reduces operational complexity, and improves the visibility of the displayed content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119311177A_ABST
    Figure CN119311177A_ABST
Patent Text Reader

Abstract

The invention discloses a magnification display method and electronic equipment, relates to the technical field of terminals, is applied to the electronic equipment, establishes communication connection with a handwriting pen, and comprises the following steps: the electronic equipment responds to a magnification display starting operation, and displays a magnification display control in a first form on a first interface. The electronic equipment responds to the hovering position of the handwriting pen on the display screen of the electronic equipment, and the display content of the target area on the display screen is zoomed and then displayed on the first interface according to the hovering position of the handwriting pen on the display screen and the target magnification. The electronic equipment responds to the dragging operation of the magnification display control, and the animation of the magnification display control moving along with the dragging operation is displayed in the first interface in a second form. According to the method and the device, the effect of directly carrying out magnification display on the display content through the handwriting pen under the scene that the handwriting pen interacts with the electronic equipment is realized, and the use experience of a user is optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of terminal technology, and in particular to a magnification display method and an electronic device. Background Art

[0002] With the trend towards paperless office, the number of people using electronic devices to study is increasing. However, for the elderly with poor eyesight, patients with eye diseases, people with impaired vision, and some scenes with complex images, a magnifying glass is needed to enlarge the display content.

[0003] Currently, users can use mouse-key connection or touch gestures to open the magnifying glass function of the electronic device to magnify the display content of the electronic device. However, in the scenario where a stylus pen is used to interact with the electronic device, the user needs to interrupt the interaction between the stylus pen and the electronic device to magnify the display content through the mouse-key connection or touch gesture, and the process of magnifying the display content is relatively cumbersome. Summary of the invention

[0004] The embodiment of the present application provides a magnification display method and an electronic device. In a scenario where a user uses a stylus to interact with an electronic device, when the function of displaying content magnification through the stylus is turned on, if it is detected that the stylus is hovering above the display screen of the electronic device, the electronic device scales the display content of the target area on the display screen according to the hovering position of the stylus on the display screen and the target magnification, and then displays it on the first interface. In the scenario where the stylus interacts with the electronic device, the effect of displaying the content magnification can be directly performed by the stylus, thereby optimizing the user experience. Moreover, if the electronic device responds to the drag operation of the magnification display control, the animation of the magnification display control moving with the drag operation is displayed in the second form in the first interface, wherein the size of the magnification display control in the first form is larger than the size of the magnification display control in the second form, so that in the process of the user dragging the magnification display control, the occlusion effect of the magnification display control on other displayed content in the first interface can be reduced.

[0005] In order to achieve the above-mentioned purpose, the embodiments of the present application adopt the following technical solutions.

[0006] In a first aspect, a magnification display method is provided, which is applied to an electronic device, wherein the electronic device establishes a communication connection with a stylus, and the method comprises:

[0007] The electronic device responds to the start-up operation of the magnification display and displays the magnification display control in a first form on the first interface;

[0008] The electronic device responds to the stylus pen hovering over the display screen of the electronic device, and according to the hovering position of the stylus pen on the display screen and the target magnification, scales the display content of the target area on the display screen and displays it on the first interface;

[0009] The electronic device responds to the dragging operation of the magnification display control and displays an animation of the magnification display control moving with the dragging operation in the first interface; the magnification display control is displayed in the second form during the dragging process, and the size of the magnification display control in the first form is larger than the size of the magnification display control in the second form.

[0010] The display content of the first interface includes a magnification display control and other content elements of the first interface. The first form may be a capsule shape. The second form may be a circle, a contact shape, etc.

[0011] In the present application, when the function option of magnification display is activated, if it is detected that the stylus is hovering above the display screen of the electronic device, the electronic device will scale the display content of the target area on the display screen according to the hovering position of the stylus on the display screen and the target magnification, and then display it on the first interface. In the scenario where the stylus interacts with the electronic device, the effect of displaying the magnification of the display content can be directly achieved through the stylus, thereby optimizing the user experience. Moreover, if the electronic device responds to the drag operation of the magnification display control, the animation of the magnification display control moving with the drag operation is displayed in the second form in the first interface, wherein the size of the magnification display control in the first form is larger than the size of the magnification display control in the second form. In this way, in the process of the user dragging the magnification display control, the occlusion effect of the magnification display control on other display content in the first interface can be reduced.

[0012] In a possible implementation manner of the first aspect, the method further includes:

[0013] The electronic device responds to the drag stop operation on the magnification display control and re-displays the magnification display control in the first form on the first interface.

[0014] In the present application, when the user stops dragging the magnification display control, the electronic device can re-display the magnification display control in the first form, which can provide the user with a more intuitive magnification display control effect and optimize the user experience.

[0015] In another possible implementation of the first aspect, the magnification display control is displayed at a specified position on a display screen, and the display screen includes a plurality of specified positions;

[0016] The electronic device responds to the drag stop operation of the magnification display control and re-displays the magnification display control in the first form on the first interface, including:

[0017] The electronic device responds to the drag stop operation and obtains a stop position corresponding to the drag stop operation;

[0018] If the stop position does not belong to the designated position, the electronic device displays the magnification display control in the first form at the target designated position; the target designated position is the position closest to the stop position among the multiple designated positions.

[0019] In the present application, the electronic device can display a magnification display control at a specified position on the display screen, for example, the specified position can be a specified position of the display screen, such as the top left, top right, top center, bottom left, bottom right, bottom center, etc. Setting the specified position to display the magnification display control can avoid the magnification display control being displayed at other positions of the first interface and blocking the display content of the first interface. The electronic device can display the magnification display control at a specified position on the display screen, and when the user drags the magnification display control to a non-specified position, it can still rebound to the specified position for display, which can avoid the magnification display control being displayed at other positions of the first interface and blocking the display content of the first interface.

[0020] In another possible implementation manner of the first aspect, the method further includes:

[0021] The electronic device creates an auxiliary area in the first interface, and the size of the auxiliary area is the same as the size of the preset magnification display range;

[0022] After scaling the display content of the target area on the display screen, the content is displayed on the first interface, including:

[0023] The electronic device scales the display content of the target area on the display screen and displays it in the auxiliary area of ​​the first interface.

[0024] In the present application, the electronic device can create an auxiliary area to display the zoomed content in the target area on the display screen, so that the user can see the zoomed display content more intuitively, thereby optimizing the user experience.

[0025] In another possible implementation manner of the first aspect, a display position of the auxiliary area on the first interface corresponds to a hovering position of the stylus on the display screen.

[0026] In the present application, the hovering position of the stylus pen can represent the location of the area that the user wants to display at a magnification. Determining the display position of the auxiliary area based on the hovering position of the stylus pen can make the content that the user wants to display at a magnification more intuitive. For example, the display position of the auxiliary area is near the hovering position of the stylus pen, which allows the user to intuitively see the effect of the target display content of the magnification display; in addition, as the hovering coordinates of the stylus pen change, the display position of the auxiliary area on the display screen also changes in real time, which can also effectively represent the real-time position of the target display content of the magnification display.

[0027] In another possible implementation manner of the first aspect, the method further includes: in response to the distance between the stylus and the display screen exceeding a preset range, the electronic device hides the auxiliary area.

[0028] In the present application, when the distance between the stylus pen and the display screen exceeds a preset range, it is considered that the user is no longer using the stylus pen for magnification display processing. In this case, the electronic device can hide the auxiliary area to avoid blocking other display content in the first interface and optimize the user's viewing experience of the first interface.

[0029] In another possible implementation manner of the first aspect, the target area is an area corresponding to a preset magnification display range centered on a hovering position of the stylus on the display screen;

[0030] Wherein, when at least a portion of the magnification display control belongs to a preset magnification display range centered on the hovering position of the stylus on the display screen, the target area includes at least a portion of the magnification display control.

[0031] In this application, the magnification display control is also part of the magnification display. If the stylus happens to hover over the magnification display control, that is, part or all of the magnification display control falls into the target area, the target content of the target area displayed by the electronic device includes the part of the magnification display control. In this way, considering the scenario where the magnification display control needs to be displayed at a magnification, the magnification display of the corresponding display content can also be achieved.

[0032] In another possible implementation of the first aspect, the target magnification is a default magnification; or, the magnification display control includes multiple magnification options, and the target magnification is a magnification corresponding to a magnification option selected by the user from the multiple magnification options.

[0033] In this application, if the user does not select a target magnification, the electronic device will display the magnification at the default magnification; if the user selects a target magnification or switches the target magnification, the electronic device will display the magnification at the current magnification as the target magnification. This can meet the user's needs for magnification display in different scenarios.

[0034] In another possible implementation manner of the first aspect, the magnification display control includes an exit magnification display button, and the method further includes:

[0035] The electronic device hides the magnification display control in response to a selection operation of an exit magnification display button.

[0036] In the present application, the electronic device responds to the selection operation of the exit magnification display button and turns off the function of using a stylus to display the magnification. In order to allow the user to intuitively feel the turning off of the magnification display function, the electronic device can hide the magnification display control.

[0037] In another possible implementation manner of the first aspect, the method further includes:

[0038] After the electronic device establishes a communication connection with the stylus, the electronic device displays the stylus function control; the electronic device responds to the selection operation of the stylus function control and displays a function option interface; the function option interface includes a magnification display.

[0039] The electronic device responds to the startup operation of the magnification display and displays the magnification display control in a first form on the first interface, including:

[0040] The electronic device responds to a selection operation for the magnification display in the function option interface and displays the magnification display control in a first form on the first interface.

[0041] In the present application, after the electronic device establishes a communication connection with the stylus, it can display a stylus function control on the first interface for representing the functions that can be realized by the stylus, wherein the stylus function control includes the functions that can be realized by the stylus. For example, using the stylus to create a new note, viewing the notes of the stylus, using the stylus to take a screenshot, a partial screenshot, using the stylus for magnification display, and so on. The electronic device responds to the selection operation of the magnification display in the function option interface, and turns on the function of using the stylus for magnification display. In order to allow the user to intuitively feel the turning on of the magnification display function, the electronic device can display the magnification display control in a first form on the first interface. For example, the magnification display control is displayed in the shape of a capsule; or, the magnification display control is displayed in the shape of a rectangular frame, and so on.

[0042] In another possible implementation manner of the first aspect, the method further includes:

[0043] The electronic device creates a target layer in the first interface; the target layer is a transparent layer used to monitor whether the stylus is hovering above the display screen.

[0044] In the present application, a target layer is created in the first interface to monitor whether the stylus is hovering above the display screen. The target layer does not intercept other system events generated by the electronic device, and can effectively identify the hovering event of the stylus while avoiding affecting other events in the first interface.

[0045] In another possible implementation manner of the first aspect, the method further includes:

[0046] When the electronic device detects through the target layer that the signal value of the stylus meets the preset conditions, it determines that the stylus is hovering above the display screen.

[0047] Wherein, including: when the signal value of the stylus is a capacitance value or a magnetic flux value, the preset conditions are met including that the signal value is greater than a preset pen-entry threshold value, and the signal value is within a preset pen-entry range within a preset period of time;

[0048] When the signal value of the stylus is a distance value, the preset conditions are satisfied including that the signal value is less than a preset distance threshold, and the signal value is within a preset distance range within a preset period of time.

[0049] In the present application, when the electronic device determines that the signal value of the stylus meets the preset conditions, it determines that the stylus is hovering above the display screen. Among them, the preset pen-in threshold and the preset distance threshold can be determined according to the actual device performance of the stylus and the electronic device. For example, the preset pen-in threshold can be greater than the factory default pen-in value of the electronic device, so that the determination of the stylus pen-in event is more accurate; the preset pen-in range and the preset distance range can also be determined according to the actual device performance of the stylus and the electronic device to more accurately identify the hovering event of the stylus.

[0050] In another possible implementation manner of the first aspect, the method further includes:

[0051] The electronic device uses the target layer as a parent window and creates a child window as a preset auxiliary area.

[0052] In the present application, by creating a preset auxiliary area based on the target layer, it is possible to display the preset auxiliary area without affecting the display of other display contents of the first interface.

[0053] In another possible implementation manner of the first aspect, the magnification display control includes an exit magnification display button, and the method further includes:

[0054] The electronic device deletes the target layer and the auxiliary area in response to the selection operation of the exit magnification display button.

[0055] In the present application, when the electronic device receives an operation to exit the magnification display function of the stylus, it promptly deletes the target layer used to monitor the hovering event of the stylus and the preset auxiliary area used to display the target display content at the target magnification. This can promptly release the resources of the electronic device to realize the magnification display of the stylus and avoid the problem of resource redundancy and waste.

[0056] In another possible implementation manner of the first aspect, the method further includes:

[0057] If the startup operation of the magnification display is the first startup operation of the magnification display of the electronic device, the electronic device outputs guidance information; the guidance information is used to provide the user with functional guidance for using the magnification display.

[0058] In the present application, if the current operation of starting the magnification display of the stylus is the first operation of the electronic device after leaving the factory, that is, the user of the electronic device turns on the magnification display function of the stylus for the first time, in this scenario, the electronic device can output guidance information to provide the user with functional guidance on using the magnification display of the stylus to optimize the user experience.

[0059] In another possible implementation of the first aspect, before the electronic device responds to a startup operation of a magnification display, the method further includes:

[0060] If at least one preset function in the electronic device is in operation, the electronic device turns off the preset function.

[0061] Among them, the preset function is used to represent a function in a preset electronic device that is mutually exclusive with the magnification display of the stylus. For example, the preset function may be a global gesture magnification function. The global gesture magnification function and the magnification display function of the stylus belong to the same underlying implementation module, and the two functions cannot be implemented at the same time, so they are mutually exclusive functions.

[0062] In the present application, in order to prevent the preset function in the electronic device from affecting the magnification display function of the stylus, before turning on the magnification display function, the electronic device can turn off the preset function in operation so that the magnification display function of the stylus can operate normally.

[0063] In another possible implementation of the first aspect, the electronic device acquires the target area of ​​the first interface according to the target magnification, a preset magnification display range, and the coordinates of the stylus pen, including:

[0064] The electronic device determines the target coordinates corresponding to the hovering coordinates of the stylus in the first interface according to the hovering coordinates of the stylus; takes the target coordinates as the geometric center and the preset magnification display range to determine the target area of ​​the first interface.

[0065] In the present application, the electronic device determines the center of the target display content with the hovering coordinates of the stylus as the geometric center, and determines the target display content in the first interface with a preset range, which can effectively display the content of the target area pointed to by the stylus at a magnification; in addition, the target display content changes with the hovering coordinates of the stylus, which can achieve the effect of real-time update of the target display content displayed at a magnification while the user moves the stylus. The electronic device performs image processing on the display content of the first interface based on the target magnification to obtain the corresponding display content at the target magnification, so that the display content after image processing is displayed in the auxiliary area to achieve the effect of magnification display (zooming in or out).

[0066] In a second aspect, an electronic device is provided, which includes a memory, a display screen and one or more processors; the memory and the display screen are coupled to the processor; the memory stores computer program code, and the computer program code includes computer instructions, and when the computer instructions are executed by the processor, the electronic device executes a method as described in any one of the above-mentioned first aspects.

[0067] According to a third aspect, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is executed on an electronic device, the electronic device can execute any one of the methods according to the first aspect.

[0068] According to a fourth aspect, a computer program product comprising instructions is provided, which, when executed on an electronic device, enables the electronic device to execute any one of the methods according to the first aspect.

[0069] In a fifth aspect, an embodiment of the present application provides a chip, the chip including a processor, the processor being used to call a computer program in a memory to execute the method of the first aspect.

[0070] It can be understood that the beneficial effects that can be achieved by the electronic device described in the second aspect, the computer-readable storage medium described in the third aspect, the computer program product described in the fourth aspect, and the chip described in the fifth aspect provided above can refer to the beneficial effects in the first aspect and any possible design method thereof, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] Figure 1 A schematic diagram of a scenario of interaction between an electronic device and a stylus provided in an embodiment of the present application;

[0072] Figure 2 A schematic diagram of an interface of an electronic device displaying a stylus floating ball provided in an embodiment of the present application;

[0073] Figure 3 A schematic diagram of a functional interface of a stylus displayed by an electronic device provided in an embodiment of the present application;

[0074] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0075] Figure 5 A schematic diagram of a system architecture of an electronic device provided in an embodiment of the present application;

[0076] Figure 6 A flowchart of a magnification display method provided in an embodiment of the present application;

[0077] Figure 7A schematic diagram of an interface for displaying guidance information of an electronic device provided in an embodiment of the present application;

[0078] Figure 8 A schematic diagram of a target layer created by an electronic device provided in an embodiment of the present application;

[0079] Fig. 9 A schematic diagram of a display magnification display control of an electronic device provided in an embodiment of the present application;

[0080] Fig.10 A schematic diagram of a dragging display of a magnification display control provided in an embodiment of the present application;

[0081] Fig.11 A schematic diagram of another magnification display control dragging display provided in an embodiment of the present application;

[0082] Fig.12 A schematic diagram of another magnification display control dragging display provided in an embodiment of the present application;

[0083] Fig.13 A schematic diagram of a magnification selection interface in a magnification display control provided in an embodiment of the present application;

[0084] Fig.14 A schematic diagram of an auxiliary area created for an electronic device provided in an embodiment of the present application;

[0085] Fig.15 A schematic diagram of a first image of a display interface provided in an embodiment of the present application;

[0086] Fig.16 A schematic diagram of a process of performing magnification display image processing on a first image provided by an embodiment of the present application;

[0087] Fig.17 A schematic diagram of another process of performing magnification display image processing on a first image provided by an embodiment of the present application;

[0088] Fig.18 A schematic diagram of an electronic device provided by an embodiment of the present application, in which target display content is displayed in an auxiliary area at a target magnification;

[0089] Fig.19 A schematic diagram of an electronic device provided by an embodiment of the present application that displays a corresponding target display content at a magnification as the position of a stylus moves;

[0090] Fig. 20 A schematic diagram of a magnification display control of an electronic device provided in an embodiment of the present application showing a target magnification;

[0091] Fig.21A schematic diagram of an electronic device displaying target display content at different magnifications provided by an embodiment of the present application;

[0092] Fig. 22 A schematic diagram of the structure of another electronic device provided in an embodiment of the present application;

[0093] Fig.23 A schematic diagram of the structure of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0094] In the description of the embodiments of the present application, the terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification and the appended claims of the present application, the singular expressions "a", "said", "above", "the" and "this" are intended to also include such expressions as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the following embodiments of the present application, "at least one", "one or more" refer to one or more (including two). The term "and / or" is used to describe the association relationship of associated objects, indicating that three relationships can exist; for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are a kind of "or" relationship.

[0095] References to "one embodiment" or "some embodiments" etc. described in this specification mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Thus, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear 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. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways. The term "connection" includes direct connection and indirect connection, unless otherwise specified. "First" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated.

[0096] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0097] The magnification display method provided in the embodiment of the present application can be applied to the scene where the electronic device interacts with the stylus. Figure 1 As shown, Figure 1 A schematic diagram of interaction between an electronic device 100 and a stylus pen 200 is provided.

[0098] The electronic device 100 and the stylus pen 200 can establish a communication connection through wireless communication technology to transmit control instructions or data. Among them, the wireless communication technology may include wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (BT), NFC (Near Field Communication), etc. The data transmitted between the electronic device 100 and the stylus pen 200 may include the attribute data of the stylus pen, screen parameter data, stylus pen firmware upgrade data, stylus pen operation log data, etc. Among them, exemplarily, the attribute data may include data such as the power of the stylus pen.

[0099] After the electronic device 100 establishes a communication connection with the stylus 200, the stylus 200 can implement operations such as inputting text, drawing graphics, signing, and taking notes on the electronic device 100. The user can also use the stylus to control some functions of the electronic device. For example, the stylus 200 can be used to perform touch operations on the display screen of the electronic device 100 to turn on or off applications in the electronic device 100; the stylus 200 can be used to draw / handwrite text in the drawing application / handwriting application of the electronic device 100; the stylus 200 can be used to implement global operations of the electronic device 100, such as global annotations, global notes, screenshots, and other operations.

[0100] Optionally, after the electronic device 100 establishes a communication connection with the stylus 200, the electronic device 100 may display a control on the display screen for providing an entry for functions that can be implemented by the stylus. Exemplarily, the form of the control may be a stylus suspension ball. Optionally, the stylus suspension ball may be suspended and displayed on the top of the current display interface of the electronic device 100. For example, the current display interface of the electronic device 100 is the main interface (page 0 of the desktop). After the electronic device 100 establishes a communication connection with the stylus 200, the stylus suspension ball may be suspended and displayed at any position of the main interface. For example, the current display interface of the electronic device 100 is the interface of the application. After the electronic device 100 establishes a communication connection with the stylus 200, the stylus suspension ball may be suspended and displayed at any position of the interface of the application. Optionally, the position where the stylus suspension ball is displayed may also be a specified position, for example, the specified position may be the upper left, lower left, upper right, lower right, left middle of the screen, right middle of the screen, etc. of the display screen. The user may drag the stylus suspension ball to any position or specified position of the display screen at will. Optionally, the shape of the stylus pen suspension ball may be circular, capsule-shaped, quadrilateral, etc., which is not limited in this embodiment.

[0101] For example, reference may be made to Figure 2 , Figure 2 A schematic diagram of a main interface of an electronic device displaying a stylus suspended ball is provided. Figure 2 In (a), after the electronic device 100 establishes a communication connection with the stylus pen 200, the electronic device 100 displays the stylus pen floating ball 101 on the main interface (current display interface), taking the shape of the stylus pen floating ball as a circle as an example. Figure 2 In (b), the user can trigger the display of the function interface 201 of the stylus 200 by an operation, such as clicking on the stylus floating ball 101. The function interface 201 includes function options such as creating a new note, opening a note, taking a screenshot, and taking a partial screenshot, which can be implemented by the stylus 200. When a certain function option is selected, the electronic device 100 can perform a corresponding response operation in response to the operation performed by the stylus 200. For example, when the "create a new note" function option is selected, the electronic device 100 can respond to the writing operation, sliding operation, etc. of the stylus 200 on the current display interface, and realize the effect of the user taking notes (annotations) on the display interface of the electronic device 100 through the stylus 200. For example, when the "partial screenshot" function option is selected, the electronic device 100 can respond to the sliding track of the stylus 200 on the current display interface, determine the selection area formed based on the sliding track, and then generate a screenshot corresponding to the partial screenshot according to the selection area, etc.

[0102] In the embodiment of the present application, the magnification display entrance for realizing the magnification display using the stylus provided in the present embodiment can also be placed in the following manner: Figure 2In the functional interface 201 of the stylus pen floating ball shown in the embodiment of the present application, the default display magnification of the display screen of the electronic device is 100%, and the magnification display function of the stylus pen refers to displaying the display content selected by the stylus pen 200 based on the selected magnification, for example, at a magnification greater than 100% or less than 100%.

[0103] For example, reference Figure 3 The function interface 201 of the stylus pen 200 is shown, wherein a function option 301 for magnification display is added to the function interface 201. When the function option for magnification display is selected, for example, the function option 301 for magnification display is clicked, the electronic device 100 responds to the click operation and starts the function of using the stylus pen 200 for magnification display. Specifically, when the electronic device 100 detects that the stylus pen 200 generates a hover event, it obtains the coordinate position of the stylus pen 200, the current display content of the display screen, and the target magnification, determines the target content according to the coordinate position of the stylus pen 200, the current display content of the display screen, and the target magnification, creates an auxiliary area in a preset area of ​​the pen tip position of the stylus pen 200, and displays the target content in the auxiliary area, thereby achieving the effect of displaying the target content at the target magnification in the auxiliary area near the coordinate position of the stylus pen through the stylus.

[0104] The stylus 200 in the embodiment of the present application is divided into an active stylus and a passive stylus according to whether it generates current by itself or passively absorbs current. Among them, the active stylus generates current by itself, senses the signal of the display screen of the electronic device 100, and interacts with the electronic device 100 for instructions or data. The passive stylus cannot actively generate current to interact with the display screen. The passive stylus needs to obtain the signal sent by the display screen of the electronic device 100, and interacts with the electronic device 100 for instructions or data based on the obtained signal.

[0105] Optionally, the stylus 200 can be divided into an electromagnetic stylus and a capacitive stylus according to the signal type. The electromagnetic stylus changes its magnetic flux at the touch point of the display screen by emitting an electromagnetic drive signal, and the electronic device 100 determines the position of the stylus 200 on the display screen of the electronic device based on the detected change in magnetic flux to perform corresponding operations. The capacitive stylus changes its electrode capacitance at the touch point of the display screen by emitting a voltage drive signal, and the electronic device 100 determines the position of the stylus 200 on the display screen of the electronic device based on the detected change in electrode capacitance to perform corresponding operations.

[0106] The stylus 200 involved in this embodiment can be an active stylus or a passive stylus, and can be an electromagnetic stylus or a capacitive stylus. It should be noted that the stylus 200 in this embodiment is a matching device with the electronic device 100, that is, if the electronic device 100 uses a capacitive sensor to detect the stylus, then the stylus is a capacitive stylus; if the electronic device 100 uses a magnetic sensor to detect the stylus, then the stylus is an electromagnetic stylus.

[0107] The electronic device 100 in the embodiment of the present application can be a portable computer (such as a mobile phone), a tablet computer, a smart drawing board, a smart touch pad, a laptop computer, a personal computer (PC), a wearable electronic device (such as a smart watch), an augmented reality (AR) device, a virtual reality (VR) device, a car computer, and other electronic devices that have the ability to interact with a stylus. The following embodiments do not impose any special restrictions on the specific form of the electronic device.

[0108] Please refer to Figure 4 , which shows a structural block diagram of an electronic device (such as electronic device 100) provided in an embodiment of the present application. Among them, the electronic device 100 may include a processor 310, an external memory interface 320, an internal memory 321, a universal serial bus (USB) interface 330, a charging management module 340, a power management module 341, a battery 342, an antenna, a communication module 360, an audio module 370, a speaker 370A, a receiver 370B, a microphone 370C, an earphone interface 370D, a sensor module 380, a display screen 394, etc.

[0109] Among them, the sensor module 380 may include a pressure sensor 380A, a magnetic sensor 380B, a distance sensor 380C, a touch sensor 380D, etc.

[0110] The structure illustrated in the embodiment of the present application does not constitute a limitation on the electronic device 100. It may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0111] The processor 310 may include one or more processing units. For example, the processor 310 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.

[0112] The controller can be a decision maker that directs the various components of the electronic device 100 to work in coordination according to the instructions. It is the nerve center and command center of the electronic device 100. The controller generates an operation control signal according to the instruction operation code and timing signal to complete the control of fetching and executing instructions.

[0113] The processor 310 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 310 is a high-speed cache memory, which can store instructions or data that the processor 310 has just used or cyclically used. If the processor 310 needs to use the instruction or data again, it can be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 310, and thus improves the efficiency of the system.

[0114] In some embodiments, the processor 310 may include an interface. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuits sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM interface, and / or a USB interface, etc.

[0115] The interface connection relationship between the modules illustrated in the embodiment of the present application is only for illustrative purposes and does not constitute a structural limitation on the electronic device 100. The electronic device 100 may adopt different interface connection methods in the embodiment of the present application, or a combination of multiple interface connection methods.

[0116] The charging management module 340 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 340 may receive charging input from a wired charger through the USB interface 330. In some wireless charging embodiments, the charging management module 340 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 340 is charging the battery 342, it may also power the electronic device 100 through the power management module 341.

[0117] The power management module 341 is used to connect the battery 342, the charging management module 340 and the processor 310. The power management module 341 receives input from the battery 342 and / or the charging management module 340, and supplies power to the processor 310, the internal memory 321, the external memory interface 320, the display screen 394, the camera 393, and the communication module 360. The power management module 341 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some embodiments, the power management module 341 can also be set in the processor 310. In some embodiments, the power management module 341 and the charging management module 340 can also be set in the same device.

[0118] The wireless communication function of the electronic device 100 can be implemented through an antenna, a communication module 360, a modem, a baseband processor, etc.

[0119] The antenna is used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antenna. For example, a cellular network antenna can be reused as a wireless local area network diversity antenna. In some embodiments, the antenna can be used in combination with a tuning switch.

[0120] The modem may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 370A, a receiver 370B, etc.), or displays an image or video through a display screen 394. In some embodiments, the modem may be an independent device. In some embodiments, the modem may be independent of the processor 310 and be arranged in the same device with other functional modules.

[0121] The communication module 360 ​​can provide a communication processing module for wireless communication solutions including WLAN (such as Wi-Fi network), Bluetooth, global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The communication module 360 ​​can be one or more devices integrating at least one communication processing module. The communication module 360 ​​receives electromagnetic waves via an antenna, modulates and filters the electromagnetic wave signal, and sends the processed signal to the processor 310. The communication module 360 ​​can also receive the signal to be sent from the processor 310, modulate the frequency, amplify it, and convert it into electromagnetic waves for radiation through the antenna.

[0122] In some embodiments, the antenna of the electronic device 100 is coupled to the communication module 360, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS may include a global satellite positioning system (satellite based augmentation systems, SBAS), a global navigation satellite system (global navigation satellite system, GLONASS), a BeiDou navigation satellite system (BeiDou navigation satellite system, BDS), a Quasi-Zenith satellite system (Quasi-Zenith satellite system, QZSS) and / or a satellite-based augmentation system (SBAS).

[0123] The electronic device 100 implements the display function through a GPU, a display screen 394, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 394 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 310 may include one or more GPUs, which execute program instructions to generate or change display information.

[0124] The display screen 394 is used to display images, videos, etc. For example, the display screen 394 can display an incoming call reminder interface and a voice call interface. The display screen 394 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light-emitting diode or an active matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diodes (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 394, where N is a positive integer greater than 1.

[0125] In the embodiment of the present application, the display screen 394 can display the desktop (main interface) of the electronic device 100. The desktop of the electronic device 100 can include multiple pages, and each page can display system icons, application icons, folders, other third-party function controls, etc. The display screen 394 can also display the system settings interface, application interface, etc. When the magnification display function of the stylus 200 is turned on, the user can use the stylus to display the magnification of all the contents displayed on the display screen 394. For example, when the magnification display function of the stylus 200 is turned on, the display screen 394 displays a chapter interface of an e-book in the e-book application, and the chapter interface includes the e-book text content area and other functional areas of the e-book. When the electronic device 100 detects that the stylus 200 is in a hovering state, the electronic device 100 obtains the coordinate position of the stylus 200. For example, the coordinate position of the stylus 200 is in the text content area. The electronic device 100 obtains the target content displayed at the magnification according to the position of the coordinate position of the stylus 200 corresponding to the text content area, the target magnification, and the preset magnification display range. The display screen 394 displays an auxiliary area, which includes the target content displayed at the magnification.

[0126] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0127] The external memory interface 320 can be used to connect an external memory card, such as a MicroSD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 310 through the external memory interface 320 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0128] The internal memory 321 can be used to store computer executable program codes, which include instructions. The processor 310 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 321. The memory 321 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the memory 321 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, other volatile solid-state storage devices, a universal flash storage (UFS), etc.

[0129] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 370, the speaker 370A, the receiver 370B, the microphone 370C, the headphone jack 370D, and the application processor.

[0130] The audio module 370 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal. The audio module 370 can also be used to encode and decode audio signals. In some embodiments, the audio module 370 can be arranged in the processor 310, or some functional modules of the audio module 370 can be arranged in the processor 310.

[0131] The speaker 370A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 370A.

[0132] The receiver 370B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 370B close to the human ear.

[0133] Microphone 370C, also called "microphone" or "microphone", is used to convert sound signals into audio electrical signals. When making a call or sending a voice message, the user can make a sound by putting his mouth close to microphone 370C to input the sound signal into microphone 370C. The electronic device 100 can be provided with at least one microphone 370C. In some embodiments, the electronic device 100 can be provided with two microphones 370C, which can not only collect sound signals but also realize noise reduction function. In some embodiments, the electronic device 100 can also be provided with three, four or more microphones 370C to realize the collection of sound signals, noise reduction, identification of sound sources, realization of directional recording function, etc.

[0134] The earphone interface 370D is used to connect a wired earphone and can be a USB interface 330, or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0135] The pressure sensor 380A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 380A can be arranged under the screen of the display screen 394. There are many types of pressure sensors 380A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 394, the electronic device 100 detects the touch operation intensity according to the pressure sensor 380A. The electronic device 100 can also calculate the touch position according to the detection signal of the pressure sensor 380A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.

[0136] In this embodiment, the stylus 200 may be a capacitive stylus, and the pressure sensor 380A is a capacitive pressure sensor. When the stylus 200 approaches the electronic device 100, for example, the stylus 200 enters into the detection range of the capacitive pressure sensor of the electronic device 100, the capacitive pressure sensor of the electronic device 100 detects a change in the capacitance signal value. According to the change in the capacitance signal value, the distance between the stylus 200 and the display screen 394, the coordinate position of the stylus 200 and the interrupt event of the stylus 200 can be obtained. The coordinate position of the stylus pen 200 may include the position of the pressing point acquired by the capacitive pressure sensor when the stylus pen 200 generates a pressing operation on the display screen 394; the coordinate position of the stylus pen 200 may also include the position of the stylus pen 200 being within the detection range of the capacitive pressure sensor, for example, when the stylus pen 200 is in a hovering state, that is, when the stylus pen 200 is within a preset distance above the display screen 394, the capacitive pressure sensor calculates the position of the stylus pen 200 tip corresponding to the display screen 394 according to the capacitance signal value of the stylus pen 200. The interruption events of the stylus pen 200 include a pen-in event when the stylus pen 200 is from far to near to the display screen 394 of the electronic device 100, a pen-down event (pressing event) when the stylus pen 200 falls on the display screen 394 of the electronic device 100, a hovering event when the stylus pen 200 is within a preset distance range from the display screen 394 of the electronic device 100, and a pen-out event when the stylus pen 200 is from near to far to the display screen 394 of the electronic device 100. The capacitive pressure sensor can determine the interruption event of the stylus 200 according to the change of the capacitance signal value of the stylus 200 and whether a pressing event occurs on the display screen 394. Accordingly, if different interruption events are detected by the stylus 200, it can be considered that the stylus 200 is in the corresponding state.

[0137] The capacitive pressure sensor can report the detected interrupt event of the stylus 200 to the processor of the electronic device 100. The processor responds to the corresponding operation of the stylus 200 according to different interrupt events and the coordinate position of the stylus 200. In the scene that needs to be displayed, the processor controls the display screen 394 to display the corresponding content.

[0138] Optionally, in this embodiment, the stylus pen 200 may also be an electromagnetic stylus pen, and the pressure sensor 380A is an electromagnetic pressure sensor. When the stylus pen 200 approaches the electronic device 100, for example, when the stylus pen 200 enters the detection range of the electromagnetic pressure sensor of the electronic device 100, the electromagnetic pressure sensor of the electronic device 100 detects a change in magnetic flux, and the distance between the stylus pen 200 and the display screen 394, the coordinate position of the stylus pen 200, and the interrupt event of the stylus pen 200 can be obtained according to the change in magnetic flux. The coordinate position of the stylus pen 200 may include the position of the pressing point acquired by the electromagnetic pressure sensor when the stylus pen 200 generates a pressing operation on the display screen 394; the coordinate position of the stylus pen 200 may also include the position of the stylus pen 200 being within the detection range of the electromagnetic pressure sensor, for example, when the stylus pen 200 is in a hovering state, that is, when the stylus pen 200 is within a preset distance above the display screen 394, the electromagnetic pressure sensor calculates the position of the stylus pen 200 tip corresponding to the display screen 394 according to the capacitance signal value of the stylus pen 200. The state of the stylus pen 200 includes a pen-in event when the stylus pen is moved from far to near to the display screen of the electronic device, a pen-down event when the stylus pen falls on the display screen of the electronic device, a hovering event when the stylus pen is within a preset distance range from the display screen of the electronic device, and a pen-out event when the stylus pen is moved from near to far to the display screen of the electronic device.

[0139] The electromagnetic pressure sensor can report the detected interruption event of the stylus 200 to the processor of the electronic device 100. The processor responds to the corresponding operation of the stylus 200 according to the different interruption events of the stylus 200 and the coordinate position of the stylus 200. In the scene that needs to be displayed, the processor controls the display screen 394 to display the corresponding content.

[0140] The magnetic sensor 380B includes a Hall sensor. The electronic device 100 can use the magnetic sensor 380B to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover according to the magnetic sensor 380B. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover automatic unlocking and other features are set.

[0141] The distance sensor 380C is used to measure the distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 380C to measure the distance to achieve fast focusing.

[0142] The touch sensor 380D, also called a “touch panel”, may be disposed on the display screen 394 to detect a touch operation applied thereto or thereabout. The detected touch operation may be transmitted to the application processor to determine the type of touch event and provide a corresponding visual output through the display screen 394.

[0143] Figure 5 1 is a software structure diagram of the electronic device 100 of the embodiment of the present application. The layered architecture divides the software into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the software structure system of the electronic device 100 is divided into four layers, from top to bottom, namely, the application layer, the application framework layer (framework), the hardware abstraction layer (HAL) and the kernel layer (kernel).

[0144] The application layer includes a floating menu module (floatmenu module), which is used to provide the implementation of the stylus pen floating ball function and other functions provided by the stylus pen floating ball, such as providing a function entry for magnification display and a function implementation for magnification display; providing a function entry for creating a new note and a function implementation for creating a new note, etc.

[0145] Optionally, the application layer may also include application programs, such as mail, settings, application market, photo album, calculator, camera, reading, sports health, mall, video, clock, music, etc.

[0146] The application framework layer provides the application layer with an application programming interface (API) and a programming framework. The application framework layer includes some predefined functions.

[0147] like Figure 5 As shown, the application framework layer may include a window manager (windowsmanager) and a stylus manager (penmanager).

[0148] Among them, the window manager provides image processing capabilities and stylus input receiving capabilities. Among them, the image processing capability refers to performing image processing on the content currently displayed by the electronic device based on the target magnification to obtain the target display content. The stylus input receiving capability refers to determining the state of the stylus based on the distance between the stylus and the electronic device display screen and the coordinate position of the stylus, for example, the stylus is in the pen-in state, hovering state, pen-out state, pen-down state, etc.

[0149] Optionally, the window manager can also be used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0150] The stylus manager is used to provide functions such as processing Bluetooth information at the end of the stylus and invoking application services. For example, the stylus communicates with the electronic device via Bluetooth, and the stylus manager can further process the Bluetooth messages in the communication.

[0151] The hardware abstraction layer includes a touch panel daemon (TPDaemon), which is used to synthesize the stylus coordinates and pressure sense to report points. In this embodiment, TPDaemon is used to obtain the coordinate position of the stylus, pressure sense data, etc. to form a reporting event and report it to the window manager after receiving the interrupt event reported by the touch panel driver.

[0152] The kernel layer is a layer between hardware and software. The kernel layer includes at least display driver, touch panel (TP) driver, Bluetooth driver, wireless charging driver, sensor driver, etc. Among them, the touch panel driver is used to detect the interrupt event generated by the stylus on the display screen. Exemplarily, the touch interrupt event includes the pen-in event, pen-down event, hovering event, pen-out event, etc. of the stylus. Pen-in refers to the distance between the stylus and the display screen of the electronic device from far to near, and the distance between the stylus and the electronic device is less than the preset first threshold. Pen-down refers to the stylus falling on the display screen of the electronic device to produce a sense of pressure. Hovering refers to the distance between the stylus and the display screen of the electronic device being within the preset threshold range, and the stylus is suspended above the display screen of the electronic device. Pen-out refers to the distance between the stylus and the display screen of the electronic device from near to far, and the distance between the stylus and the electronic device is greater than the preset second threshold.

[0153] In this embodiment, when the magnification display function is turned on in the electronic device, the touch panel driver receives the touch interrupt event of the stylus through the capacitive pressure sensor (or electromagnetic pressure sensor), and reports the touch interrupt event to TPDaemon. TPDaemon obtains the coordinate position and pressure data of the stylus, and synthesizes the coordinate position and the pressure data to report the point to the window manager. Based on the coordinate position of the stylus reported by TPDaemon, when the window manager determines that the stylus is in a hovering state, the window manager performs image processing based on the target magnification and the display content currently displayed by the electronic device, and obtains the target display content under the target magnification. The window manager reports the target display content to the floating menu module. The floating menu module displays the target display content on the current display interface of the electronic device.

[0154] In some embodiments, in combination with a specific usage scenario, the present application embodiment provides a magnification display method, referring to Figure 6 ,include:

[0155] S201: The electronic device establishes a communication connection with the stylus pen, and displays a stylus pen floating ball on a first interface.

[0156] In this embodiment, when the stylus is powered on and the distance between the stylus and the electronic device is within the communication distance range of the electronic device, the electronic device can establish a communication connection with the stylus. Optionally, the communication connection can be a short-distance communication connection such as a Bluetooth connection, a Wi-Fi connection, or an NFC connection.

[0157] Generally, the electronic device has a signal limit value set by factory default, which is used to determine the communication connection between the stylus and the electronic device. The signal limit value includes a default entry value and a default exit value. Among them, when the electronic device detects that the signal value of the stylus is greater than the default entry value, the electronic device establishes a communication connection with the stylus. This scenario can be understood as a scenario where the stylus is located near the electronic device, the user is ready to use the stylus to interact with the electronic device, and the stylus is in a waiting state. If the electronic device detects that the signal value of the stylus is less than the default exit value, the communication connection between the electronic device and the stylus can enter a dormant state. This scenario can be understood as a scenario where the stylus is far away from the electronic device, the user does not use the stylus to interact with the electronic device, and the stylus is in a waiting state to disconnect the communication connection. The dormant state means that the communication connection is not disconnected, but no data or instruction interaction is performed. Optionally, after the electronic device detects that the stylus is powered off, that is, after the electronic device cannot obtain any signal from the stylus, the electronic device can disconnect the communication connection with the stylus.

[0158] After the electronic device determines to establish a communication connection with the stylus, the control corresponding to the stylus suspended ball is displayed on the first interface of the electronic device. Here, the first interface can be the current display interface of the electronic device. For example, if the current display interface is the main interface of the electronic device, then the electronic device displays the stylus suspended ball in the main interface. For example, if the current display interface is the interface of the application of the electronic device, then the electronic device displays the stylus suspended ball in the interface of the application. For example, if the current display interface is other interfaces of the electronic device (such as system settings interface, other function interfaces), then the electronic device displays the stylus suspended ball in other interfaces.

[0159] The electronic device can display the stylus pen floating ball at any position of the display screen, or the electronic device can also display the stylus pen floating ball at a default position of the display screen. For example, the default position of the display screen can be the top center position, the bottom center position, the middle left position, the middle right position, etc. of the display screen. Figure 2(a) The electronic device may display the stylus suspension ball 101 in the middle right position of the display screen. In some embodiments, the user may drag the stylus suspension ball to any position or a designated position on the display screen of the electronic device. If the electronic device sets a designated position for displaying the stylus suspension ball, when the user drags the stylus suspension ball to a non-designated position, the electronic device may rebound and display the stylus suspension ball to the designated position closest to the current non-designated position.

[0160] Optionally, before or while displaying the stylus suspension ball, the electronic device may also display a prompt message for establishing a communication connection with the stylus on the first interface. Exemplarily, the electronic device may display the prompt message in the form of a floating window. The electronic device may display the prompt message at the top center of the display screen, and hide the prompt message after a period of time (the period of time may be pre-set). For example, the electronic device displays the prompt message at the top center of the display screen, and hides the prompt message after displaying it for 5 seconds. Optionally, the period of time may also be 3 seconds, 10 seconds, etc. Optionally, the prompt message may include prompt content for characterizing that the electronic device and the stylus have established a communication connection, and the prompt message may also include prompt content for prompting the user to slide up to hide the prompt message. When the electronic device displays the prompt message, if a user slides up, the prompt message is hidden in response to the slide up operation. Exemplarily, the electronic device may also set the user to trigger the hiding of the prompt message through other operations, such as left swipe, right swipe, slide down, double-click, etc., which is not limited in this embodiment.

[0161] S202: The electronic device displays a function interface of the stylus in response to a first operation of the user on the stylus floating ball.

[0162] The first operation is a user's selection operation on the stylus suspension ball. For example, the first operation may be an operation of the user clicking the stylus suspension ball. The first operation may also be an operation of the user inputting a voice input to open the stylus suspension ball. In response to the first operation, the electronic device displays a stylus function interface on the first interface. Figure 3 The functional interface 201 of the stylus is shown.

[0163] In some embodiments, the display position of the stylus function interface may be within a preset distance range of the stylus suspension ball. For example, the stylus suspension ball is located in the middle right position of the display screen, and the electronic device may display the stylus function interface at a certain distance to the left of the stylus suspension ball. For example, the stylus suspension ball is located in the middle left position of the display screen, and the electronic device may display the stylus function interface at a certain distance to the right of the stylus suspension ball. The certain distance here may be determined according to the size of the display screen of the electronic device.

[0164] Optionally, the function interface includes multiple function options that can be realized by the stylus. When the number of function options exceeds the number that can be displayed on one page of the function interface, the function interface may include multiple pages. For example, one page of the function interface may display 5 function options. Figure 3 The function interface 201 is shown. When the number of function options of the stylus pen is greater than 5, the electronic device can place other function options in the second page of the function interface, and the user can view function options on other pages of the function interface by performing designated operations such as pulling down or pulling up on the function interface.

[0165] Optionally, the function interface may further include setting options. The electronic device enters the setting interface of the function interface in response to the user's selection operation of the setting option. Based on the setting interface, the user can set the display of the function options displayed on the function interface, for example, arranging some function options on the first page of the function interface, arranging some function options on the second page of the function interface; or, removing some function options from the function interface and not displaying the function options in the function interface, adding some function options to the function interface, etc.

[0166] S203: The electronic device receives a second operation of the user on a magnification display function of the stylus.

[0167] The second operation may be an operation to enable the magnification display function of the stylus. Figure 3 The second operation may be a click operation of the user on the magnification display function option 301 in the stylus function interface 201; for example, the second operation may also be an operation of the user turning on the magnification display function of the stylus through voice input.

[0168] In some embodiments, the magnification display function includes a magnifying glass function. The magnifying glass function generally refers to a function of displaying interface content at a magnification greater than 100%. Among them, the magnification greater than 100% can be 120%, 150%, 200%, 250%, 300%, etc. The magnification display function can also include a reading glasses function. The reading glasses function refers to a function of displaying interface content at a magnification less than 100%. Among them, the magnification less than 100% can be 75%, 80%, 85%, 90%, etc.

[0169] Optionally, the magnifying glass function and the reading glasses function can be two independent functional options; or they can be integrated into one magnification display function option.

[0170] S204: The electronic device determines whether there is a preset function in operation.

[0171] Among them, the preset function is a function in the electronic device that is mutually exclusive with the magnification display function of the stylus. Among them, the reason for the mutual exclusivity of the functions may include that the module that executes the magnification display of the stylus is the same as the module that executes the preset function, resulting in the module being unable to respond to the operations corresponding to the magnification display of the stylus and the operations corresponding to the preset function at the same time. Exemplarily, the preset functions include a global gesture magnification function, a global screenshot function, and the like. The global gesture magnification function means that the user can zoom in or out the displayed content by sliding on the display screen through a specified gesture. The global screenshot function means that the user can perform a screenshot operation of the display interface on the display screen through a specified gesture. The preset function is determined in advance based on the functional scenarios that can be displayed by the electronic device and the functional scenarios that can be realized by the interaction between the electronic device and the stylus. The preset function can be adjusted according to demand.

[0172] After the electronic device receives the second operation in S203, the electronic device can determine whether there is a function that is mutually exclusive with the magnification display of the stylus pen currently running. If the electronic device determines that there is at least one preset function in operation, the preset functions are turned off. After the preset functions are turned off, S205 is executed. If the electronic device determines that there is no preset function in operation, S205 is executed.

[0173] Optionally, in order to further improve the user's experience of using the magnification display function of the stylus, in some embodiments, after determining that there is no preset function in operation, the electronic device may execute:

[0174] S205: The electronic device determines whether it is the first time to enable the magnification display function of the stylus pen.

[0175] In some embodiments, the first time the magnification display function of the stylus is enabled here refers to the first time the magnification display function of the stylus is enabled since the electronic device was turned on and used since leaving the factory. The electronic device can determine whether it is the first time that the magnification display function of the stylus is enabled by obtaining its own operation log. If there is no historical record of enabling the magnification display function of the stylus in the operation log, it means that this is the first time it is enabled. If there is a historical record of enabling the magnification display function of the stylus in the operation log, it means that this is not the first time it is enabled. When the electronic device determines that this time the magnification display function is enabled is the first time, S206 is executed; when the electronic device determines that this time the magnification display function is enabled is not the first time it is enabled, S207 is executed.

[0176] S206: The electronic device outputs guidance information for magnification display.

[0177] Among them, the guidance information includes the operation guidance content of the magnification display of the stylus pen, etc. The magnification display of the stylus pen refers to processing the display content pointed by the stylus pen at the target magnification according to the acquired target magnification, and displaying the image-processed content on the display screen. For example, the default display magnification of the display screen of the electronic device is 100%, and the display content pointed by the stylus pen is displayed on the display screen at the target magnification. For example, the target magnification can be 75% or 80% or 85% or 120% or 150% or 200%, etc.

[0178] Optionally, the guidance information may further include a confirmation button. The confirmation button is used to indicate that the user has known the guidance information. The electronic device receives the user's selection operation for the confirmation button, and in response to the operation, hides the guidance information. Figure 7 As shown, Figure 7 A schematic diagram of an interface for outputting guidance information of an electronic device is given in FIG. Figure 7 In the example, the guidance information 700 includes a content area 701 of "Welcome to the magnifying glass function", an operation guidance content area 702 of "You can use the magnifying glass function in any interface by hovering the stylus to conveniently view the page details", and a confirmation button 703. The confirmation button 703 is a text box button with the content "Got it".

[0179] Optionally, the electronic device can display the guidance information in a floating manner on the display screen, wherein the display position of the guidance information can be the center position of the entire screen of the display screen, the center position of the top of the screen, etc.

[0180] When the electronic device receives the user's selection operation on the confirmation button, the electronic device hides the guidance information in response to the selection operation and executes S207.

[0181] S207: The electronic device creates and displays a target layer.

[0182] In this embodiment, after the electronic device determines that this time the magnification display function is not turned on for the first time, or after the electronic device receives an operation from the user to trigger hiding the guide information, the electronic device creates and displays the target layer.

[0183] In order to avoid blocking the current display interface of the electronic device, the target layer in this embodiment can be a transparent layer. After the electronic device creates the transparent layer, the transparent image can be displayed on the first interface. Optionally, the target layer is created on the top layer of all layers corresponding to the display content of the display screen, and the transparent layer is used to monitor the hover event of the stylus. Optionally, the size of the target layer is consistent with the size of the display interface of the electronic device. Figure 8 , Figure 8A schematic diagram of the dimensions of a transparent layer is given.

[0184] Optionally, the target layer is not used for monitoring or intercepting other events, so as to ensure that the realization of other functions of the electronic device, such as content browsing, application switching and other functional operations, will not be affected during the use of the magnification display function.

[0185] S208, the electronic device displays a magnification display control.

[0186] Among them, the magnification display control includes the current magnification, magnification selection control, exit magnification display button, etc. For example, refer to Fig. 9 , Fig. 9 A schematic diagram of an electronic device displaying a magnification display control on a first interface is provided, wherein the magnification display control 900 includes a current magnification area 901 , a magnification selection control area 902 , and an exit magnification display button 903 .

[0187] In some embodiments, when the electronic device does not obtain the target magnification, the "current magnification" in the magnification display control displays the default magnification, wherein the default magnification may be 150%. When the electronic device obtains the target magnification, the "current magnification" in the magnification display control displays the target magnification.

[0188] In some embodiments, the electronic device may display the magnification display control at any position on the display screen. For example, the electronic device may display the magnification display control at the top center of the display screen. The user may drag the magnification display control to any position on the display screen to change its display position on the display screen. Fig.10 A schematic diagram of an interface of a display magnification display control of an electronic device is given. Fig.10 In (a), the electronic device displays the magnification display control (initial position) at the top center of the display screen; the user drags the magnification display control from the initial position to a certain position at the bottom of the display screen for display. Fig.10 (b), wherein the initial position is the position before dragging, represented by a dotted frame, and a position at the bottom of the display screen is the position after dragging, represented by a solid frame; the user drags the magnification display control from a position at the bottom of the display screen to a position in the middle of the display screen for display.

[0189] In some embodiments, the electronic device may display a magnification display control at a specified position on the first interface. Exemplarily, the specified position may include the top center, top left, and top right of the display screen; the bottom center, bottom left, and bottom right of the display screen; the middle left and middle right of the display screen, etc. The electronic device may determine one of the specified positions as the default position to display the magnification display control; or the default position may also be pre-set. The user can drag the magnification display control to any position on the display screen. When the user drags the magnification display control to a non-specified position, the electronic device may rebound the magnification display control to the nearest specified position based on the distance between the non-specified position to which it is dragged and the other specified positions. Reference Fig.11 . Fig.11 Another interface schematic diagram of a display magnification display control of an electronic device is given. For example, Fig.11 The specified positions include the top center and bottom center of the display screen. Fig.11 (a). The user displays the initial position of the control by displaying the magnification, refer to Fig.11 Drag the magnification display control represented by the dotted box in (b) to another location for display. Fig.11 The magnification display control represented by the solid line frame in (b). Since the other position is a non-specified position, the electronic device will rebound the magnification display control at the other position to the designated position closest to it, where the designated position closest to it is the bottom center position of the display screen. Fig.11 In (c), the magnification display control represented by the dotted frame in the non-specified position is rebounded by the electronic device to the specified position (the bottom center position of the display screen), referring to Fig.11 In (c), the magnification display control at the specified position is represented by a solid line frame.

[0190] In this embodiment, setting the magnification display control to rebound to a specified position for display can avoid the obstruction of other display content of the first interface caused by displaying the magnification display control at any position on the display screen, thereby optimizing the user's browsing experience when using the magnification display function.

[0191] Optionally, the magnification display control may be displayed in the first interface in a first form, wherein the first form may be a capsule form. Figure 9-11The shape of the magnification display control in the first interface. When the user drags the magnification display control, the magnification display control can be displayed in the first interface in the second form of animation. The size of the second form of the magnification display control is smaller than the size of the first form of the magnification display control. For example, when dragging the magnification display control, the magnification display control changes from a capsule shape to a circle, and the magnification display control is represented by a simpler shape. When dragging the magnification display control, the coverage area of ​​the magnification display control for the displayed content in the first interface can be reduced, thereby reducing the impact on other displayed content in the first interface.

[0192] Fig.12 A schematic diagram of the shape change of a magnification display control during dragging of the magnification display control is given. Taking the display of the magnification display control at a specified position of a display screen as an example, the specified position includes the top center position and the bottom center position of the display screen. Fig.12 In (a), the electronic device displays the magnification display control in the center of the top of the display screen in a capsule shape, and the user's finger performs a pressing operation on the magnification display control. When the electronic device receives the user's pressing operation on the magnification display control, the electronic device responds to the operation and changes the magnification display control from a capsule shape to a circle. Fig.12 (b). The center of the circle corresponds to the contact point of the pressing operation, and the size of the circle can be determined according to actual needs. When the electronic device detects that the user has not lifted the finger to perform a sliding operation, in response to the sliding operation, the dragging operation of the magnification display control is implemented along the sliding track of the finger, referring to Fig.12 (c). When the electronic device detects that the finger stops sliding and generates a finger lift event, the stop position of the sliding operation (finger lift position) is obtained. If the position is not the specified position, the electronic device rebounds the magnification display control to the specified position (bottom center position) and changes the magnification display control from a circular shape during the sliding process to the initial shape (capsule shape), refer to Fig.12 (d).

[0193] Optionally, the magnification display control can also be displayed in the first interface in other shapes, such as a rectangle or other shapes. Optionally, during the process of dragging the magnification display control, the magnification display control can also be represented in the form of a contact point or other simpler shapes, and this embodiment does not limit this specific shape.

[0194] S209: The electronic device obtains a target magnification and displays the target magnification in a magnification display control.

[0195] In some embodiments, the electronic device receives a third operation of the user on the magnification display control and displays a magnification selection interface. Fig. 9The third operation may be an operation of the user selecting the magnification selection control 902 in the magnification display control. In response to the third operation, the electronic device displays the magnification selection interface. Fig.13 (a), the electronic device can display a magnification selection interface 904 below the magnification display control. The magnification selection interface 904 includes multiple magnification options, and the magnification options may include a magnification less than 100%. The magnification less than 100% is used to zoom out the display content, which is suitable for the scene of reading glasses. Exemplarily, the magnification less than 100% may include 50%, 70%, 80%, etc. The magnification options also include a magnification greater than 100%, and the magnification greater than 100% is used to magnify the display content, which is suitable for the magnifying glass scene. Exemplarily, the magnification greater than 100% may include 120%, 150%, 200%, 250%, etc. The user can view the magnification in the magnification selection interface by sliding up and down the magnification selection interface, and then select the target magnification.

[0196] Optionally, if the electronic device receives a selection operation of the user on the magnification selection interface, the electronic device responds to the selection operation and obtains the selected magnification as the target magnification. Exemplarily, the electronic device responds to the user's selection operation on the magnification selection interface and determines the magnification 150% corresponding to the selection operation as the target magnification. Optionally, the electronic device can also display the target magnification 150% in the current magnification area 901 in the magnification display control based on the selection operation, referring to Fig.13 (b).

[0197] Optionally, if the electronic device does not receive a selection operation from the user on the magnification selection interface, a default magnification is obtained as the target magnification for magnification display. Optionally, the default magnification may be 150%. The default magnification may be determined based on historical data of user magnification display, and a behavior analysis may be performed to obtain a magnification with the highest selection probability as the default magnification. Alternatively, the default magnification may also be determined based on an application opened by the user or a currently displayed interface.

[0198] In some embodiments, the user can switch the target magnification while using the magnification display function. When the electronic device receives the user's selection operation on the magnification in the magnification selection interface, it obtains the current target magnification and updates the content of the "current magnification" in the magnification display control.

[0199] Optionally, in order to better perform magnification display processing on the display content of the first interface of the electronic device, the electronic device may create an auxiliary area for displaying the target content.

[0200] S210: When the electronic device detects a hovering event of the stylus pen, the electronic device creates an auxiliary area.

[0201] In some embodiments, the electronic device may monitor the hovering event of the stylus through the target layer created in S207.

[0202] In some embodiments, the electronic device detects whether the stylus generates a hovering event, which can be determined by a signal value generated by the stylus.

[0203] In order to more accurately monitor the hovering event of the stylus in this embodiment, the recognition limit value corresponding to the hovering event is set. Among them, the recognition limit value includes the hovering entry value and the hovering exit value. Here, the hovering entry value is less than the default entry value used for communication connection judgment, and the hovering exit value is less than the default exit value used for communication connection judgment. For example, the default entry value is 500 (signal value), and the hovering entry value can be set to 320 (signal value); the default exit value is 300 (signal value), and the hovering exit value can be set to 170 (signal value). Specifically, the default entry value, the default exit value, the hovering entry value, and the hovering exit value can all be determined according to the actual scenario, and this embodiment does not limit the specific values.

[0204] After setting the hover-in value and the hover-out value, when the electronic device detects that the signal value of the stylus gradually increases, it can be considered that the stylus has generated a pen-in event. The electronic device detects that the signal value of the stylus is greater than the hover-in value of 320, and the signal value has been within the preset signal value range for a period of time, and determines that the stylus has generated a hover event and the stylus is in a hovering state. Among them, the preset signal value range is determined based on the hover-in value. Exemplarily, when the electronic device detects that the signal value is greater than 320 and is within the value range of 320±100, it determines that the stylus is within the hovering range and generates a hovering event. The electronic device detects that the capacitance signal value is less than the hover-out value of 170, and determines that the stylus has generated a pen-out event.

[0205] On the basis of the default pen-in value and the default pen-out value of the electronic device, a hovering pen-in value and a hovering pen-out value with more precise numerical values ​​are set to identify the interruption event generated by the stylus, so that the identification can be more accurate.

[0206] In some embodiments, the electronic device can determine the distance between the stylus and the display screen of the electronic device based on the detected signal value. In this implementation, a distance limit value can be set to determine the hovering event of the stylus. Exemplarily, the distance limit values ​​include a hovering entry value and a hovering exit value. For example, the hovering entry value can be set to 5mm; the hovering exit value can be set to 10mm. Specifically, the hovering entry value and the hovering exit value can be determined according to the actual scenario, and this embodiment does not limit the specific values.

[0207] After setting the hover-in value and the hover-out value, when the electronic device detects that the distance between the stylus and the display screen of the electronic device is getting smaller and smaller, it can be considered that the stylus has generated a pen-in event. When the electronic device 100 detects that the distance between the stylus and the display screen of the electronic device is less than the hover-in value of 5mm, and the distance has been in the preset distance variation range for a period of time, it is determined that the stylus has generated a hover event. Among them, the preset distance variation range is determined based on the hover-in value. Exemplarily, when the electronic device detects that the distance between the stylus and the display screen of the electronic device is less than the hover-in value of 5mm, and is in the value range of 5mm±2mm, it is determined that the stylus is in the hover range and a hover event is generated. When the electronic device detects that the distance between the stylus and the display screen of the electronic device is greater than the hover-out value of 10mm, it is determined that the stylus 200 has generated a pen-out event.

[0208] When a hover event of the stylus is detected, the electronic device creates an auxiliary area for displaying target content, wherein the target content is the display content obtained by the electronic device by performing image processing on the display content of the first interface based on the target magnification and the coordinate position of the stylus.

[0209] Optionally, the size of the auxiliary area can be determined according to the size of the display screen; the geometric center of the auxiliary area corresponds to the coordinate position corresponding to the tip of the stylus. The size of the auxiliary area is the same as the size of the preset magnification display range. The preset magnification display range refers to a pre-set range centered on the hovering coordinates of the stylus where the magnification display is desired. This range can be a rectangular range or a circular range, without limitation. Accordingly, the shape of the auxiliary area can also be a rectangular shape or a circular shape, and the shape of the auxiliary area is consistent with the shape of the preset magnification display range.

[0210] Optionally, after creating the auxiliary area, the electronic device can bind the auxiliary area to the first interface; when the user switches the display interface of the electronic device, the auxiliary area is bound to the switched display interface. By binding the auxiliary area to the first interface, when the stylus moves on the first interface, the number of times the current interface display content is obtained can be reduced, and the coordinate position of the movement and the magnification display processing of the corresponding content can be directly performed based on the bound first interface.

[0211] Optionally, when the electronic device monitors the pen-in event of the stylus through the target layer, the auxiliary area can be created. The pen-in event of the stylus is an event that must occur before the hover event occurs. When the electronic device monitors the pen-in event, the auxiliary area can be created to improve the efficiency of the magnification display.

[0212] In some embodiments, the electronic device can use the transparent layer as a parent window (parent View) and create a child window (child View) of a preset size as an auxiliary area. The size of the auxiliary area can be determined according to the size of the display screen of the electronic device. Fig.14 , Fig.14 A schematic diagram of an auxiliary area created by an electronic device on a target layer (parent View) is provided. Optionally, the electronic device may always display the auxiliary area on the topmost layer corresponding to the display content included in the first interface.

[0213] After the electronic device creates the auxiliary area, the auxiliary area can be displayed according to the coordinate position of the hovering of the stylus pen. Exemplarily, the coordinate position of the hovering of the stylus pen is used as the geometric center of the auxiliary area, and the auxiliary area is displayed on the first interface.

[0214] Optionally, the shape of the auxiliary area can be a rectangle, a square, a circle, etc., and this embodiment does not limit the shape of the auxiliary area. Optionally, the electronic device can set an edge effect for the auxiliary area, such as setting a colored line or a line with other display effects on the edge of the auxiliary area, so that the user can see the content displayed in the auxiliary area more intuitively.

[0215] S211. The electronic device obtains the coordinate position of the stylus pen.

[0216] In this embodiment, the electronic device can calculate the coordinate position of the stylus by detecting the change in the signal value of the stylus. The coordinate position of the stylus includes the coordinate position corresponding to the stylus tip pointing to the display screen when the stylus is in a hovering state. For example, if the stylus is a capacitive stylus, the electronic device can obtain the change in the capacitance signal value of the stylus through a capacitive pressure sensor, and determine the coordinate position of the stylus according to the change in the capacitance signal value. If the stylus is an electromagnetic stylus, the electronic device can obtain the change in the magnetic flux of the stylus through an electromagnetic pressure sensor, and calculate the coordinate position of the stylus according to the change in the magnetic flux.

[0217] In some embodiments, when the stylus is in a hovering state, the stylus may be shaking. For example, the hand holding the stylus is in a hovering state, the position of the hand does not move, but the stylus is shaking. In order to eliminate the noise effect of the shaking on the signal value (capacitive signal value or magnetic flux) of the stylus, the electronic device can perform filtering after obtaining the signal of the stylus, and calculate the coordinate position of the stylus based on the signal value after filtering. Exemplarily, the electronic device can obtain the signal value of the stylus within a period of time, and perform interpolation filtering on the signal value within a period of time to reduce the abnormal effect of the noise caused by the shaking of the stylus on the signal value of the stylus. There is a deviation in the signal value generated during the shaking process, but the deviation of the signal value corresponding to the shaking after filtering will be reduced, so that the coordinate position calculated based on the signal value corresponding to the shaking after filtering can reach consistency, that is, even if the stylus shakes, the coordinate position of the stylus will not change. In this way, the misjudgment of the stylus shaking and the stylus moving can be effectively avoided, and the recognition accuracy of the stylus coordinate position can also be improved.

[0218] In this embodiment, the display screen of the electronic device and the environment in which the electronic device is located will also affect the noise caused by the signal value of the stylus. The electronic device can filter these noises, and the signal value after filtering has more accurate and stable data characteristics. The coordinate position of the stylus pen hovering is calculated based on the signal value after filtering, and the calculated coordinate position is more accurate.

[0219] Among them, the filtering algorithm can use a digital filter (infinite impulse response, IIR) or a recursive filter based on the time domain signal value for filtering. The filtering process is based on the time domain signal value, that is, after the electronic device receives the signal value of the stylus, it performs filtering on the current signal value based on the historical signal value. The filtering process may cause a delay in the calculation of the hovering coordinate position of the stylus. By sacrificing the tracking chirality of the magnified area, the accuracy of the hovering coordinate position of the stylus is improved. It is suitable for scenes such as using a stylus for magnification display, which do not require high tracking chirality.

[0220] In other scenarios where the stylus is used to implement functions, the electronic device may also adopt different degrees of filtering algorithms to filter the signal value of the stylus according to the requirements of the scenario for the tracking handedness (real-time update of the stylus coordinates) and the accuracy of the coordinate position of the stylus. Since the filtering algorithm filters the noise in the signal value of the stylus, the farther the stylus is from the electronic device, the greater the noise and the lower the signal value strength. For the use scenarios where the stylus is at different distances from the electronic device, the electronic device may adopt different degrees of filtering algorithms to filter the signal value of the stylus. Optionally, when the stylus is not in a hovering state and the stylus is in a writing state, the distance between the stylus and the electronic device is small, the strength of the signal value of the stylus is high, and the noise impact is low. In this scenario, in order to ensure the real-time calculation of the coordinate position of the stylus (tracking handedness), the filtering of the stylus signal value may not be performed.

[0221] S212: The electronic device scales the display content of the target area on the display screen based on the coordinate position of the stylus pen and the target magnification to obtain the target content.

[0222] In some embodiments, the electronic device performs image scaling processing on the display content of the target area on the display screen according to the coordinate position of the stylus and the target magnification to obtain the target content displayed at the target magnification.

[0223] Generally, the size of the first interface is consistent with the size of the display screen of the electronic device. For better calculation and explanation, exemplarily, the electronic device obtains a first image formed by all the display contents of the first interface, assuming that the size of the first image is 150*150. The first image includes images of all the display contents in the first interface and images of the magnification display controls. An image coordinate system is constructed with a vertex of the first image as the coordinate origin, the coordinate position of the stylus is determined to be point A (100, 100), and the size of the preset auxiliary area (preset magnification display range) is set to 60*60, where the geometric center of the auxiliary area is consistent with the coordinate position of the stylus, refer to Fig.15 Schematic diagram given.

[0224] The process of obtaining target content can be referred to Fig.16 For example, the size of the first image is 150*150, the coordinate position of the stylus is point A (100,100), the size of the auxiliary area is 60*60, and the target magnification is 150%. Fig.16 In (a), the coordinate position of the stylus and the position of the auxiliary area are determined in the first image. The display content of the target area for magnification display in the first image is determined based on the target magnification (150%), referring to Fig.16(b), based on a magnification of 150%, the range of the target area is determined to be a 45*45 area with the coordinate position of the stylus as the geometric center; the display content of the target area is displayed in the auxiliary area according to the size of the auxiliary area to achieve a 150% magnification display effect, refer to Fig.16 (c).

[0225] Optionally, the electronic device may further perform image processing on the first image according to the target magnification, that is, referring to Fig.17 (a), the first image size is 150*15, the auxiliary area size is 60*60, and the coordinate position of the stylus is point A (100,100). The first image is magnified to obtain a second image of 225*225. Fig.17 (b). From the 225*225 second image, based on the coordinate position A'(150, 150) of the stylus after the magnification calculation and the auxiliary area size (preset magnification display range) 60*60, determine the display content of the target area, and display the display content of the target area in the auxiliary area (60*60) to achieve a 150% magnification display effect, refer to Fig.17 (c).

[0226] Exemplarily, the size of the auxiliary area may also be 40*40, 50*50, etc., which may be determined according to actual conditions.

[0227] S213: The electronic device displays the target content in the auxiliary area.

[0228] In some embodiments, after acquiring the target display content, the electronic device displays the target display content in the auxiliary area. Fig.18 As shown, Fig.18 A schematic diagram of an electronic device displaying target display content at a target magnification in an auxiliary area is provided. For example, Fig.18 In the example given, the first interface is the display interface of application A, which includes landscape painting, description of landscape painting, other function options, magnification display control, etc. The electronic device performs image processing on all displayed contents on the display screen according to the current target magnification (150%) and the coordinate position of the stylus pen, obtains the target content of magnification display, and displays the target content in the auxiliary area.

[0229] S214: When the electronic device detects a hovering movement event of the stylus pen, the electronic device updates the position of the auxiliary area and the target content displayed in the auxiliary area according to the change of the coordinate position of the stylus pen.

[0230] In this embodiment, the geometric center of the auxiliary area is consistent with the coordinate position of the stylus, and the auxiliary area moves along with the movement of the stylus. Accordingly, the target content displayed in the auxiliary area is also updated as the coordinate position of the stylus changes.

[0231] Optionally, in a scenario where the user uses the magnification display function, the electronic device can monitor the hovering movement event of the stylus in real time through the target layer. Here, the hovering movement event refers to a movement event when the stylus is in a hovering state.

[0232] When the electronic device detects a hovering movement event of the stylus, that is, if the electronic device detects that the coordinate position of the stylus hovering changes, the position of the auxiliary area is updated in real time according to the change of the coordinate position of the stylus hovering, and the corresponding target display content is updated and acquired. Fig.19 , Fig.19 A schematic diagram is provided of an electronic device displaying a magnification of corresponding target display content as the position of a stylus moves. Fig.19 In the example above, the target magnification is 150%, and the coordinate position of the stylus pen is moved from the right side of the landscape painting to the middle. Fig.19 (a) to Fig.19 (b); the coordinate position of the stylus pen hovering moves from the middle of the landscape painting to the left, refer to Fig.19 (b) to Fig.19 (c) The electronic device obtains the coordinate position of the hovering of the stylus pen in real time, and based on the coordinate position of the hovering of the stylus pen, updates the position of the auxiliary area and the target display content displayed in the auxiliary area in real time.

[0233] In some embodiments, in order to allow the user to see the selected target magnification more clearly, the magnification display control also belongs to the content area of ​​the magnification display. Fig. 20 If the coordinate position of the stylus pen hovering is at a position corresponding to the magnification display control, the electronic device will display the image corresponding to the magnification display control at a magnification based on the coordinate position of the stylus pen.

[0234] Optionally, all displayed content in the first interface belongs to the content range of magnification display. If the first interface includes dynamic content such as video, the electronic device can also perform magnification display processing on the dynamic content. Specifically, the electronic device obtains the current image frame according to the coordinate position of the stylus, and performs magnification display based on the current image frame, the coordinate position of the stylus, the target magnification, and the size of the auxiliary area. Optionally, in order to display the dynamic content at a magnification more smoothly, the electronic device can also obtain a predicted frame after the current image frame after obtaining the coordinate position of the stylus, and use the predicted frame as the image frame for magnification display to perform magnification display processing.

[0235] Optionally, the user can also switch the target magnification during the use of the magnification display function. If the electronic device detects that the user selects the target magnification, the current target magnification is obtained, and the first image of the first interface is processed with the current target magnification, the real-time coordinate position of the stylus, and the size of the auxiliary area to obtain the target content. For example, Fig.21 A schematic diagram of displaying target content in the auxiliary area at different magnifications is given. Fig.21 In (a), the electronic device displays the target content at a target magnification of 75%. Fig.21 In (b), the electronic device displays the target content at a target magnification of 150%.

[0236] S215: When the electronic device detects a stylus withdrawal event, the auxiliary area is hidden.

[0237] In some embodiments, the electronic device can monitor the pen-out event of the stylus through the target layer created in S207. When the pen-out event of the stylus is monitored, it means that the distance between the stylus and the electronic device is greater than the hovering pen-out value, and the distance between the stylus and the display screen exceeds the preset range. The user no longer needs to use the stylus for magnification display. In this scenario, the electronic device hides the auxiliary area.

[0238] S216. The electronic device hides the magnification display control in response to the user's fourth operation on the magnification display control.

[0239] In some embodiments, Fig. 9 As shown, the fourth operation may be a user's selection operation for the exit magnification display button 903 in the magnification display control. After receiving the fourth operation, the electronic device hides the magnification display control in response to the fourth operation. Optionally, the electronic device exits the magnification display function of the stylus.

[0240] Optionally, in order to timely clear and release resources such as the target layer and auxiliary area and effectively reduce redundant occupancy of resources, the electronic device may also perform the following steps.

[0241] S217: The electronic device clears and releases resources such as the target layer and auxiliary area.

[0242] In some embodiments, after the electronic device exits the magnification display function of the stylus, it can effectively reduce redundant resource usage by promptly clearing and releasing resources such as the target layer and the auxiliary area.

[0243] In this embodiment, when the electronic device turns on the function of displaying magnification, the electronic device displays a magnification display control on the current display interface to provide the user with a function of selecting a target magnification. The electronic device obtains the target magnification in response to the user's magnification selection operation. When the electronic device detects that the stylus generates a hovering event, the coordinate position of the stylus is obtained, and the target display content of the current display interface is determined based on the target magnification, the display content currently displayed on the display screen, and the coordinate position of the stylus hovering. An auxiliary area is displayed in a preset area of ​​the coordinate position of the stylus hovering, and the target display content is displayed in the auxiliary area. During the change of the coordinate position of the stylus hovering, the auxiliary area and the target display content displayed in the auxiliary area are also updated and changed synchronously, so that the effect of displaying the magnification of the current display interface through the stylus is achieved when the user uses the stylus, thereby optimizing the interactive experience between the user and the electronic device.

[0244] Fig. 22 A possible structural diagram of the electronic device involved in the above embodiments is shown. Fig. 22 The electronic device 1000 shown includes a processor 1001 , a display screen 1002 , and a storage module 1003 .

[0245] Among them, the processor 1001 can be a central processing unit (CPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. The processor may include an application processor and a baseband processor. It can implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like. The storage module 1003 may be a memory.

[0246] For example, the processor 1001 may be Figure 4 The processor 310 shown; the display screen 1002 can be as shown Figure 4 The display screen 394 shown, the storage module 1003 can be as follows Figure 4 The internal memory 321 shown. The electronic device provided in the embodiment of the present application can be Figure 4 An electronic device 100 is shown.

[0247] The present application also provides a chip system (eg, a system on a chip (system on a chip, SoC)), such as Fig.23 As shown, the chip system includes at least one processor 2001 and at least one interface circuit 2002. The processor 2001 and the interface circuit 2002 can be interconnected by lines. For example, the interface circuit 2002 can be used to receive signals from other devices (such as a memory of an electronic device). For another example, the interface circuit 2002 can be used to send signals to other devices (such as a processor 2001 or a camera of an electronic device). Exemplarily, the interface circuit 2002 can read instructions stored in the memory and send the instructions to the processor 2001. When the instruction is executed by the processor 2001, the electronic device can perform the various steps in the above embodiments. Of course, the chip system may also include other discrete devices, which are not specifically limited in the embodiments of the present application.

[0248] An embodiment of the present application also provides a computer-readable storage medium, which includes computer instructions. When the computer instructions are executed on the above-mentioned electronic device, the electronic device executes each function or step executed by the electronic device 100 in the above-mentioned method embodiment.

[0249] The embodiment of the present application further provides a computer program product, which, when executed on a computer, enables the computer to execute the functions or steps executed by the electronic device 100 in the above method embodiment. For example, the computer may be the above electronic device 100.

[0250] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0251] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device 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 device, 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.

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

[0253] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0254] 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 readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0255] The above contents are only specific implementation methods 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 shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

1. A magnification display method, characterized in that: Applied to an electronic device, the electronic device establishes a communication connection with a stylus, and the method comprises: The electronic device responds to the start operation of the magnification display and displays the magnification display control in a first form on the first interface; In response to the stylus pen hovering over the display screen of the electronic device, the electronic device scales the display content of the target area on the display screen according to the hovering position of the stylus pen on the display screen and the target magnification, and displays the scaled content on the first interface; The electronic device responds to a dragging operation on the magnification display control by displaying an animation of the magnification display control moving along with the dragging operation in the first interface; the magnification display control is displayed in a second form while being dragged, and a size of the magnification display control in the first form is larger than a size of the magnification display control in the second form.

2. The method according to claim 1, characterized in that The method further comprises: The electronic device responds to the drag stop operation on the magnification display control by re-displaying the magnification display control in the first form on the first interface.

3. The method according to claim 2, characterized in that The magnification display control is displayed at a specified position of the display screen, and the display screen includes a plurality of specified positions; The electronic device responds to the drag stop operation on the magnification display control and displays the magnification display control in the first form on the first interface again, including: The electronic device responds to the drag stop operation by acquiring a stop position corresponding to the drag stop operation; If the stop position does not belong to the designated position, the electronic device displays the magnification display control in the first form at the target designated position; the target designated position is the position closest to the stop position among the multiple designated positions.

4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: The electronic device creates an auxiliary area in the first interface, the size of the auxiliary area being the same as the size of the preset magnification display range; The scaling the display content of the target area on the display screen and displaying the scaling content on the first interface includes: The electronic device scales the display content of the target area on the display screen and displays the scaled content in the auxiliary area of ​​the first interface.

5. The method according to claim 4, characterized in that The display position of the auxiliary area on the first interface corresponds to the hovering position of the stylus on the display screen.

6. The method according to claim 4 or 5, characterized in that: The method further comprises: In response to the distance between the stylus pen and the display screen exceeding a preset range, the electronic device hides the auxiliary area.

7. The method according to any one of claims 1 to 6, characterized in that The target area is an area corresponding to a preset magnification display range centered at the hovering position of the stylus on the display screen; Wherein, when at least a portion of the magnification display control belongs to a preset magnification display range centered on the hovering position of the stylus on the display screen, the target area includes at least a portion of the magnification display control.

8. The method according to any one of claims 1 to 7, characterized in that The target magnification is a default magnification; or, The magnification display control includes a plurality of magnification options, and the target magnification is a magnification corresponding to a magnification option selected by a user from among the plurality of magnification options.

9. The method according to any one of claims 1 to 8, characterized in that The magnification display control includes an exit magnification display button, and the method further includes: The electronic device hides the magnification display control in response to a selection operation of the exit magnification display button.

10. The method according to any one of claims 1 to 9, characterized in that The method further comprises: The electronic device creates a target layer in the first interface; the target layer is a transparent layer used to monitor whether the stylus is hovering above the display screen.

11. The method according to claim 10, characterized in that The method further comprises: The electronic device determines that the stylus is hovering above the display screen when the target layer detects that the signal value of the stylus meets a preset condition; When the signal value of the stylus is a capacitance value or a magnetic flux value, the preset condition is satisfied including that the signal value is greater than a preset pen-entry threshold value, and the signal value is within a preset pen-entry range within a preset period of time; When the signal value of the stylus is a distance value, satisfying the preset condition includes that the signal value is less than a preset distance threshold, and the signal value is within a preset distance range within the preset period of time.

12. The method according to claim 10, characterized in that The magnification display control includes an exit magnification display button, and the method further includes: The electronic device deletes the target layer and the auxiliary area in response to a selection operation of the exit magnification display button.

13. The method according to any one of claims 1 to 12, characterized in that The method further comprises: If the startup operation of the magnification display is the first startup operation of the magnification display of the electronic device, the electronic device outputs guidance information; the guidance information is used to provide a function guide for using the magnification display.

14. The method according to any one of claims 1 to 13, characterized in that Before the electronic device responds to the startup operation of the magnification display, the method further includes: If at least one preset function in the electronic device is in operation, the electronic device turns off the preset function; the preset function is used to represent a preset function in the electronic device that is mutually exclusive with the magnification display of the stylus.

15. An electronic device, characterized in that: The electronic device includes a memory, a display screen and one or more processors; the memory and the display screen are coupled to the processor; the memory stores computer program code, and the computer program code includes computer instructions, and when the computer instructions are executed by the processor, the electronic device executes the method as described in any one of claims 1-14.

16. A computer-readable storage medium, characterized in that: The method comprises computer instructions, which, when executed on an electronic device, cause the electronic device to execute the method as claimed in any one of claims 1 to 14.