Display method and related device

By displaying multiple logos on the display screen for circle drawing operations, the touch function of the inner and outer edge areas of the display screen is detected, which solves the problem of the existing technology that the inner edge area cannot be effectively detected, and improves the detection accuracy and product quality.

CN119271468BActive Publication Date: 2025-09-09HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410200464.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-22
Publication Date
2025-09-09
Estimated Expiration
2044-02-22

AI Technical Summary

Technical Problem

When screening electronic devices with abnormal touch functions, existing technologies are unable to effectively detect the inner edge area of ​​the display screen, resulting in abnormal devices entering the market.

Method used

Multiple first logos are displayed on the display screen, prompting the user to draw circles along the logos to realize touch function detection of the outer edge and inner edge areas of the display screen. The test unit is determined by dividing the coordinates of the unit and the hole area, reducing the probability of unrecognized damage to the touch function due to assembly or other reasons.

Benefits of technology

The accuracy of touch function detection in the edge area of ​​the display screen is improved, the probability of devices with abnormal touch function not being screened out is reduced, and product quality is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119271468B_ABST
    Figure CN119271468B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a display method and related devices, which relate to the field of terminal technology. The method includes: displaying a first interface on a display screen, the first interface includes a plurality of first identifiers, the plurality of first identifiers are used to identify a plurality of test units; the display screen includes a hole area, the plurality of test units include units surrounding the hole area; receiving an operation acting on a target test unit, and displaying a second identifier for indicating the test result of the test unit, the target test unit being any one of the plurality of test units. In this way, the touch function of the inner edge area of ​​the display screen can be detected, which can reduce the probability of electronic devices with abnormal touch function in the inner edge area of ​​the display screen not being screened out, thereby reducing the probability of electronic devices with abnormal touch function entering the market.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a display method and related devices. Background Art

[0002] Displays are components of some electronic devices. In some implementations, a touchscreen circle test method can be used to test the touch functionality of the edges of the electronic device's display before it leaves the factory, thereby screening out devices with abnormal touch functionality. For example, the touchscreen circle test method involves drawing a circle along the outer edge of the electronic device's display. If the touch functionality in the area along the circle's path is normal, an image indicating normal touch functionality will be displayed in the area along the circle's path.

[0003] However, when the touch screen circle test method is used to screen electronic devices with abnormal touch functions, there is a problem that electronic devices with abnormal touch functions are not screened out. Summary of the Invention

[0004] The embodiments of the present application provide a display method and related apparatus for use in the field of terminal technology. When an electronic device receives an operation to start a touch screen test, the electronic device can display multiple first identifiers in the outer edge area and the inner edge area of ​​the display screen to prompt the user to draw a circle along the first identifiers. This can detect the touch function of both the outer edge area and the inner edge area of ​​the display screen, thereby reducing the probability of electronic devices with abnormal touch functions not being screened out, and further reducing the probability of electronic devices with abnormal touch functions entering the market.

[0005] In a first aspect, an embodiment of the present application provides a display method, the method comprising:

[0006] A first interface is displayed on a display screen, the first interface including a plurality of first identifiers for identifying a plurality of test units. The display screen includes a hole area, and the plurality of test units include units surrounding the hole area. Upon receiving an operation applied to a target test unit, a second identifier for indicating a test result of the test unit is displayed, where the target test unit is any one of the plurality of test units.

[0007] Because the multiple test units corresponding to the first interface include units located in the inner edge area of ​​the display screen, the multiple first identifiers corresponding to the multiple test units can be used as test prompts. In this way, the touch function of the inner edge area of ​​the display screen can be tested, which can reduce the probability of electronic devices with abnormal touch functions in the inner edge area of ​​the display screen not being recognized. The inner edge area of ​​the display screen can be understood as the area surrounding the hole area of ​​the display screen.

[0008] In one possible implementation, before displaying the first interface on the display screen, the method further includes: dividing the display screen into a plurality of cells. Based on the coordinates of the hole-punch area, obtaining a first area represented by the coordinates of the hole-punch area. Determining a first area of ​​a target cell. The first area of ​​the target cell is the area of ​​the intersection of the target cell and the first area. The target cell is any one of at least one cell that intersects with the first area. When a ratio K of the first area of ​​the target cell to the area of ​​the cell is less than a first preset value, the target cell is determined to be a test cell. When the ratio K is greater than or equal to the first preset value, a peripheral cell of the target cell is determined to be a test cell. A peripheral cell of the target cell is a cell adjacent to the target cell and not intersecting with the first area. The first area may be a circular, elliptical, or polygonal shape. The embodiment of the present application does not specifically limit the shape of the first area. For example, the peripheral cells of the target cell are collinear or collinear with the target cell. It is understood that if the first area is rectangular and the target cell includes a vertex of the first area, then there are two peripheral cells collinear with the target cell and one peripheral cell collinear with the target cell. The number of peripheral cells of the target cell is three.

[0009] In this way, multiple test units can be obtained surrounding the hole-punch area. If the ratio of the first area of ​​the test unit to the unit area is less than a first preset value, it can indicate that the touch function of the test unit will not be damaged by the hole-punch. It is necessary to test the touch function of the test unit to reduce the probability of the test unit's touch function not being recognized after being damaged due to assembly or other reasons. Other reasons do not include hole-punch reasons, and other reasons include transportation reasons.

[0010] In one possible implementation, when the ratio K of the first area of ​​the target unit to the area of ​​the unit is less than a first preset value, determining that the target unit is a test unit includes: when the ratio K is less than the first preset value, adding the information of the target unit to the first list. The first list is used to record the information of the test unit. When the ratio K is greater than or equal to the first preset value, determining that the peripheral unit of the target unit is a test unit includes: when the ratio K is greater than or equal to the first preset value, adding the information of the peripheral unit of the target unit to the first list. The first list includes information of units that intersect with the outer edge of the display screen. Before displaying the first interface on the display screen, the method further includes: selecting information of units that do not exceed the boundary of the display screen from the first list to obtain a second list. The information contained in the second list is used for displaying the first interface.

[0011] In this way, the units included in the second list that intersect with the outer edge of the display screen belong to the test units located in the outer edge area of ​​the display screen. The second list also includes test units located in the inner edge area of ​​the display screen, and does not include units that exceed the boundary of the display screen. Using the second list to display the first interface can realize the test of the touch function of the outer edge area of ​​the display screen and the touch function of the inner edge area of ​​the display screen, and can also reduce the impact of the units beyond the boundary of the display screen on the touch function test of the display screen, so as to improve the accuracy of the touch function test of the display screen. Among them, the outer edge area of ​​the display screen can be understood as the area on the display screen that intersects with the outer edge of the display screen.

[0012] In one possible implementation, the hole-punch area includes a first hole-punch area and a second hole-punch area, and the coordinates of the hole-punch area include the coordinates of the first hole-punch area and the coordinates of the second hole-punch area. The first region includes a second region and a third region. The second region is the region represented by the coordinates of the first hole-punch area, and the third region is the region represented by the coordinates of the second hole-punch area. Before displaying the first interface on the display screen, the method further includes: clearing information in the second list that is identical to information about cells in the blacklist, thereby obtaining a cleared second list. The information contained in the cleared second list is used to display the first interface, and the blacklist includes information about the first non-test cell and information about the second non-test cell. The first non-test cell intersects with the second region, and the ratio of the area where the first non-test cell intersects with the second region to the area of ​​the cell is greater than or equal to a first preset value. The second non-test cell intersects with the third region, and the ratio of the area where the second non-test cell intersects with the third region to the area of ​​the cell is greater than or equal to the first preset value.

[0013] In this way, the information in the second list is cleaned through the blacklist to reduce the impact of units determined as test units based on one hole area and as non-test units based on another hole area on touch function detection, and reduce the probability of reduced detection accuracy due to the fact that the detected unit belongs to a non-test unit.

[0014] In one possible implementation, the second area is a rectangular area, and the second area includes a first side, a second side, a third side, and a fourth side, the first side is parallel to the third side, and the second side is parallel to the fourth side. The coordinates of the first hole-digging area include the coordinates of the first intersection of the first side and the fourth side. The target unit includes a first target unit, and determining the first area of ​​the target unit includes: taking the unit containing the first intersection as the starting unit, and determining the units intersecting with the edges of the second area along the first side, the second side, the third side, and the fourth side one by one as the first target unit, and calculating the first area of ​​the first target unit. The first area of ​​the first target unit is the area where the first target unit intersects with the second area. The first target unit is any one of at least one unit that intersects with the second area.

[0015] In this way, when the display screen includes multiple hole-punch areas, the electronic device can, based on the coordinates of the target hole-punch area, calculate the first area of ​​each cell intersecting with the edge of the area represented by the coordinates of the hole-punch area one by one along the edge of the area represented by the coordinates of the hole-punch area, starting from a cell corresponding to a vertex of the area represented by the coordinates of the hole-punch area as the starting cell, thereby determining multiple test cells surrounding the target hole-punch area. The target hole-punch area is any one of the multiple hole-punch areas corresponding to the display screen.

[0016] In a possible implementation, the unit is a grid. Dividing the display screen into a plurality of units includes: dividing the display screen into M rows and N columns to obtain a plurality of grids.

[0017] Wherein, M and N are both integers, M is positively correlated with the resolution of the display screen and negatively correlated with the pixel density of the display screen and the second preset value, and N is positively correlated with the resolution of the display screen and negatively correlated with the pixel density of the display screen and the second preset value.

[0018] In this way, the number of rows and columns of the display screen can be determined based on the resolution and pixel density of the display screen, so that the display screen can be divided into multiple units using the number of rows and columns of the display screen.

[0019] In a possible implementation, the resolution of the display screen includes the vertical resolution h of the display screen. p and the horizontal resolution of the display w p .

[0020] The number of rows M satisfies the formula:

[0021] The number of columns N satisfies the formula:

[0022] Wherein, δ2 is the second preset value, | | * Indicates rounding to the nearest integer, H=λW, PPI is the pixel density, and λ is the aspect ratio of the display.

[0023] In this way, the number of rows and columns of the display screen can be determined based on the resolution and pixel density of the display screen, so that the display screen can be divided into multiple units using the number of rows and columns of the display screen.

[0024] In a possible implementation, the first identifier is used to identify a center point of the test unit.

[0025] In this way, when the user draws a circle along the first mark, precise contact with the test unit corresponding to the first mark can be achieved, thereby improving the accuracy of the touch test.

[0026] In a possible implementation, the first identifier and the second identifier have different colors, and / or the display area of ​​the second identifier is larger than the display area of ​​the first identifier.

[0027] In this way, when the user performs a circle operation, if the touch function of the target test unit is normal, the second identifier can be displayed at the location of the target test unit; if the touch function of the target test unit is abnormal, the first identifier can be displayed at the location of the target test unit. Through the difference in display color and / or display area between the first identifier and the second identifier, it can be accurately identified whether the touch function at the location of the target test unit is normal.

[0028] In one possible implementation, before displaying the first interface on the display screen, the method further includes: dividing the display screen into a plurality of units. Upon receiving an operation acting on a target unit among the plurality of units, information about the target unit is added to a configuration file. The configuration file includes information indicating the type of the display screen, and the configuration file is used to display the first interface. Displaying the first interface on the display screen includes:

[0029] When the information indicating that the test is started is received and the information indicating the type of the display screen is obtained, the configuration file is read and parsed, and the first mark is displayed on the display screen.

[0030] In this way, it is possible to configure the test unit information corresponding to the target display screen of different types of display screens and the target type information representing the target display screen type into the configuration file in a preset manner. When an operation to start the touch function test is received and the target type information is obtained, the electronic device can read and parse the configuration file to display the multiple first identifiers corresponding to the target type information in the configuration file, thereby realizing the touch function detection of the outer edge area of ​​the target display screen and the touch function detection of the inner edge area of ​​the target display screen. In addition, since the multiple test units corresponding to the target display screen are preset, this can reduce the amount of calculation required by the electronic device to determine the multiple test units of the target display screen.

[0031] In a second aspect, an embodiment of the present application provides a display device, which may be an electronic device or a chip or chip system within an electronic device. The display device may include a display unit and a processing unit. When the display device is an electronic device, the display unit may be a display screen. The display unit is configured to execute the display step, so that the electronic device implements a display method described in the first aspect or any possible implementation of the first aspect. When the display device is an electronic device, the processing unit may be a processor. The display device may also include a storage unit, which may be a memory. The storage unit is configured to store instructions, and the processing unit executes the instructions stored in the storage unit, so that the electronic device implements a display method described in the first aspect or any possible implementation of the first aspect. When the display device is a chip or chip system within an electronic device, the processing unit may be a processor. The processing unit executes the instructions stored in the storage unit, so that the electronic device implements a display method described in the first aspect or any possible implementation of the first aspect. The storage unit may be a storage unit within the chip (e.g., a register, a cache, etc.), or a storage unit within the electronic device located outside the chip (e.g., a read-only memory, a random access memory, etc.).

[0032] In a third aspect, embodiments of the present application provide an electronic device comprising one or more processors and a memory. The memory is coupled to the one or more processors, and the memory is configured to store computer program code, which includes computer instructions. The one or more processors invoke the computer instructions to cause the electronic device to perform the method described in the first aspect or any possible implementation of the first aspect.

[0033] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program or instruction is stored. When the computer program or instruction is run on a computer, the computer executes the method described in the first aspect or any possible implementation of the first aspect.

[0034] In a fifth aspect, an embodiment of the present application provides a computer program product including a computer program, which, when executed on a computer, causes the computer to perform the method described in the first aspect or any possible implementation of the first aspect. The computer program may include computer program code.

[0035] In a sixth aspect, the present application provides a chip or chip system, comprising at least one processor and a communication interface, wherein the communication interface and the at least one processor are interconnected via a line, and the at least one processor is configured to execute a computer program or instruction to perform the method described in the first aspect or any possible implementation of the first aspect. The communication interface in the chip may be an input / output interface, a pin, or a circuit.

[0036] In one possible implementation, the chip or chip system described above in this application further includes at least one memory, in which instructions are stored. The memory may be a storage unit within the chip, such as a register, a cache, etc., or a storage unit of the chip (e.g., a read-only memory, a random access memory, etc.).

[0037] It should be understood that the second to sixth aspects of the present application correspond to the technical solutions of the first aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 A schematic diagram of a touch screen circle test method provided in an embodiment of the present application;

[0039] Figure 2 A schematic diagram of a flow chart of a touch function test provided in an embodiment of the present application;

[0040] Figure 3 A schematic diagram of multiple grids and hole-punch areas of a display screen provided in an embodiment of the present application;

[0041] Figure 4 A schematic diagram of a test grid determination process according to an embodiment of the present application;

[0042] Figure 5 A schematic diagram of a touch function test scenario provided in an embodiment of the present application;

[0043] Figure 6 Another schematic diagram of a touch function test process according to an embodiment of the present invention;

[0044] Figure 7 A schematic structural diagram of an electronic device 100 provided in an embodiment of the present application;

[0045] Figure 8 This is a schematic diagram related to the software architecture of the electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0046] To facilitate a clear description of the technical solutions of the embodiments of the present application, some of the terms and technologies involved in the embodiments of the present application are briefly introduced below:

[0047] 1. Other terms

[0048] In the embodiments of this application, terms such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. For example, the terms "first chip" and "second chip" are used solely to distinguish between different chips and do not define their order. Those skilled in the art will understand that terms such as "first" and "second" do not define the quantity or execution order, and do not necessarily define differences.

[0049] It should be noted that in the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described in this application as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0050] In the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, a--c, bc, or abc, where a, b, c can be single or multiple.

[0051] 2. Electronic devices

[0052] The electronic devices of the embodiments of the present application may include handheld devices with display functions, vehicle-mounted devices, etc. For example, some electronic devices include: mobile phones, tablet computers, PDAs, laptop computers, mobile internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to wireless modems, vehicle-mounted devices, wearable devices, terminal devices in 5G networks or future evolved public land mobile communication networks (PLMNs), and so on. The terminal equipment in the network (PLMN), etc., is not limited to this in the embodiments of the present application.

[0053] As an example and not a limitation, in the embodiments of the present application, the electronic device may also be a wearable device. Wearable devices may also be referred to as wearable smart devices, which are a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing, and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include those that are fully functional, large in size, and can achieve complete or partial functions without relying on smartphones, such as smart watches or smart glasses, as well as those that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various smart bracelets and smart jewelry for vital sign monitoring.

[0054] In addition, in the embodiments of the present application, the electronic device can also be a terminal device in the Internet of Things (IoT) system. IoT is an important part of the future development of information technology. Its main technical feature is to connect objects to the network through communication technology, thereby realizing an intelligent network of human-machine interconnection and object-to-object interconnection.

[0055] The electronic devices in the embodiments of the present application may also be referred to as: terminal equipment, user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent or user device, etc.

[0056] In the embodiments of the present application, the electronic device or each network device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and memory (also known as main memory). The operating system can be any one or more computer operating systems that implement business processing through processes, such as a Linux operating system, a Unix operating system, an Android operating system, an iOS operating system, or a Windows operating system. The application layer includes applications such as browsers, address books, word processing software, and instant messaging software.

[0057] During the assembly of electronic devices, improper assembly may damage the edge of the display screen, causing touch malfunction in the edge area of ​​the display screen. In the case of a display screen with a hole area, the edge area of ​​the display screen includes the outer edge area of ​​the display screen and the inner edge area of ​​the display screen.

[0058] The outer edge area of ​​the display screen can be understood as the area on the display screen that intersects with the outer edge of the display screen, and the inner edge area of ​​the display screen can be understood as the area on the display screen that surrounds the hole area.

[0059] In some implementations, to reduce the incidence of electronic devices with abnormal touch functionality entering the market, after a display screen is mounted on an electronic device, a first test method is used to test the touch functionality of the outer edge of the display screen of the electronic device to screen out display screens with abnormal touch functionality. It should be understood that electronic devices equipped with display screens with abnormal touch functionality are considered electronic devices with abnormal touch functionality.

[0060] Figure 1A schematic diagram of a touch screen circle drawing test method provided in an embodiment of the present application is shown.

[0061] When the electronic device receives the operation of starting the touch screen test, the electronic device can display Figure 1 The interface shown in a. Figure 1 The interface shown in a in the figure includes multiple first marks 101, a hole area a 102, a hole area b 103 and the name of the test item located in the outer edge area of ​​the display screen. The first mark 101 can be used to identify the test unit, and the first mark 101 can also be used to indicate the path of the circle test. The name of the test item is, for example Figure 1 The touch screen test shown in a in FIG.

[0062] Display on electronic devices Figure 1 In the case of the interface shown in a, the user can follow Figure 1 Circle the first mark 101 in the interface shown in a.

[0063] When a circle operation is received, if the touch function of the test unit corresponding to the first mark 101 is normal, the electronic device can display Figure 1 The interface shown in b in the figure. Figure 1 The interface shown in b in the figure includes a first view 104 indicating that the touch function of the outer edge area of ​​the display screen is normal, a hole area a 102, a hole area b 103, and the name of the test item. The first view 104 may include multiple second identifiers located in the outer edge area of ​​the display screen. The second identifier can be used to identify a test unit with normal measurement and control functions. It should be understood that when the user draws a circle, the electronic device can receive a touch event corresponding to the circle operation at a preset frequency. The touch event includes a touch position. The electronic device can display a second identifier at the touch position based on the touch position in the touch event.

[0064] like Figure 1 As shown in a and b in Figure 1, the touch screen circle test can detect the touch function of the outer edge area of ​​the display screen to screen out electronic devices with abnormal touch function in the outer edge area of ​​the display screen. However, the touch function of the inner edge area of ​​the display screen may also be damaged due to assembly. The inner edge area of ​​the display screen, for example: around Figure 1 The area of ​​the hole area a shown in a and the area around Figure 1 The area of ​​the hole b shown in a in the figure. The touch screen circle test method cannot detect the touch function of the inner edge area of ​​the display screen, and thus cannot screen out electronic devices with abnormal touch function in the inner edge area of ​​the display screen.

[0065] In view of this, an embodiment of the present application proposes a display method. When an electronic device receives an operation to start a touch screen test, the electronic device can display multiple first identifiers located in the inner edge area of ​​the display screen to prompt the user to draw circles along the first identifiers. This can detect the touch function of the inner edge area of ​​the display screen, reduce the probability of electronic devices with abnormal touch functions in the inner edge area of ​​the display screen not being screened out, and further reduce the probability of electronic devices with abnormal touch functions entering the market.

[0066] It is understandable that the display method provided in the embodiment of the present application can be used for testing the touch function of a display screen.

[0067] Figure 2 A schematic diagram of a flow chart of a touch function test provided in an embodiment of the present application is shown.

[0068] like Figure 2 As shown, touch function testing can include:

[0069] S201: The electronic device may receive an operation to start a touch function test.

[0070] S202, the electronic device can obtain the resolution of the display screen (h p ×w p ), the pixel density of the display (pixels per inch, PPI) and the aspect ratio of the display λ.

[0071] Among them, h p It can be the vertical resolution of the display. p It can be the horizontal resolution of the display. PPI can also be called pixels per inch.

[0072] Based on the vertical resolution of the display h p , horizontal resolution of the display w p , the pixel density PPI of the display and the aspect ratio λ of the display determine the width W of the display. The width W of the display satisfies the following formula:

[0073]

[0074] The height H of the display screen is determined based on the width W of the display screen and the aspect ratio λ of the display screen. The height H of the display screen satisfies the following formula:

[0075] H=λW.

[0076] For example, PPI also satisfies the following formula:

[0077]

[0078] Among them, d pis the diagonal resolution of the display. J is the diagonal length of the display screen. In one embodiment of the present application, the resolution, aspect ratio, and diagonal length of the display screen may be preset in the display screen by the display screen manufacturer. The electronic device may obtain the resolution, aspect ratio, and diagonal length of the display screen, and then obtain the width and height of the display screen based on the resolution, aspect ratio, and diagonal length of the display screen.

[0079] S203 : Based on the height H and width W of the display screen, the electronic device may determine the number M of rows and the number N of columns of the display screen.

[0080] Among them, M satisfies the formula: N satisfies the formula: | | * Indicates rounding to the nearest integer. δ2 is a preset value. The value of δ2 can satisfy: the electronic device can obtain at least one touch point in a square area with a side length of δ2 on the display screen. For example, δ2 can be 8 millimeters (mm).

[0081] The display screen is divided into M rows and N columns, and the index of each grid in the grid and the grids corresponding to the display screen is obtained (R j , L j ). Among them, R j =1, 2, 3, ..., M. L j =1,2,3,…,N. j can be the sequence number of the square. j L can be the row number of the row to which the j-th square belongs. j It can be the column number of the column to which the j-th square belongs.

[0082] The multiple grids corresponding to the display screen can be seen in Figure 3 , Figure 3 Schematic diagram showing multiple grids and hole areas of a display screen provided by an embodiment of the present application. For ease of understanding, Figure 3 This is described in step S204.

[0083] S204: The electronic device may obtain the coordinates of the hole area of ​​the display screen in the coordinate system of the display screen.

[0084] The shape of the area represented by the coordinates of the hole-digging area can be a polygon. The polygon can include a regular polygon or an irregular polygon. Regular polygons include triangles, quadrilaterals, pentagons, or hexagons. The embodiment of the present application does not specifically limit the shape of the area represented by the coordinates of the hole-digging area.

[0085] For example, the number of the hole-punch areas of the display screen may be one or more. For example, if the number of the hole-punch areas of the display screen is more than one, the coordinates of the hole-punch areas of the display screen may include the coordinates of each hole-punch area on the display screen. The area represented by the coordinates of the hole-punch areas of the display screen includes the area represented by the coordinates of each hole-punch area.

[0086] For example, assuming that the display screen has one hole-punch area, the hole-punch area is numbered i, and the coordinates of the hole-punch area represent a rectangular area i, the hole-punch area numbered i can be referred to as hole-punch area i. Rectangular area i can include four vertices and four edges. The four vertices are vertex iA, vertex iB, vertex iC, and vertex iD. The four edges are edge iAiB, edge iBiC, edge iCiD, and edge iDiA. Edge iAiB intersects edge iDiA at point iA. Edge iAiB intersects edge iBiC at point iB. Edge iBiC intersects edge iCiD at point iC. Edge iCiD intersects edge iDiA at point iD.

[0087] The coordinates of the hole-punch area of ​​the display screen may include the coordinates of vertex iA ​​and vertex iC. The coordinates of vertex iA ​​may be (x iA ,y iA ). The coordinates of vertex iC can be (x iC ,y iC It should be understood that the coordinates of vertex iA ​​can be expressed as: iA(x iA ,y iA ). The coordinates of vertex iC can be expressed as: iC(x iC ,y iC ).

[0088] For example, the number of the hole-punch areas of the display screen is two, and the hole-punch areas of the display screen include: Figure 3 The hole area 1 and the hole area 2 shown are taken as examples. Figure 3 It includes the coordinate system of the display screen 301, multiple grids corresponding to the display screen 301, the hole area of ​​the display screen 301, and the area represented by the coordinates of the hole area of ​​the display screen 301.

[0089] The hole-punch area of ​​display screen 301 includes hole-punch area 1 302 and hole-punch area 2 304. The coordinates of the hole-punch area of ​​display screen 301 include the coordinates of hole-punch area 1 302 and the coordinates of hole-punch area 2 304. The areas represented by the coordinates of the hole-punch area of ​​display screen 301 include rectangular area 303 represented by the coordinates of hole-punch area 1 302 and rectangular area 305 represented by the coordinates of hole-punch area 2 304. Hole-punch area 1 302 is numbered 1, and hole-punch area 2 304 is numbered 2. The four corner vertices of rectangular area 303 are 1A, 1B, 1C, and 1D, respectively, and the four corner vertices of rectangular area 305 are 2A, 2B, 2C, and 2D, respectively.

[0090] The coordinates of the hole area 1 302 include: 1A (x 1A ,y 1A ) and 1C(x 1C ,y 1C ).

[0091] The coordinates of the second hole area 304 include: 2A(x 2A ,y 2A ) and 2C(x 2C ,y 2C ).

[0092] When step S204 is completed, the electronic device may execute step S205.

[0093] S205 : Based on the coordinates of the hole-digging area, the electronic device may determine a test area at the edge of the hole-digging area.

[0094] The grids may include test grids and non-test grids. A test grid belongs to a test unit. The test area may include multiple test grids. The test area at the edge of the hole-digging area may be understood as the area formed by the multiple test grids surrounding the hole-digging area. The ratio of the ineffective area of ​​the test grid to the area of ​​the grid is less than a first preset value. The ineffective area of ​​the test grid may be the area of ​​the intersection of the test grid and the area represented by the coordinates of the hole-digging area.

[0095] For example, based on the coordinates of the hole area, the information of each square among the multiple squares intersecting with the edge of the area represented by the coordinates of the hole area is determined. The information of the square can be the index of the square or the coordinates of the square. The index of the square includes the row number of the row to which the square belongs and the column number of the column to which the square belongs. The row number and column number are as follows: Figure 3 shown.

[0096] Calculate the invalid area of ​​the target square. The target square is any square among the multiple squares that intersect the edge of the area represented by the coordinates of the hole-digging area. The invalid area of ​​the target square can be: the area where the target square intersects the area represented by the coordinates of the hole-digging area.

[0097] When the ratio of the invalid area of ​​the target square to the area of ​​the square is less than the preset value δ1, the target square is determined to be a test square, and the identifier of the test square is added to the list A.

[0098] When the ratio of the invalid area of ​​the target square to the area of ​​the square is greater than or equal to the preset value δ1, the outer squares of the target square are determined to be test squares, and the identification of the test squares is added to list A. The identification of the target square can also be added to the blacklist.

[0099] The target square's peripheral squares are those adjacent to the target square that do not intersect the area represented by the coordinates of the hole-digging area. The target square's peripheral squares are collinear or collinear with the target square. If the ratio of the target square's inactive area to the square's area is greater than or equal to a preset value δ1, the target square is considered a non-test square. The preset value δ1 can be 25%. The preset value δ1 can also be other values ​​and is not specifically limited in this embodiment of the present application.

[0100] For example, taking the hole area of ​​the display screen including the hole area i as an example, after obtaining the coordinates iA(x iA ,y iA ) and iC(x iC ,y iC ), based on iA(x iA ,y iA ) and iC(x iC ,y iC ), determine the index of the target square among the multiple squares that intersect with the edge of the rectangular area i (R io , L ip ). The target square is any square among the multiple squares that intersect with the edge of the rectangular area i.

[0101] Among them, R io is the row number, L ip is the column number. iC ≤R io ≤R iA , L iA ≤L ip ≤L iC , R iA is the row number of the row to which point iA belongs, R iC L is the row number of the row to which point iC belongs. iA L is the column number of the column to which point iA belongs. iC is the column number of the column to which point iC belongs. Both row and column numbers are integers. d H is the height of the grid, d W is the width of the grid, and || means taking the integer part. H and d W like Figure 3 shown.

[0102] In this way, the index of each square in the multiple squares intersecting with the edge of the rectangular area i can be obtained. Figure 3 The multiple squares shown, the hole area i is Figure 3 Taking the hole area 1 302 as an example, the multiple squares intersecting with the edge of the rectangular area 303 may include: squares (R 1A , L 1A ), Grid(R1A , L 1A +1), Grid (R 1A , L 1C ), Grid(R 1C , L 1C ), Grid(R 1C , L 1A +1) and Square (R 1C , L 1A ). Among them, R 1A and R 1C All are row numbers. 1A , L 1A +1 and L 1C All are column numbers. iA <L iA +1<L iC .

[0103] When the index of the target grid is obtained, the index of the target grid and the coordinates of the digging area are calculated to obtain the invalid area S1 of the target grid. The invalid area S1 of the target grid can satisfy any of the following formulas (1)-(8):

[0104] The index of the target square is (R iA ,L iA ), S1 satisfies formula (1):

[0105] S1=[y iA -(R iA -1)×d H ]×(L iA ×d W -x iA ) (1)

[0106] The index of the target square is (R iA ,L ip ) and L iA <L ip <L iC In the case of , S1 satisfies formula (2):

[0107] S1=[y iA -(R iA -1)×d H ]×d W (2)

[0108] The index of the target square is (R iA ,L iC ), S1 satisfies formula (3):

[0109] S1=[y iA -(R iA -1)×dH ]×[x iC -(L iC -1)×d W ] (3)

[0110] The index of the target square is (R io ,L iC ) and R iC <R io <R iA In the case of , S1 satisfies formula (4):

[0111] S1=d H ×[x iC -(L iC -1)×d W ] (4)

[0112] The index of the target square is (R iC ,L iC ), S1 satisfies formula (5):

[0113] S1=(R iC ×d H -y iC )×[x iC -(L iC -1)×d W ] (5)

[0114] The index of the target square is (R iC ,L ip ) and L iA <L ip <L iC In the case of , S1 satisfies formula (6):

[0115] S1=(R iC ×d H -y iC )×d W (6)

[0116] The index of the target square is (R iC ,L iA ), S1 satisfies formula (7):

[0117] S1=(R iC ×d H -y iC )×(L iA ×d W -x iC ) (7)

[0118] The index of the target square is (R io ,L iA ) and RiC <R io <R iA In the case of , S1 satisfies formula (8):

[0119] S1=d H ×(L iA ×d W -x iC ) (8)

[0120] When the invalid area S1 of the target grid is obtained, it is determined whether the ratio of the invalid area S1 of the target grid to the area S0 of the grid is less than a preset value δ1.

[0121] If so, the target square is determined to be the test square, and the index of the test square is added to list A.

[0122] If not, the target square is determined to be a non-test square, the outer squares of the target square are determined to be test squares, the index of the target square is added to the blacklist, and the index of the outer squares of the target square is added to list A.

[0123] Among them, the area of ​​the grid S0 satisfies the formula: S0 = d H ×d W .

[0124] In this way, multiple test squares can be obtained around the hole area i. If the ratio of the ineffective area of ​​the test square to the area of ​​the square is less than the preset value δ1, it can be indicated that the touch function of the test square will not be damaged by the hole. It is necessary to test the touch function of the test square to reduce the probability of the touch function of the test square not being recognized after being damaged due to assembly or other reasons. Other reasons do not include hole drilling, and other reasons may include transportation.

[0125] For example, the electronic device can press Figure 4 The process shown starts with the square where a vertex of the rectangular area corresponding to the hole area is located. The invalid area of ​​the squares intersecting with the edges of the rectangular area is calculated one by one along the four sides of the rectangular area to obtain multiple test squares surrounding the hole area. For ease of understanding, Figure 4 This will be described later.

[0126] Optionally, still taking the digging area of ​​the display screen including the digging area i as an example, after obtaining the coordinates of the digging area i: iA(x iA ,y iA ) and iC(x iC ,y iC), the electronic device can take the square containing vertex iA ​​as the starting square, and calculate the invalid area of ​​the squares intersecting with the edge of the rectangular area i one by one along the path iA→iB→iC→iD→iA to obtain the invalid area of ​​each square among the multiple squares intersecting with the edge of the rectangular area i.

[0127] For example, the hole area of ​​the display screen still includes Figure 3 Taking the punch hole area 1 302 and the punch hole area 2 304 as an example, the test area surrounding the punch hole area of ​​the display screen may include a test grid surrounding the punch hole area 1 302 and a test grid surrounding the punch hole area 2 304 .

[0128] When the coordinates of the hole area 1 302 and the coordinates of the hole area 2 304 are obtained, the electronic device can determine multiple test squares around the hole area 1 302 based on the coordinates of the hole area 1 302 , and determine multiple test squares around the hole area 2 304 based on the coordinates of the hole area 2 304 .

[0129] The implementation principle for determining multiple test squares surrounding the first hole area 302 based on the coordinates of the first hole area 302 is similar to the implementation principle for obtaining multiple test squares surrounding the second hole area 304 based on the coordinates of the second hole area 304. The implementation principle for determining multiple test squares surrounding the second hole area 304 based on the coordinates of the second hole area 304 is similar to the implementation principle for obtaining multiple test squares surrounding the second hole area 304 based on the coordinates of the second hole area 304.

[0130] When the electronic device completes step S205 , the electronic device may perform step S206 .

[0131] S206: The electronic device may determine a test area at the outer edge of the display screen.

[0132] For example, the test area at the outer edge of the display screen can be understood as an area consisting of multiple test squares intersecting the outer edge of the display screen. The electronic device can determine, from the multiple squares corresponding to the display screen, a square whose index satisfies at least one of the following conditions as a test square: j =1, R j =M,L j =1 or L j = N. j is the serial number of any square in the multiple squares of the display screen. j is the row number of the row to which square j belongs. j is the column number of the column to which square j belongs.

[0133] The electronic device may add the index of the test square to list A.

[0134] When the electronic device completes step S206 , the electronic device may perform step S207 .

[0135] Optionally, step S205 and step S206 may be executed concurrently. When step S205 and step S206 are both completed, the electronic device may execute step S207.

[0136] S207. The electronic device may merge the test areas.

[0137] For example, the index of the target grid is still (R io , L ip ) as an example, the electronic device can list A that does not satisfy 1≤R io ≤M and / or does not satisfy 1≤L ip The indexes ≤ N are cleared to obtain a cleared list A. The cleared list A can be called list B. The electronic device can clear the indexes in list B that are the same as the indexes in the blacklist to obtain a cleared list B. The cleared list B can be called list C.

[0138] The grids corresponding to the indices in List C form the test area for testing the display's touch functionality. List C can be used to draw a test interface for testing the display's touch functionality. List C includes test grids that form the test area at the outer edge of the display and test grids that form the test area at the edge of the hole-punch area, merging the test areas at the outer edge of the display with the test areas at the edge of the hole-punch area.

[0139] Index does not satisfy 1≤R io ≤M and / or does not satisfy 1≤L ip If ≤N, the grid corresponding to the index exceeds the boundaries of the display. The index corresponding to the grid can be cleared to reduce its impact on the drawing of subsequent test interfaces. The grid corresponding to the index in the blacklist is a non-test grid. Clearing the index in list B that matches the blacklist index can reduce the impact of the non-test grid index on the drawing of subsequent test interfaces.

[0140] Optionally, the electronic device may concurrently execute the steps of clearing the indexes of the squares in list A that are beyond the border of the display screen and clearing the indexes in list A that are identical to the indexes in the blacklist to obtain list C.

[0141] Optionally, if a display screen includes multiple punch-hole areas, List A may contain multiple identical indexes. For example, if a display screen includes two punch-hole areas and List A contains two identical indexes, where these two identical indexes are referred to as duplicate indexes, before obtaining List A after clearing, the electronic device may calculate the duplicate index and the coordinates of one of the two punch-hole areas to obtain an invalid area corresponding to the duplicate index, and calculate the duplicate index and the coordinates of the other of the two punch-hole areas to obtain another invalid area corresponding to the duplicate index. The electronic device may determine whether the ratio of the sum of the invalid area corresponding to the duplicate index and the other invalid area to the grid area is less than a preset value δ1. If the ratio of the sum of the invalid area corresponding to the duplicate index and the other invalid area to the grid area is less than the preset value δ1, the grid corresponding to the duplicate index is a test grid, and the duplicate index in List A may be retained. If the ratio of the sum of the invalid area corresponding to the duplicate index and the other invalid area to the grid area is greater than or equal to the preset value δ1, the grid corresponding to the duplicate index is determined to be a non-test grid, and the duplicate index in List A may be cleared. In this way, the accuracy of subsequent touch function tests can be improved.

[0142] S208: The electronic device may initialize a test interface for performing a touch function test.

[0143] For example, the electronic device may draw an image 1 of a touch function test. The image 1 may include information about a test item. The information about the test item may be a name of the test item, such as a touch screen test.

[0144] S209. The electronic device may display a test interface.

[0145] For example, the electronic device may draw a first marker corresponding to the test square associated with list C to obtain image 2. The first marker may be used to identify the test square. For example, the first marker may be used to identify the center point of the test square.

[0146] The electronic device may synthesize image 1 and image 2 to obtain a test interface, and may display the test interface.

[0147] The test interface can be found in Figure 5 The interface shown in a in the figure is as follows. For ease of understanding, Figure 5 This will be described later.

[0148] For example, the index of the test square k is (R k , L k ) as an example, the center point coordinates of test square k (x k ,y k) satisfies: x k =(L k -0.5)×d w , and y k =(R k -0.5)×d H .

[0149] S210: The electronic device can receive a circle drawing operation.

[0150] For example, taking the example of a user drawing a circle on a display screen with a finger, when the electronic device displays a test interface, the user can touch the display screen and move the finger along the path indicated by the multiple first identifiers to draw a circle.

[0151] The electronic device may receive a touch event indicating an operation on the test grid at a preset frequency. The electronic device may display a second marker at a location corresponding to the touch event. The area of ​​the second marker may be equal to the area of ​​the grid.

[0152] It should be understood that if the touch function of the target test square is abnormal and the electronic device cannot receive the touch event corresponding to the operation applied to the target test square, the second indicator will not be displayed at the corresponding position of the target test square. The target test square can be any test square with abnormal touch function among the multiple test squares corresponding to List C.

[0153] S211. The electronic device may determine whether the test is completed.

[0154] If the test is completed, the electronic device may execute S212 .

[0155] If the test is not completed, the electronic device may continue to execute S210.

[0156] Exemplarily, when the electronic device displays the second identifier, the electronic device may further delete the index of the test square corresponding to the second identifier from list C. When the electronic device displays the second identifier, the electronic device may determine whether list C contains the index.

[0157] If included, it may indicate that the test is not completed, and the electronic device may control the test application not to exit and keep executing S210.

[0158] If not, it means the test is completed, and then S212 is executed.

[0159] S212: The test application exits.

[0160] Exemplarily, when the electronic device determines that list C does not contain an index, the electronic device may control the test application to stop running, so that the test application exits the foreground.

[0161] like Figure 2In the illustrated embodiment, when the electronic device receives an operation to start a touch function test, the electronic device can calculate the resolution, pixel density, and aspect ratio of the display screen to obtain the width and height of the display screen, and then obtain the number of rows and columns of the display screen based on the width and height of the display screen. The electronic device can use the number of rows and columns to divide the display screen into multiple grids. The electronic device can determine multiple test grids surrounding the hole-punch area from the multiple grids based on the coordinates of the hole-punch area on the display screen. The electronic device also determines multiple test grids included in the test area at the outer edge of the display screen from the multiple grids. The electronic device uses List A to record the indexes of the test grids. The electronic device clears the indexes of the test squares that exceed the boundaries of the display screen from the multiple test squares corresponding to List A, and also clears the test squares that are determined to be non-test squares (such as the test squares corresponding to the blacklist) based on the coordinates of the hole-punch area from the multiple test squares corresponding to List A, to obtain List C. The electronic device can display the first identifiers corresponding to each of the multiple test squares corresponding to List C. When an operation is received on the test square corresponding to the first identifier, the electronic device can display a second identifier indicating that the touch function of the test square corresponding to the operation is normal, so as to detect the touch function of the test square, and further identify the electronic device with abnormal touch function. It should be understood that the multiple first identifiers corresponding to List C displayed by the electronic device include a first identifier displayed in the outer edge area of ​​the display screen and a first identifier displayed in the inner edge area of ​​the display screen (i.e., the area surrounding the hole-punch area on the display screen). In this way, the touch function of the outer edge area of ​​the display screen can be detected, and the touch function of the inner edge area of ​​the display screen can also be detected, thereby reducing the probability of electronic devices with abnormal touch function not being identified.

[0162] Figure 4 A schematic diagram of the test grid determination process provided in an embodiment of the present application is shown.

[0163] like Figure 4 As shown, the determination process of the test grid may include S201, S204 and S401-S411. The specific implementation principles of S201 and S204 can be found in Figure 2 The embodiments shown will not be described in detail here.

[0164] S401: Initialize the direction list.

[0165] The direction list may include multiple flags, which may be used to indicate the order in which the invalid areas of multiple squares surrounding the hole area are calculated.

[0166] For example, taking the direction list including a first flag bit, a second flag bit, a third flag bit, and a fourth flag bit as an example, the electronic device may maintain the identifier of the first flag bit as a first value, maintain the identifier of the second flag bit as a second value, maintain the identifier of the third flag bit as a third value, and maintain the identifier of the fourth flag bit as a fourth value.

[0167] Still using multiple squares on the display as Figure 3 The multiple grids shown in the figure include a hole area i, which is Figure 3 Taking the illustrated hole area 1 302 as an example, the first value may represent the calculation order along the direction of edges 1A1B, the second value may represent the calculation order along the direction of edges 1B1C, the third value may represent the calculation order along the direction of edges 1C1D, and the fourth value may represent the calculation order along the direction of edges 1D1A. The direction of edges 1A1B → edges 1B1C → edges 1C1D → edges 1D1A may be referred to as the lower-right and upper-left direction.

[0168] S402: Determine the target square.

[0169] Exemplarily, the electronic device may read the identifier of the flag bit in the direction list by traversing the identifier of the first flag bit, the identifier of the second flag bit, the identifier of the third flag bit, and the identifier of the fourth flag bit in the direction list.

[0170] For example, when the direction list includes a first value, a second value, a third value, and a fourth value, the electronic device can read the identifier of the first flag bit to obtain the first value. When the direction list includes a second value, a third value, and a fourth value, the electronic device can read the identifier of the second flag bit to obtain the second value. When the direction list includes a third value and a fourth value, the electronic device can read the identifier of the third flag bit to obtain the third value. When the direction list includes a fourth value, the electronic device can read the identifier of the fourth flag bit to obtain the fourth value.

[0171] It should be understood that when the direction list does not include the first value, the second value, the third value, and the fourth value, the electronic device cannot obtain the identification of the flag bit in the direction list.

[0172] Still taking the example that the display screen includes a hole area i, and the coordinates of the hole area i include the coordinates of the vertex iA, when the first value is obtained and the coordinates of the hole area i are obtained, the electronic device can determine the square (R iA , L iA ) is the target square. It should be understood that (R iA , L iA ) is the index of the square containing point iA.

[0173] S403: Determine whether the invalid area ratio of the target grid is less than a preset value δ1.

[0174] If not, the electronic device may execute S404.

[0175] If so, the electronic device may execute S405.

[0176] For example, the electronic device can calculate the invalid area S1 of the target grid and determine the invalid area ratio of the target grid. Is it less than δ1?

[0177] If not, the electronic device may execute S404.

[0178] If so, the electronic device may execute S405.

[0179] The calculation principle of the target square's invalid area S1 can be found in Figure 2 The calculation principle of the invalid area S1 of the target grid shown in S205 will not be repeated here.

[0180] S404: If the invalid area ratio of the target square is greater than or equal to a preset value δ1, the electronic device may add the index of the square obtained by moving the target square outward by one square to list A. The electronic device may also add the index of the target square to a blacklist, so as to use the blacklist to clean the indexes in list A, reduce the probability of testing non-test squares, and improve test accuracy.

[0181] Exemplarily, based on the index of the target square, the surrounding squares of the target square are determined, and the indexes of the surrounding squares of the target square are added to list A.

[0182] The index of the target square is (R io , L ip ) as an example, when the first value is read, the index of the outer grid of the target grid is determined to be (R io +1, L ip ).

[0183] When the second value is read, the index of the peripheral grid of the target grid is determined to be (R io , L ip +1).

[0184] When the third value is read, the index of the peripheral grid of the target grid is determined to be (R io -1, L ip ).

[0185] When the fourth value is read, the index of the peripheral grid of the target grid is determined to be (R io , L ip -1).

[0186] For example, the display screen still includes a hole area i, the coordinates of the hole area i include the coordinates of the vertex iA, and the index of the square containing the vertex iA ​​is (R iA , L iA ) as an example, if the index of the target square is (R iA , L iA ), and the target square is obtained when the first value is read, the index of the outer square of the target square is determined to be (R iA +1, L iA ).

[0187] S405 : When the invalid area ratio of the target square is less than a preset value δ1 , the electronic device may add the index of the target square to list A.

[0188] S406: The electronic device may determine whether the target square exceeds the area boundary represented by the coordinates of the digging area.

[0189] If not, execute S407.

[0190] If so, execute S408.

[0191] For example, taking the area represented by the coordinates of the hole-digging area as a rectangular area, the electronic device may determine whether the target square contains the vertices of the rectangular area corresponding to the hole-digging area.

[0192] If not, it means that the target square does not exceed the boundary of the rectangular area corresponding to the hole-digging area, and the electronic device can execute S407.

[0193] If not, it means that the target square exceeds the boundary of the rectangular area corresponding to the hole-digging area, and the electronic device can execute S408.

[0194] For example, the target grid (R io , L ip ) is obtained when the first value is read as an example, the electronic device can determine L iA ×d w Is it greater than x iA Target square (R io , L ip )

[0195] If not, it means that the target square does not exceed the boundary of the rectangular area corresponding to the hole-digging area, and the electronic device can execute S407.

[0196] If so, it means that the target square exceeds the boundary of the rectangular area corresponding to the hole-digging area, and the electronic device can execute S408.

[0197] S407: When the target square does not exceed the region boundary represented by the coordinates of the hole-digging area, the electronic device may determine the next target square based on the identifier read from the direction list most recently.

[0198] The electronic device determines the next target square based on the identifier most recently read from the direction list, which can be referred to as the electronic device moving in a set direction to determine the next target square.

[0199] For example, the target grid index in S406 is still (R io , L ip ) as an example, in the target square (R io , L ip ) does not exceed the area boundary represented by the coordinates of the hole-digging area, the electronic device can be based on (R io , L ip ) and the identifier of the most recently read direction list, the next target square is determined as follows:

[0200] When the identifier of the direction list read the most recently is the first value, the index of the next target square is (R io , L ip +1).

[0201] When the identifier of the direction list read the most recently is the second value, the index of the next target square is (R io -1, L ip ).

[0202] When the identifier of the direction list read the most recently is the third value, the index of the next target square is (R io , L ip -1).

[0203] When the identifier of the direction list read the most recently is the third value, the index of the next target square is (R io +1, L ip ).

[0204] When step S407 is completed, the electronic device may execute S403 to determine whether the invalid area ratio of the next target square is less than a preset value δ1.

[0205] S408: When the target square exceeds the region boundary represented by the coordinates of the digging area, the electronic device may clear the target identifier in the direction list, and may read the identifier of the flag bit in the direction list after the target identifier is cleared.

[0206] The target identifier is the identifier most recently read by the electronic device from the direction list.

[0207] If the flag in the direction list is read, it may indicate that the direction list contains an identifier indicating the calculation order, or that there is a next direction in the direction list, and the electronic device may execute S409. The flag in the direction list may be, for example, the first value, the second value, the third value, or the fourth value.

[0208] If the identifier of the flag bit in the direction list is not read, it may indicate that the direction list does not contain an identifier indicating the calculation order, or that there is no next direction in the direction list, and the electronic device may execute S410.

[0209] S409: When the identification of the flag in the direction list is read, the electronic device may determine the next target square based on the identification of the flag in the direction list.

[0210] For example, the electronic device may determine the index of the next target square based on the target square index in S406 and the identifier of the direction list read in S408. The specific implementation principle can be referred to the electronic device in S407 based on (R io , L ip ) and the identifier of the direction list read most recently determine the specific implementation principle of the next target square, which will not be repeated here.

[0211] S410: When the identifier of the flag bit in the direction list is not read, the electronic device may determine whether there is a next hole-digging area.

[0212] If yes, the electronic device may execute S401.

[0213] If not, the electronic device may execute S411.

[0214] For example, a display screen such as Figure 3 Taking the display screen 301 shown as an example, when the electronic device obtains the coordinates of the hole area 1 302 and the hole area 2 304 of the display screen 301, the electronic device can add the identifiers of the hole area 1 302 and the hole area 2 304 to the list D.

[0215] In the case where the identification of the flag bit in the direction list is not read, the electronic device may clear the identification of the hole-punch area 1 302 in list D.

[0216] The electronic device can read the identifiers of the hole-punch areas in Table D.

[0217] If the identifier of the hole area in list D is read, the electronic device may execute S401 using the coordinates of the hole area corresponding to the read identifier of the hole area.

[0218] If the identifier of the hole-punch area in List D is not read, the electronic device may execute S206 or S207.

[0219] like Figure 4 In the illustrated embodiment, when a display screen includes multiple hole-punch areas, the electronic device can, based on the coordinates of a target hole-punch area, calculate the invalid areas of the squares intersecting the edges of the area represented by the coordinates of the hole-punch area one by one along the edges of the area represented by the coordinates of the hole-punch area, starting from a square corresponding to a vertex of the area represented by the coordinates of the hole-punch area as a starting square, thereby determining multiple test squares surrounding the target hole-punch area. The target hole-punch area is any one of the multiple hole-punch areas corresponding to the display screen.

[0220] Figure 5 A schematic diagram of a touch function test scenario provided in an embodiment of the present application is shown.

[0221] When receiving the operation of starting the touch function test, the electronic device can display the following Figure 5 The test interface shown in a. Figure 5 The interface shown in a in FIG, may include: multiple first identifications 101 located in the outer edge area of ​​the display screen, multiple first identifications 101 located in the inner edge area of ​​the display screen, a hole area a 102, a hole area b 103 and the name of the test item.

[0222] Display on electronic devices Figure 5 In the case of the interface shown in a, the user can follow Figure 5 Circle the first mark 101 in the interface shown in a.

[0223] When a circle operation is received, if the touch function of the test unit corresponding to the first mark 101 is normal, the electronic device can display Figure 5 The interface shown in b in the figure. Figure 5 The interface shown in b in FIG. 5 includes a second view 501 indicating that the touch functions of both the outer edge area and the inner edge area of ​​the display screen are normal, a punch hole area a 102, a punch hole area b 103, and the name of the test item. The second view may include multiple second identifiers located in the outer edge area of ​​the display screen and multiple second identifiers located in the inner edge area of ​​the display screen.

[0224] like Figure 5In the illustrated embodiment, when an operation to start the touch function test is received, the interface displayed by the electronic device includes multiple first identifiers located in the outer edge area of ​​the display screen and multiple first identifiers located in the inner edge area of ​​the display screen, so as to prompt the user to detect the touch function of the outer edge area of ​​the display screen and the touch function of the inner edge area of ​​the display screen. By drawing circles along the path prompted by the first identifier displayed on the electronic device, the touch function of the outer edge area of ​​the display screen is detected, and the touch function of the inner edge area of ​​the display screen is also detected, which can reduce the probability of electronic devices with abnormal touch functions not being identified.

[0225] Figure 6 Another flow chart of the touch function test provided in an embodiment of the present application is shown.

[0226] like Figure 6 As shown, still taking the display screen including the hole area as an example, the touch function test may include:

[0227] S601: The electronic device may receive an operation to start a touch function test.

[0228] S602: The electronic device may obtain information about the display screen, which may include type information indicating the type of the display screen.

[0229] S603: When the electronic device obtains type information indicating the type of the display screen, the electronic device may read and parse a configuration file corresponding to the type information and display a test interface on the display screen. The test interface may include multiple first identifiers corresponding to the configuration file.

[0230] The configuration file may include information about multiple test grids. The information about the multiple test grids in the configuration file may be preset. The identifier of the configuration file may include type information indicating the type of display screen. The type information indicating the type of display screen may be product specification information. The identifier of the configuration file may be the name of the configuration file.

[0231] The information of multiple test grids in the configuration file can also be obtained through the methods shown in S6031-S6033:

[0232] S6031: When information about a plurality of squares corresponding to the display screen and each of the plurality of squares is obtained, the electronic device may display the plurality of squares on the display screen.

[0233] S6032: The electronic device may receive an operation acting on the target square. When the operation acting on the target square is received, the electronic device determines that the target square is a test square.

[0234] In this way, the electronic device can obtain a plurality of test squares located in the outer edge area of ​​the display screen and a plurality of test squares located in the inner edge area of ​​the display screen.

[0235] S6033: The electronic device may configure the obtained information of the multiple test grids and the test type information into a configuration file.

[0236] The information of the multiple test squares may include information of each test square in the multiple test squares.

[0237] Exemplarily, the electronic device may configure the information of the plurality of test grids and the test type information into key-value pairs, and then add the key-value pairs to the configuration file.

[0238] The electronic device may also configure the number of rows and columns used to divide the display screen into a plurality of grids into key-value pairs and add the key-value pairs to the configuration file.

[0239] The following are examples of key-value pairs:

[0240] value="24" key="XXXX.touch_screen_rows".

[0241] value="11" key="XXXX.touch_screen_columns".

[0242] value="1653461,4534334,45" key="XXXX.touch_screen_points".

[0243] Among them, value="1653461,4534334,45" key="XXXX.touch_screen_points" can indicate that in this key-value pair, the value is 1653461,4534334,45, and the key is XXXX.touch screen points. 1653461,4534334,45 can represent information about multiple test squares. XXXX.touch_screen_ can indicate that the test type is a touch function test. XXXX can be the identifier of the application corresponding to the touch function test. value="1653461,4534334,45" key="XXXX.touch screen points" can indicate that the touch screen test points of the touch function test of the display screen include the first identifier corresponding to each test square in the multiple test squares represented by 1653461,4534334,45.

[0244] value="24" key="XXXX.touch_screen_rows" can indicate that the number of rows for the touch function test of the display screen is 24. value="11" key="XXXX.touch_screen_columns" can indicate that the number of columns for the touch function test of the display screen is 11. value="24" key="XXXX.touch_screen_rows" and value="11" key="XXXX.touch_screen_columns" can be used to determine the display position of the first identifier.

[0245] 1653461, 4534334, and 45 are long arrays. A long array can be converted from two-dimensional matrix information representing information about multiple test squares. Alternatively, the configuration file can be in Extensible Markup Language (XML) format.

[0246] Alternatively, the configuration file can be prefabricated into a test set containing multiple configuration files, where the test set includes an identifier indicating the test set version. This facilitates management of the configuration files. It is understood that the test set may include an identifier for each of the multiple configuration files.

[0247] When the electronic device obtains type information indicating the type of the display screen, the electronic device may read and parse key-value pairs in a configuration file corresponding to the type information, and display a plurality of first identifiers corresponding to the configuration file on the display screen.

[0248] S604: When the electronic device displays multiple first identifiers, the electronic device may receive a circle-drawing operation to implement a circle-drawing test.

[0249] like Figure 6 In the embodiment shown, the information of the test squares corresponding to the target display screens in different types of display screens and the target type information representing the type of the target display screen can be configured into a configuration file in a preset manner. In this way, different configuration files can be corresponding to different types of display screens. When an operation to start the touch function test is received and the target type information is obtained, the electronic device can read and parse the key-value pairs in the configuration file corresponding to the target type information to display multiple first identifiers corresponding to the target type information, thereby realizing the detection of the touch function of the outer edge area of ​​the target display screen and the detection of the touch function of the inner edge area of ​​the target display screen. In addition, since the multiple test squares corresponding to the target display screen are preset, the amount of calculation required by the electronic device to determine the multiple test squares of the target display screen can be reduced.

[0250] Figure 7 A schematic structural diagram of an electronic device 100 provided in an embodiment of the present application is shown.

[0251] like Figure 7 As shown, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0252] It should be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0253] For example, touch sensor 180K may receive an operation to activate a touch function test. Touch sensor 180K may transmit information indicating activation of the touch function test to processor 110. Processor 110 may control display screen 194 to display a first interface. The first interface includes multiple first identifiers, each of which is used to identify multiple test units. The display screen includes a hole-punch area, and the multiple test units include units surrounding the hole-punch area.

[0254] When the display screen 194 displays the first interface, the touch sensor 180K may receive an operation performed on a target test unit. The touch sensor 180K may transmit information indicating that the target test unit has been touched to the processor 110. The processor 110 may display a second identifier indicating a test result of the test unit. The target test unit is any one of the multiple test units.

[0255] In this way, since multiple test units include units surrounding the hole area, when the electronic device displays multiple first identifiers corresponding to multiple test units, the touch function of the area surrounding the hole area on the display screen can be detected, reducing the probability of electronic devices with abnormal touch function in the area surrounding the hole area on the display screen not being identified.

[0256] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, the Android system with a layered architecture is used as an example to illustrate the software structure of the electronic device 100.

[0257] Figure 8 A schematic diagram related to the software architecture of an electronic device according to an embodiment of the present application is shown.

[0258] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers: the application layer, the application framework layer, the hardware abstraction layer (HAL), and the kernel layer.

[0259] The application layer can include a series of application packages.

[0260] like Figure 8 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, first application or second application. The first application may also be called a man-machine interface test application (MMI test). The second application may also be called a touch panel & liquid crystal display test application (TPLCD test).

[0261] The first application may be used to implement a test on the touch function of a display screen mounted on the electronic device 100 .

[0262] The second application can be used to implement a touch function test of a display screen connected to the electronic device 100. The display screen connected to the electronic device 100 can be of the same type as the display screen mounted on the electronic device 100, or can be of a different type than the display screen mounted on the electronic device 100.

[0263] The application framework layer provides an application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0264] like Figure 8 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager or a display framework, etc.

[0265] The display frame may include a first display module, a first information module and a first touch module.

[0266] The first display module can be used to transmit image information for display on the display screen.

[0267] The first information module can be used to transmit display screen parameters or display screen information, etc.

[0268] The first touch module can be used to transmit touch information, such as touch events.

[0269] The hardware abstraction layer may include a display screen abstraction module. The display screen abstraction module may include a second display module, a second information module, a second touch control module, and a HAL interface.

[0270] The second display module can be used to transmit image information for display on the display screen.

[0271] The second information module can be used to transmit display screen parameters or display screen information, etc.

[0272] The second touch module can be used to transmit touch information, such as touch events.

[0273] The kernel layer is the layer between hardware and software. The kernel layer includes at least the display driver, camera driver, audio driver, sensor driver, etc. The display driver can also be called the display device driver.

[0274] The hardware may include at least one display screen.

[0275] For example, the hardware may include a display screen A and a display screen B. Display screen A may be a display screen mounted on the electronic device 100. Display screen B may be a display screen connected to the electronic device 100. The type of display screen A and the type of display screen B may be different.

[0276] For example, taking the example that display screen A can display a first icon corresponding to a first application and can also display a second icon corresponding to a second application, when display screen A displays the first icon, the user can perform a first touch operation on the first icon.

[0277] The sensor driver may receive an interrupt corresponding to the first touch operation. The kernel layer may transmit a touch event corresponding to the first touch operation to the first application via the HAL interface, the second touch control module, and the first touch control module. The touch event may include information such as the touch location and timestamp.

[0278] When receiving a touch event corresponding to the first touch operation, the first application can obtain the resolution of display A, the pixel density of display A, the aspect ratio of display A and the coordinates of the hole area c on display A from display A through the first information module, the second information module, the HAL interface and the display driver.

[0279] The first application may determine multiple test squares located in the outer edge region of display A and multiple test squares located in the inner edge region of display A based on the resolution of display A, the pixel density of display A, the aspect ratio of display A, the preset value δ2, the coordinates of the cutout region c, and the preset value δ1. The inner edge region of display A may be understood as the region surrounding the cutout region c on display A. The specific implementation principles of the first application determining the multiple test squares located in the outer edge region of display A and the multiple test squares located in the inner edge region of display A can be found in the specific implementation principles of S202-S207 and are not further described here.

[0280] The first application can draw image 3 and image 4. Image 3 can include test item information. Image 4 can include multiple first identifiers corresponding to multiple test squares associated with display screen A. The first application can synthesize image 3 and image 4 to obtain image 5. The first application can transmit the image 5 information to the display driver via the first display module, the second display module, and the HAL interface. The display driver can transmit the image 5 information to display screen A. Display screen A can display image 5.

[0281] When the display screen A displays the image 5 , the user can perform a circle drawing operation along the paths indicated by the multiple first identification prompts in the image 5 .

[0282] The sensor driver may receive an interrupt corresponding to a second touch operation. The second touch operation is a touch operation on a test square corresponding to the first identifier. The kernel layer may transmit a touch event corresponding to the second touch operation to the first application via the HAL interface, the second touch module, and the first touch module.

[0283] The first application can draw image 6, which can include a second identifier. The first application can combine image 5 and image 6 to generate image 7. Image 7 includes the second identifier located at the touch location corresponding to the touch event of the second touch operation. The first application can transmit information about image 5 to the display driver via the first display module, the second display module, and the HAL interface. The display driver can transmit information about image 7 to display screen A. Display screen A can display image 7.

[0284] In this way, the touch function of the inner edge area of ​​the display screen A can be detected, which can reduce the probability that the touch function of the inner edge area of ​​the display screen A is abnormal but not recognized.

[0285] When the display screen A displays the second icon, the user may perform a third touch operation on the second icon.

[0286] The sensor driver may receive an interrupt corresponding to the third touch operation. The kernel layer may transmit a touch event corresponding to the third touch operation to the second application through the HAL interface, the second touch control module, and the first touch control module.

[0287] Taking display screen B including the punched hole area d as an example, upon receiving a touch event corresponding to the third touch operation, the second application may determine multiple test squares located in the outer edge area of ​​display screen B and multiple test squares located in the inner edge area of ​​display screen B. The inner edge area of ​​display screen B can be understood as the area surrounding the punched hole area d on display screen B. The specific implementation principles for the second application determining the multiple test squares located in the outer edge area of ​​display screen B and the multiple test squares located in the inner edge area of ​​display screen B can be referenced to the specific implementation principles for the first application determining the multiple test squares located in the outer edge area of ​​display screen A and the multiple test squares located in the inner edge area of ​​display screen A, and will not be further elaborated here.

[0288] The second application can draw a composite image 8. Image 8 can include test item information and multiple first identifiers corresponding to multiple test squares associated with display screen B. The second application can transmit the information about image 8 to the display driver via the first display module, the second display module, and the HAL interface. The display driver can transmit the information about image 8 to display screen B. Display screen B can display image 8.

[0289] When the display screen B displays the image 8 , the user can perform a circle drawing operation along the paths indicated by the multiple first identification prompts in the image 8 .

[0290] The sensor driver may receive an interrupt corresponding to a fourth touch operation. The fourth touch operation is a touch operation on a test square corresponding to the first identifier displayed on display screen B. The kernel layer may transmit a touch event corresponding to the fourth touch operation to the first application via the HAL interface, the second touch module, and the first touch module.

[0291] The second application can draw image 9, which can include a second identifier. The second application can synthesize image 8 and image 9 to obtain image 10. Image 10 includes the second identifier located at the touch location corresponding to the touch event of the fourth touch operation. The second application can transmit information about image 5 to the display driver via the first display module, the second display module, and the HAL interface. The display driver can transmit information about image 10 to display screen B. Display screen B can display image 10.

[0292] In this way, the touch function of the inner edge area of ​​the display screen B can be detected, which can reduce the probability that the touch function of the inner edge area of ​​the display screen B is abnormal but not recognized.

[0293] like Figure 8 The embodiment shown uses the display method provided in the embodiment of the present application to detect the touch function of a display screen assembled on an electronic device, and can also detect the touch function of a display screen that is not assembled on an electronic device.

[0294] It is understandable that the first touch operation and the third touch operation are both operations for starting the touch function test. The resolution, pixel density, aspect ratio and type information of the display screen can all be preset in the display screen by the display screen manufacturer.

[0295] The present application also provides a display method, which may include:

[0296] A first interface is displayed on a display screen, the first interface includes a plurality of first identifiers, the plurality of first identifiers are used to identify a plurality of test units, the display screen includes a hole area, and the plurality of test units include units surrounding the hole area.

[0297] An operation acting on a target test unit is received, and a second identifier for indicating a test result of the test unit is displayed, where the target test unit is any one of the multiple test units.

[0298] For example, in the embodiment of the present application, the first interface may be Figure 2 The test interface in the embodiment. The unit can be Figure 2 The test unit can be Figure 2 The test grid in the embodiment. The hole area included in the display screen can be Figure 2In the embodiment, the hole area serial number is the hole area i or the hole area i. The second identifier is, for example Figure 2 The specific implementation principle of the embodiment of this application can be compared with Figure 2 The specific implementation principle of the embodiment is similar. Figure 3 The display screen 301 shown in the figure, the display screen in the embodiment of the present application includes a hole area, for example: Figure 3 The hole area 1 302 and the hole area 2 304 are shown.

[0299] For example, in the embodiment of the present application, the first interface may be Figure 6 The test interface in the embodiment. The test unit can be Figure 6 The test grid in the embodiment. The hole area included in the display screen can be Figure 6 In the embodiment, the display screen includes a hole-punch area. The second mark is, for example, Figure 6 The specific implementation principle and technical effects of the embodiment of this application can be compared with Figure 6 The specific implementation principles and technical effects of the embodiments are similar.

[0300] For example, in the embodiment of the present application, the display screen may be Figure 8 In the embodiment, the display screen A. The test unit can be Figure 8 The test grid associated with the display screen A in the embodiment. The hole area can be Figure 8 The second mark is, for example, the hole area c in the embodiment. Figure 8 The second mark in the image 6 of the embodiment. The specific implementation principle of the embodiment of the present application can be compared with Figure 8 In the embodiment, the specific implementation principles of implementing the touch function test on the outer edge area of ​​the display screen A and implementing the touch function test on the inner edge area of ​​the display screen A are similar.

[0301] For example, in the embodiment of the present application, the display screen may be Figure 8 In the embodiment, the display screen B. The test unit can be Figure 8 The test grid associated with the display screen B in the embodiment. The hole area can be Figure 8 In the embodiment, the hole area d. The second mark is for example Figure 8 The second mark in the image 9 of the embodiment. The specific implementation principle of the embodiment of the present application can be compared with Figure 8 In the embodiment, the specific implementation principles of implementing the touch function test on the outer edge area of ​​the display screen B and implementing the touch function test on the inner edge area of ​​the display screen B are similar.

[0302] Since the multiple test units corresponding to the first interface include units located in the inner edge area of ​​the display screen, the multiple first identifiers corresponding to the multiple test units can be used for test prompts. In this way, the touch function of the inner edge area of ​​the display screen can be tested, which can reduce the probability of electronic devices with abnormal touch function in the inner edge area of ​​the display screen not being identified.

[0303] Optionally, before displaying the first interface on the display screen, the method further includes:

[0304] Divide the display into multiple cells.

[0305] Based on the coordinates of the hole-punch area, a first area represented by the coordinates of the hole-punch area is obtained.

[0306] A first area of ​​a target cell is determined. The first area of ​​the target cell is an area where the target cell intersects the first region. The target cell is any one of the at least one cells intersecting the first region.

[0307] When a ratio K of the first area of ​​the target cell to the area of ​​the cell is smaller than a first preset value, the target cell is determined to be a test cell.

[0308] When the ratio K is greater than or equal to the first preset value, the peripheral cells of the target cell are determined to be the test cells. The peripheral cells of the target cell are cells adjacent to the target cell and not intersecting with the first area.

[0309] The first region may be in a circular, elliptical, polygonal, or other shape. The embodiment of the present application does not specifically limit the shape of the first region.

[0310] For example, taking the number of the hole-punch area of ​​the display screen as one, the first area may be Figure 2 The coordinates of the hole area i in the embodiment represent the shape. The unit can be Figure 2 The target cell can be Figure 2 The target grid in the embodiment. The first area of ​​the target unit can be Figure 2 In the embodiment, the invalid area of ​​the target grid. The first preset value can be Figure 2 The preset value δ1 in the embodiment. The ratio K can satisfy the formula: K = S1 / S0. The peripheral units of the target unit can be Figure 2 The peripheral grids of the target grid in the embodiment.

[0311] For example, the peripheral units of the target unit are collinear or co-pointed with the target unit, so that the distance between the test unit and the edge of the first area is minimized, thereby achieving accurate detection of the touch function of the inner edge area of ​​the display screen. It is understood that if the first area is rectangular and the target unit includes a vertex of the first area, then there are two peripheral units collinear with the target unit and one peripheral unit co-pointed with the target unit. The number of peripheral units of the target unit is three.

[0312] For example, taking the number of the hole-punch areas of the display screen as an example, the first area may include Figure 3 Rectangular area 303 and rectangular area 305 are shown.

[0313] In this way, multiple test units can be obtained surrounding the hole-punch area. If the ratio of the first area of ​​the test unit to the unit area is less than a first preset value, it can indicate that the touch function of the test unit will not be damaged by the hole-punch. It is necessary to test the touch function of the test unit to reduce the probability of the test unit's touch function not being recognized after being damaged due to assembly or other reasons. Other reasons do not include hole-punch reasons, and other reasons include transportation reasons.

[0314] Optionally, when a ratio K of the first area of ​​the target cell to the area of ​​the cell is less than a first preset value, determining the target cell as a test cell includes: when the ratio K is less than the first preset value, adding information of the target cell to a first list. The first list is used to record information of the test cell.

[0315] When the ratio K is greater than or equal to a first preset value, determining the peripheral unit of the target unit as a test unit includes: when the ratio K is greater than or equal to the first preset value, adding information of the peripheral unit of the target unit to the first list.

[0316] The first list includes information about cells that intersect with the outer edge of the display screen. Before displaying the first interface on the display screen, the method further includes:

[0317] The information of the cells that do not exceed the border of the display screen is selected from the first list to obtain a second list. The information contained in the second list is used for displaying the first interface.

[0318] The first list can be Figure 2 List A in the embodiment. The second list can be Figure 2 List B in the embodiment. The information of the unit can be Figure 2 The index of the grid in the embodiment. The information of the test unit can be Figure 2 The index of the test grid in the embodiment. The information of the peripheral unit can be Figure 2 The index of the outer grid in the embodiment. The unit that intersects the outer edge of the display screen can be Figure 2In the embodiment, the index satisfies at least one of the following grids: R j =1, R j =M,L j =1 or L j = N. The information of selecting cells that do not exceed the border of the display screen from the first list may be: selecting cells that satisfy 1≤R from list A io ≤M and 1≤L ip ≤N index (R io , L ip ).

[0319] Index does not satisfy 1≤R io ≤M and / or does not satisfy 1≤L ip ≤N, indicating that the unit corresponding to the index exceeds the boundary of the display screen, and there is no need to test the units that exceed the boundary of the display screen. In this way, the second list contains units that intersect with the outer edge of the display screen, and the second list is used to display the first interface, which can realize the test of the touch function of the outer edge area of ​​the display screen and the touch function of the inner edge area of ​​the display screen. The second list does not contain units that exceed the boundary of the display screen, and the second list is used to display the first interface, which can also reduce the impact of units that exceed the boundary of the display screen on the touch function test of the display screen, thereby improving the accuracy of the touch function test of the display screen.

[0320] Optionally, the hole-punch area may include a first hole-punch area and a second hole-punch area, and the coordinates of the hole-punch area include the coordinates of the first hole-punch area and the coordinates of the second hole-punch area. The first region includes a second region and a third region. The second region is the region indicated by the coordinates of the first hole-punch area, and the third region is the region indicated by the coordinates of the second hole-punch area.

[0321] Before displaying the first interface on the display screen, the method further includes:

[0322] The information in the second list that is identical to the information of the unit in the blacklist is cleared to obtain the cleared second list. The information contained in the cleared second list is used for displaying the first interface, and the blacklist contains the information of the first non-test unit and the information of the second non-test unit. The first non-test unit intersects with the second area, and the ratio of the area of ​​the intersection of the first non-test unit and the second area to the area of ​​the unit is greater than or equal to the first preset value. The second non-test unit intersects with the third area, and the ratio of the area of ​​the intersection of the second non-test unit and the third area to the area of ​​the unit is greater than or equal to the first preset value. Among them, the cleared second list can be Figure 2 List C in the Examples.

[0323] For example, the display screen may be Figure 3 The display screen 301 shown. The first hole area can be Figure 3 The second hole-punch area can be Figure 3 The second area can be 304. Figure 3 The third area can be the rectangular area 303 shown. Figure 3 The rectangular area 305 is shown. The information of the first non-test unit may be the index of the non-test square determined in the process of determining multiple test squares surrounding the first hole area 302 based on the coordinates of the first hole area 302. The information of the second non-test unit may be the index of the non-test square determined in the process of determining multiple test squares surrounding the second hole area 304 based on the coordinates of the second hole area 304.

[0324] In this way, the information in the second list is cleaned through the blacklist to reduce the impact of units determined as test units based on one hole area and as non-test units based on another hole area on touch function detection, and reduce the probability of reduced detection accuracy due to the fact that the detected unit belongs to a non-test unit.

[0325] Optionally, the second area is a rectangular area, and the second area may include a first side, a second side, a third side, and a fourth side, the first side is parallel to the third side, and the second side is parallel to the fourth side. The coordinates of the first hole area include the coordinates of a first intersection of the first side and the fourth side.

[0326] The target unit includes a first target unit, and determining a first area of ​​the target unit includes:

[0327] Starting with the cell containing the first intersection point, along the first, second, third, and fourth sides, cells intersecting with the edge of the second region are identified one by one as first target cells, and the first area of ​​the first target cells is calculated. The first area of ​​the first target cell is the area of ​​the intersection between the first target cell and the second region. The first target cell is any one of the at least one cells intersecting with the second region.

[0328] For example, the second region may be Figure 3 The first side may be side 1A1B. The second side may be side 1B1C. The third side may be side 1C1D. The fourth side may be side 1D1A. The first intersection point may be vertex 1A. Figure 4 The specific implementation principle of determining the invalid area of ​​the target grid in the embodiment will not be described in detail here.

[0329] In this way, when the display screen includes multiple hole-punch areas, the electronic device can, based on the coordinates of the target hole-punch area, calculate the first area of ​​each cell intersecting with the edge of the area represented by the coordinates of the hole-punch area one by one along the edge of the area represented by the coordinates of the hole-punch area, starting from a cell corresponding to a vertex of the area represented by the coordinates of the hole-punch area as the starting cell, thereby determining multiple test cells surrounding the target hole-punch area. The target hole-punch area is any one of the multiple hole-punch areas corresponding to the display screen.

[0330] Optionally, the unit may be a grid. The display screen is divided into a plurality of units, including:

[0331] The display screen is divided into M rows and N columns to obtain a plurality of grids.

[0332] Wherein, M and N are both integers, M is positively correlated with the resolution of the display screen and negatively correlated with the pixel density of the display screen and the second preset value, N is positively correlated with the resolution of the display screen and negatively correlated with the pixel density of the display screen and the second preset value, and M and N are also related to the aspect ratio of the display screen.

[0333] In this way, the number of rows and columns of the display screen can be determined based on the resolution of the display screen, the pixel density of the display screen, and the aspect ratio of the display screen, so as to divide the display screen into multiple units using the number of rows and columns of the display screen.

[0334] Optionally, the resolution of the display screen includes the vertical resolution h of the display screen. p and the horizontal resolution of the display w p .

[0335] The number of rows M satisfies the formula:

[0336] The number of columns N satisfies the formula:

[0337] Wherein, δ2 is the second preset value, | | * Indicates rounding to the nearest integer, H=λW, PPI is the pixel density and λ is the aspect ratio of the display.

[0338] In this way, the number of rows and columns of the display screen can be determined based on the resolution and pixel density of the display screen, so that the display screen can be divided into multiple units using the number of rows and columns of the display screen.

[0339] Optionally, the first identifier is used to identify a center point of the test unit.

[0340] In this way, when the user draws a circle along the first mark, precise contact with the test unit corresponding to the first mark can be achieved, thereby improving the accuracy of the touch test.

[0341] Optionally, the first logo and the second logo have different colors, and / or the display area of ​​the second logo is larger than the display area of ​​the first logo.

[0342] In this way, when the user performs a circle operation, if the touch function of the target test unit is normal, the second identifier can be displayed at the location of the target test unit; if the touch function of the target test unit is abnormal, the first identifier can be displayed at the location of the target test unit. Through the difference in display color and / or display area between the first identifier and the second identifier, it can be accurately identified whether the touch function at the location of the target test unit is normal.

[0343] Optionally, before displaying the first interface on the display screen, the method further includes:

[0344] Divide the display into multiple cells.

[0345] An operation acting on a target unit among the multiple units is received, and information of the target unit is added to a configuration file. The configuration file includes information indicating a display screen type, and the configuration file is used for displaying the first interface.

[0346] The first interface is displayed on the display screen, including:

[0347] When the information indicating that the test is started is received and the information indicating the type of the display screen is obtained, the configuration file is read and parsed, and the first mark is displayed on the display screen.

[0348] For example, the target unit may be Figure 2 or Figure 6 The target grid in the embodiment. The information indicating the display screen type can be Figure 6 In the embodiment, the type information or the type information of the display screen. When receiving the information indicating the start of the test and obtaining the information indicating the type of the display screen, the configuration file is read and parsed, and the specific implementation principle of displaying the first identifier on the display screen can be found in Figure 6 The specific implementation principle shown in S603 of the embodiment will not be repeated here.

[0349] In this way, it is possible to configure the test unit information corresponding to the target display screen of different types of display screens and the target type information representing the target display screen type into the configuration file in a preset manner. When an operation to start the touch function test is received and the target type information is obtained, the electronic device can read and parse the configuration file to display multiple first identifiers corresponding to the configuration file associated with the target type information, thereby realizing the touch function detection of the outer edge area of ​​the target display screen and the touch function detection of the inner edge area of ​​the target display screen. In addition, since the multiple test units corresponding to the target display screen are preset, this can reduce the amount of calculation required by the electronic device to determine the multiple test units of the target display screen.

[0350] It should be noted that the module names involved in the embodiments of the present application can be defined as other names as long as the functions of each module can be achieved, and there is no specific restriction on the names of the modules.

[0351] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of the present application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0352] The display method of the embodiment of the present application has been described above. The following describes the device for performing the above method provided in the embodiment of the present application. Those skilled in the art will understand that the method and device can be combined and referenced with each other, and the relevant device provided in the embodiment of the present application can perform the steps in the above display method.

[0353] The display method provided in the embodiment of the present application can be applied to electronic devices with communication functions. The electronic devices include terminal devices. The specific device form of the terminal device can refer to the above related descriptions and will not be repeated here.

[0354] An embodiment of the present application provides an electronic device, comprising one or more processors and a memory. The memory is coupled to the one or more processors, and the memory is configured to store computer program code, the computer program code comprising computer instructions, and the one or more processors invoke the computer instructions to cause the electronic device to execute the aforementioned method.

[0355] An embodiment of the present application provides a chip system, which is applied to an electronic device. The chip system includes one or more processors, and the one or more processors are used to call computer instructions to enable the electronic device to execute the above method.

[0356] The present embodiment provides a chip. The chip includes a processor configured to invoke a computer program stored in a memory to execute the technical solution of the above embodiment. The implementation principles and technical effects are similar to those of the above-mentioned related embodiments and will not be further described here.

[0357] The embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the above-mentioned method is implemented. The methods described in the above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. If implemented in software, the functions can be stored as one or more instructions or codes on a computer-readable medium or transmitted on a computer-readable medium. Computer-readable media can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium that can be accessed by a computer.

[0358] In one possible implementation, a computer-readable medium may include RAM, ROM, compact disc read-only memory (CD-ROM) or other optical disc storage, magnetic disk storage or other magnetic storage devices, or any other medium intended to carry or store the desired program code in the form of instructions or data structures and accessible by a computer. Moreover, any connection is appropriately referred to as a computer-readable medium. For example, if a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) or wireless technology (such as infrared, radio and microwave) is used to transmit software from a website, server or other remote source, the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology such as infrared, radio and microwave are included in the definition of medium. Disk and optical disc as used herein include optical disc, laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc, where disks generally reproduce data magnetically, while optical discs reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0359] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed, the computer executes the above method.

[0360] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable device to produce a machine, so that the instructions executed by the processing unit of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0361] The above specific implementation methods further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made on the basis of the technical solutions of the present invention should be included in the scope of protection of the present invention.

Claims

1. A display method, characterized in that: include: Displaying a first interface on a display screen, wherein the first interface includes a plurality of first identifiers, and the plurality of first identifiers are used to identify a plurality of test units; The display screen includes a hole area, and the plurality of test units include units surrounding the hole area; receiving an operation acting on a target test unit, and displaying a second identifier for indicating a test result of the test unit, wherein the target test unit is any one of the plurality of test units; Before displaying the first interface on the display screen, the method further includes: Dividing the display screen into a plurality of units; Based on the coordinates of the hole-digging area, obtaining a first area represented by the coordinates of the hole-digging area; Determine a first area of ​​a target unit; the first area of ​​the target unit is an area where the target unit intersects with the first area; the target unit is any one of at least one of the units intersecting with the first area; When a ratio K of the first area of ​​the target unit to the area of ​​the unit is less than a first preset value, determining that the target unit is the test unit; When the ratio K is greater than or equal to the first preset value, the peripheral cell of the target cell is determined to be the test cell; the peripheral cell of the target cell is the cell adjacent to the target cell and not intersecting with the first area.

2. The method according to claim 1, characterized in that The determining that the target unit is the test unit when the ratio K of the first area of ​​the target unit to the area of ​​the unit is less than a first preset value includes: adding the information of the target unit to a first list when the ratio K is less than the first preset value; the first list is used to record the information of the test unit; The determining, when the ratio K is greater than or equal to the first preset value, the peripheral unit of the target unit as the test unit includes: adding information of the peripheral unit of the target unit to the first list when the ratio K is greater than or equal to the first preset value; The first list includes information about the units intersecting with the outer edge of the display screen; before displaying the first interface on the display screen, the method further includes: The information of the unit that does not exceed the boundary of the display screen is selected from the first list to obtain a second list; the information contained in the second list is used for displaying the first interface.

3. The method according to claim 2, characterized in that The hole-punching area includes a first hole-punching area and a second hole-punching area, and the coordinates of the hole-punching area include the coordinates of the first hole-punching area and the coordinates of the second hole-punching area; the first area includes a second area and a third area; the second area is the area represented by the coordinates of the first hole-punching area, and the third area is the area represented by the coordinates of the second hole-punching area; Before displaying the first interface on the display screen, the method further includes: The information in the second list that is identical to the information of the unit in the blacklist is cleared to obtain a cleared second list; the information contained in the cleared second list is used for displaying the first interface, and the blacklist contains information of the first non-test unit and information of the second non-test unit; the first non-test unit intersects with the second area, and the ratio of the area of ​​the intersection of the first non-test unit and the second area to the area of ​​the unit is greater than or equal to the first preset value; the second non-test unit intersects with the third area, and the ratio of the area of ​​the intersection of the second non-test unit and the third area to the area of ​​the unit is greater than or equal to the first preset value.

4. The method according to claim 3, characterized in that The second area is a rectangular area, the second area includes a first side, a second side, a third side, and a fourth side, the first side is parallel to the third side, and the second side is parallel to the fourth side; the coordinates of the first hole-digging area include the coordinates of a first intersection of the first side and the fourth side; The target unit includes a first target unit, and determining the first area of ​​the target unit includes: Taking the unit containing the first intersection point as the starting unit, along the first side, the second side, the third side and the fourth side, the units intersecting with the edge of the second area are determined one by one as the first target units, and the first area of ​​the first target unit is calculated; the first area of ​​the first target unit is the area of ​​the intersection of the first target unit and the second area; the first target unit is any one of at least one of the units intersecting with the second area.

5. The method according to any one of claims 1 to 4, characterized in that The unit is a grid; dividing the display screen into a plurality of units includes: Dividing the display screen into M rows and N columns to obtain a plurality of grids; Wherein, M and N are both integers, M is positively correlated with the resolution of the display screen and negatively correlated with the pixel density of the display screen and the second preset value, and N is positively correlated with the resolution of the display screen and negatively correlated with the pixel density of the display screen and the second preset value.

6. The method according to claim 5, characterized in that The resolution of the display screen includes the vertical resolution h of the display screen. p and the horizontal resolution w of the display p ; The M satisfies the formula: The N satisfies the formula: Wherein, δ2 is the second preset value, | | * Indicates rounding to the nearest integer, H=λW, PPI is the pixel density, and λ is the aspect ratio of the display screen.

7. The method according to any one of claims 1 to 4 and 6, characterized in that The first identifier is used to identify the center point of the test unit.

8. The method according to any one of claims 1 to 4 and 6, characterized in that The first mark and the second mark have different colors, and / or the display area of ​​the second mark is larger than the display area of ​​the first mark.

9. The method according to claim 1, characterized in that Before displaying the first interface on the display screen, the method further includes: Dividing the display screen into a plurality of units; receiving an operation acting on a target unit among the multiple units, and adding information of the target unit to a configuration file; the configuration file includes information indicating the type of the display screen, and the configuration file is used for displaying the first interface; Displaying the first interface on the display screen includes: When the information indicating that the test is started is received and the information indicating the type of the display screen is obtained, the configuration file is read and parsed, and the first identifier is displayed on the display screen.

10. An electronic device, characterized in that: The electronic device includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute the method as described in any one of claims 1 to 9.

11. A chip system, characterized in that: The chip system is applied to an electronic device, and the chip system includes one or more processors, and the one or more processors are used to call computer instructions so that the electronic device executes the method as described in any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that The computer-readable storage medium comprises computer instructions, and when the computer instructions are executed on an electronic device, the electronic device is caused to perform the method according to any one of claims 1 to 9.

13. A computer program product, characterized in that The computer program product comprises a computer program code, and when the computer program code is run on an electronic device, the electronic device is caused to perform the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Touch screen test method and electronic equipment

    CN112148541A

  • Screen hole digging method and hole digging screen defect detection method and system

    CN114689606A