Display method and related device

By displaying the outer edge and inner edge area marks on the display screen of the electronic device, the user performs circle drawing operations to achieve comprehensive detection of the display screen touch function, solving the problem of insufficient detection of the inner edge area in the prior art, and improving the Test accuracy and product quality.

CN119271468AActive Publication Date: 2025-01-07HONOR DEVICE CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing touch screen circle drawing test method is difficult to effectively detect the touch function in the inner edge area of ​​the display screen, resulting in electronic devices with abnormal touch function not being screened out and flowing into the market.

Method used

When the electronic device receives the on-touch screen test operation, multiple signs are displayed in the outer edge and inner edge areas of the display screen. The user draws circles along the sign to detect the touch function of the outer edge and inner edge areas of the display screen, reducing the number of signs. The probability that the device is not recognized by the touch function.

Benefits of technology

Through detection of the outer edge and inner edge area of ​​the display screen, the accuracy of touch function testing is improved, the situation where touch function abnormal devices are not recognized, and the product quality is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119271468A_ABST
    Figure CN119271468A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a display method and a related device, and relates to the technical field of terminals. The method comprises the steps that a first interface is displayed on a display screen, the first interface comprises a plurality of first identifications, and the first identifications are used for identifying a plurality of test units; the display screen comprises a hole digging area, and the plurality of test units comprise units surrounding the hole digging area; an operation acting on a target test unit is received, a second identifier used for representing a test result of the test unit is displayed, and the target test unit is any one of the multiple test units. Thus, the touch function of the inner edge area of the display screen can be detected, the probability of occurrence that the electronic equipment with the abnormal touch function in the inner edge area of the display screen is not screened out can be reduced, and then the probability of occurrence that the electronic equipment with the abnormal touch function flows into the market can be reduced.
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] The display screen is a component of some electronic devices. In some implementations, before the electronic device leaves the factory, a touch screen circle test method can be used to detect the touch function of the edge of the display screen of the electronic device to screen out electronic devices with abnormal touch function. For example, the touch screen circle test method is: draw a circle along the outer edge area of ​​the display screen of the electronic device. If the touch function of the circle path area is normal, the circle path area will display an image indicating that the touch function is normal.

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

[0004] The embodiment of the present application provides a display method and related devices, which are applied to 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 marks 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 mark, which can detect the touch function of the outer edge area of ​​the display screen and the inner edge area of ​​the display screen, and can reduce the probability of electronic devices with abnormal touch functions not being screened out, thereby 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 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-digging area, and the plurality of test units include a unit surrounding the hole-digging area. 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, and the target test unit is any one of the plurality of test units.

[0007] 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, so that the touch function of the inner edge area of ​​the display screen can be tested, and the probability of electronic devices with abnormal touch functions in the inner edge area of ​​the display screen not being identified can be reduced. The inner edge area of ​​the display screen can be understood as the area surrounding the hole area of ​​the display screen.

[0008] In a possible implementation, 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, a first area represented by the coordinates of the hole-digging area is obtained. A first area of ​​the target unit is determined. The first area of ​​the target unit is the area where the target unit intersects with the first area. The target unit is any one of at least one unit intersecting with the first area. 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, the target unit is determined to be a test unit. When the ratio K is greater than or equal to the first preset value, the peripheral unit of the target unit is determined to be a test unit. The peripheral unit of the target unit is a unit adjacent to the target unit and does not intersect with the first area. Among them, the first area can be a circular, elliptical or polygonal shape. The embodiment of the present application does not specifically limit the shape of the first area. Exemplarily, the peripheral unit of the target unit is collinear or co-pointed with the target unit. It can be understood that if the first area is a rectangle and the target unit includes a vertex of the first area, 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.

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

[0010] In a 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 the target unit as 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 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 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 also 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 influence 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 a possible implementation, the hole-digging area includes a first hole-digging area and a second hole-digging area, and the coordinates of the hole-digging area include the coordinates of the first hole-digging area and the coordinates of the second hole-digging area. The first area includes a second area and a third area. The second area is an area represented by the coordinates of the first hole-digging area, and the third area is an area represented by the coordinates of the second hole-digging area. Before displaying the first interface on the display screen, the method also includes: clearing the information in the second list that is the same as the information of the unit in the blacklist, and obtaining 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 where the first non-test unit intersects with 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 where the second non-test unit intersects with the third area to the area of ​​the unit 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 that are determined as test units based on one hole area and determined 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 is a non-test unit.

[0014] In a 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, along the first side, the second side, the third side, and the fourth side, one by one determining the units intersecting with the edge of the second area 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 intersecting with the second area.

[0015] In this way, when the display screen includes multiple hole-punching areas, the electronic device can, based on the coordinates of the target hole-punching area, take a unit corresponding to a vertex of the area represented by the coordinates of the hole-punching area as a starting unit, and along the edge of the area represented by the coordinates of the hole-punching area, calculate the first area of ​​the units intersecting with the edge of the area represented by the coordinates of the hole-punching area one by one, thereby determining multiple test units surrounding the target hole-punching area. The target hole-punching area is any one of the multiple hole-punching 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 of the display screen and the pixel density of the display screen, so that the display screen can be divided into a plurality of 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 pixel density, and λ is the aspect ratio of the display screen.

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

[0024] In a possible implementation manner, 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 manner, 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.

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

[0028] In a possible implementation, 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 plurality of units, 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:

[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 information of the test unit corresponding to the target display screen in different types of display screens and the target type information representing the target display screen type into the configuration file by presetting. When receiving the operation of starting the touch function test and obtaining the target type information, 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, and realize 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 units corresponding to the target display screen are preset, the amount of calculation for the electronic device to determine the multiple test units of the target display screen can be reduced.

[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 in 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 used to perform 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 used 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 in 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 in the chip (for example, a register, a cache, etc.), or a storage unit in the electronic device located outside the chip (for example, a read-only memory, a random access memory, etc.).

[0032] In a third aspect, an embodiment of the present application provides an electronic device, including 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 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 instructions are stored. When the computer program or instructions are 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, enables the computer to execute 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 a chip system, the chip or chip system comprising at least one processor and a communication interface, the communication interface and the at least one processor are interconnected by a line, and the at least one processor is used to run a computer program or instruction to execute the method described in the first aspect or any possible implementation of the first aspect. The communication interface in the chip can be an input / output interface, a pin or a circuit, etc.

[0036] In a possible implementation, the chip or chip system described above in the present application further includes at least one memory, in which instructions are stored. The memory may be a storage unit inside 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 drawing 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 provided in 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 provided in an embodiment of the present application;

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

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

[0046] In order to clearly describe the technical solutions of the embodiments of the present application, some terms and technologies involved in the embodiments of the present application are briefly introduced below:

[0047] 1. Other terms

[0048] In the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with substantially the same functions and effects. For example, the first chip and the second chip are only used to distinguish different chips, and their order is not limited. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.

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

[0050] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" 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: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single 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 equipment

[0052] The electronic device of the embodiment of the present application may include a handheld device with a display function, a vehicle-mounted device, etc. For example, some electronic devices are: 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 (public landmobile networks). The embodiments of the present application do not limit this.

[0053] As an example but not 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 powerful functions achieved through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include full-featured, large-sized, and fully or partially independent of smartphones, such as smart watches or smart glasses, as well as devices 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 types of 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 that interconnects people and machines and things.

[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 an embodiment 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 a memory (also called main memory). The operating system can be any one or more computer operating systems that implement business processing through processes, such as Linux operating system, Unix operating system, Android operating system, iOS operating system, or 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 of the electronic device, resulting in abnormal touch function in the edge area of ​​the display screen. In the case where the display screen includes 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 side 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, in order to reduce the number of electronic devices with abnormal touch functions entering the market, after the display screen is mounted on the electronic device, the touch function of the outer edge area of ​​the display screen of the electronic device is tested using the first test method to screen out the display screen with abnormal touch function. It should be understood that an electronic device equipped with a display screen with abnormal touch function is an electronic device with abnormal touch function.

[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 an operation to start 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 a plurality of first marks 101 located in the outer edge area of ​​the display screen, a hole area a 102, a hole area b 103 and the name of the test item. 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 receiving a circle operation, 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 FIG. 1 , the touch screen circle test method 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 a shown in a and the area surrounding Figure 1 The area of ​​the hole area b shown in a in FIG. 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 logos located in the inner edge area of ​​the display screen to prompt the user to draw circles along the first logos. 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 can be understood 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 may 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 (h p × 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 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] Exemplarily, PPI also satisfies the following formula:

[0077]

[0078] Among them, d pis the diagonal resolution of the display. J is the length of the diagonal of the display screen. In one embodiment of the present application, the resolution of the display screen, the aspect ratio of the display screen, and the length of the diagonal of the display screen may be preset in the display screen by the display screen manufacturer. The electronic device may obtain the resolution of the display screen, the aspect ratio of the display screen, and the length of the diagonal of the display screen, and then obtain the width and height of the display screen based on the resolution of the display screen, the aspect ratio of the display screen, and the length of the diagonal 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 of rows M and the number of columns N 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 multiple squares corresponding to the display screen and the index of each square in the multiple squares are obtained (R j , L j ). Among them, R j =1, 2, 3, ..., M. L j =1,2,3,…,N. j can be the serial 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 A schematic diagram of multiple grids and hole areas of a display screen provided in an embodiment of the present application is shown. For ease of understanding, Figure 3 This is described in step S204.

[0083] S204: The electronic device may obtain 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 may be a polygon. The polygon may include a regular polygon or an irregular polygon. The regular polygon may be a triangle, a quadrilateral, a pentagon or a hexagon, etc. The shape of the area represented by the coordinates of the hole-digging area is not specifically limited in the embodiment of the present application.

[0085] Exemplarily, the number of the hole-punch areas of the display screen may be one or more. Exemplarily, 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] Exemplarily, taking the case where the number of hole-punching areas of a display screen is one, the serial number of the hole-punching area is i, and the area represented by the coordinates of the hole-punching area is a rectangular area i, the hole-punching area with serial number i can be called hole-punching area i. Rectangular area i may 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 with edge iDiA at point iA. Edge iAiB intersects with edge iBiC at point iB. Edge iBiC intersects with edge iCiD at point iC. Edge iCiD intersects with 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-digging area 1 and the hole-digging area 2 are shown as examples. Figure 3 It includes the coordinate system of the display screen 301, multiple squares 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-punching area of ​​the display screen 301 includes a hole-punching area 1 302 and a hole-punching area 2 304. The coordinates of the hole-punching area of ​​the display screen 301 include: the coordinates of the hole-punching area 1 302 and the coordinates of the hole-punching area 2 304. The area represented by the coordinates of the hole-punching area of ​​the display screen 301 includes: a rectangular area 303 represented by the coordinates of the hole-punching area 1 302 and a rectangular area 305 represented by the coordinates of the hole-punching area 2 304. The serial number of the hole-punching area 1 302 is 1, and the serial number of the hole-punching area 2 304 is 2. The vertices of the four corners of the rectangular area 303 are 1A, 1B, 1C and 1D, respectively, and the vertices of the four corners of the rectangular area 305 are 2A, 2B, 2C and 2D, respectively.

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

[0091] The coordinates of the second hole digging 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] Among them, the grid may include a test grid and a non-test grid. The 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 can be understood as an area formed by multiple test grids surrounding the hole-digging area. The ratio of the invalid area of ​​the test grid to the area of ​​the grid is less than a first preset value. The invalid area of ​​the test grid can be: the area where the test grid intersects with the area represented by the coordinates of the hole-digging area.

[0095] Exemplarily, based on the coordinates of the hole-digging area, the information of each square among the multiple squares intersecting the edge of the area represented by the coordinates of the hole-digging 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 the column number are as follows: Figure 3 shown.

[0096] The invalid area of ​​the target square is calculated. The target square is any square among the multiple squares intersecting with the edge of the area represented by the coordinates of the hole-digging area. The invalid area of ​​the target square may be: the area where the target square intersects with 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 identification 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 square of the target square is determined as a test square, and the identification of the test square is added to the list A. The identification of the target square can also be added to the blacklist.

[0099] Among them, the outer squares of the target square are: squares that are adjacent to the target square and do not intersect with the area represented by the coordinates of the digging area. The outer squares of the target square are collinear or collinear with the target square. If 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 target square belongs to a non-test square. The preset value δ1 can be 25%. The preset value δ1 can also be other values, which are not specifically limited in the embodiments of the present application.

[0100] For example, taking the hole-punch area of ​​the display screen including the hole-punch area i as an example, after obtaining the coordinate 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 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 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 the row number and the column number 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-digging 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 ), Square(R1A , L 1A +1), Grid (R 1A , L 1C ), Square(R 1C , L 1C ), Square(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 square is obtained, the index of the target square and the coordinates of the hole-digging area are calculated to obtain the invalid area S1 of the target square. The invalid area S1 of the target square 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 a 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 square S0 satisfies the formula: S0 = d H ×d W .

[0124] In this way, multiple test squares surrounding the hole area i can be obtained. The ratio of the invalid area of ​​the test square to the area of ​​the square is less than the preset value δ1, which can indicate 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 digging reasons, and other reasons include transportation reasons.

[0125] For example, the electronic device can press Figure 4 The process shown in the figure takes the square where a vertex of the rectangular area corresponding to the hole-digging area is located as the starting square, and along the four sides of the rectangular area, the invalid areas of the squares intersecting with the sides of the rectangular area are calculated one by one to obtain multiple test squares surrounding the hole-digging 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] Exemplarily, the hole-punch area of ​​the display screen still includes: Figure 3 The hole area 1 302 and the hole area 2 304 are shown as examples. The test area surrounding the hole area of ​​the display screen may include a test grid surrounding the hole area 1 302 and a test grid surrounding the hole area 2 304 .

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

[0129] The implementation principle of determining multiple test squares around the hole area 1 302 based on the coordinates of the hole area 1 302 is similar to the implementation principle of obtaining multiple test squares around the hole area i based on the coordinates of the hole area i. The implementation principle of determining multiple test squares around the hole area 2 304 based on the coordinates of the hole area 2 304 is similar to the implementation principle of obtaining multiple test squares around the hole area i based on the coordinates of the hole area i.

[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] Exemplarily, the test area at the outer edge of the display screen can be understood as an area formed by 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 items as the 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 performed concurrently. When step S205 and step S206 are both completed, the electronic device may perform 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 of ≤N are cleared to obtain a cleared list A. The cleared list A may be referred to as list B. The electronic device may 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 may be referred to as list C.

[0138] The squares corresponding to the indexes in List C constitute the test area for the touch function test of the display screen. List C can be used to draw the test interface for the touch function test of the display screen. List C contains the test squares constituting the test area of ​​the outer edge of the display screen and the test squares constituting the test area of ​​the edge of the hole area, realizing the merging of the test area of ​​the outer edge of the display screen and the test area of ​​the edge of the hole area.

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

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

[0141] Optionally, in the case where the display screen includes multiple hole-punching areas, there may be a situation where multiple indexes included in List A are the same. For example, if the display screen includes two hole-punching areas, List A includes two identical indexes, and the two identical indexes are called repeated indexes, before obtaining the cleared List A, the electronic device may calculate the repeated index and the coordinates of one of the two hole-punching areas to obtain an invalid area corresponding to the repeated index, and calculate the repeated index and the coordinates of the other of the two hole-punching areas to obtain another invalid area corresponding to the repeated index. The electronic device may determine whether the ratio of the sum of the invalid area corresponding to the repeated index and the other invalid area to the square area is less than a preset value δ1. If the ratio of the sum of the invalid area corresponding to the repeated index and the other invalid area to the square area is less than the preset value δ1, it means that the square corresponding to the repeated index is a test square, and one of the repeated indexes in List A can be retained. If the ratio of the sum of the invalid area corresponding to the repeated index and the other invalid area to the square area is greater than or equal to the preset value δ1, it is determined that the square corresponding to the repeated index is a non-test square, and the repeated index in List A can 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] Exemplarily, the electronic device may draw an image 1 of a touch function test. The image 1 may include information of a test item. The information of the test item may be a name of the test item. The name of the test item may be, for example, a touch screen test.

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

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

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

[0147] The test interface can be found in Figure 5 The interface shown in a in Figure 1 is shown in Figure 1. 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 (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 representing an operation on the test grid at a preset frequency. The electronic device may display a second mark at a position corresponding to the touch event. The area of ​​the second mark 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, the electronic device cannot receive the touch event corresponding to the operation acting on the target test square, and the second mark 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 can 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 also clear 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 of the display screen, the pixel density of the display screen, and the 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 divide the display screen into a plurality of squares using the number of rows and columns. The electronic device can determine a plurality of test squares surrounding the hole-digging area from the plurality of squares based on the coordinates of the hole-digging area on the display screen. The electronic device also determines a plurality of test squares included in the test area at the outer edge of the display screen from the plurality of squares. The electronic device uses list A to record the index of the test square. The electronic device clears the index of the test squares that exceed the boundary of the display screen among the multiple test squares corresponding to List A, and also clears the test squares that are determined as non-test squares (such as test squares corresponding to the blacklist) based on the coordinates of the hole-digging area among the multiple test squares corresponding to List A, and obtains List C. The electronic device can display the first identifiers corresponding to each of the multiple test squares corresponding to List C. When receiving an operation acting 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 then 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-digging 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, reducing the probability of electronic devices with abnormal touch function not being identified.

[0162] Figure 4 A schematic diagram of the determination process of the test grid 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, and the identification of multiple flags may be used to indicate the calculation order of the invalid areas of multiple squares surrounding the hole digging area.

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

[0167] Still using multiple squares on the display as Figure 3 The multiple squares shown in the figure, the display screen includes a hole area i, and the hole area i is Figure 3 Taking the hole-digging area 1 302 as an example, the first value may represent the calculation order along the direction of edge 1A1B, the second value may represent the calculation order along the direction of edge 1B1C, the third value may represent the calculation order along the direction of edge 1C1D, and the fourth value may represent the calculation order along the direction of edge 1D1A. The direction of edge 1A1B→edge 1B1C→edge 1C1D→edge 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 identification 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 identification 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 identification of the third flag bit to obtain the third value. When the direction list includes a fourth value, the electronic device can read the identification 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 yes, the electronic device may execute S405.

[0176] For example, the electronic device may 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 yes, the electronic device may execute S405.

[0179] The calculation principle of the invalid area S1 of the target grid 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: When the invalid area ratio of the target square is greater than or equal to the preset value δ1, the electronic device may add the index of the square obtained by moving one square outward 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 the 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 square of the target square is determined as (R io , L ip +1).

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

[0185] When the fourth value is read, the index of the peripheral square of the target square is determined as (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, then the index of the outer square of the target square is determined as (R iA +1, L iA ).

[0187] S405: When the invalid area ratio of the target square is less than the 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 hole-digging area.

[0189] If not, execute S407.

[0190] If yes, execute S408.

[0191] Exemplarily, taking the area represented by the coordinates of the hole-digging area as a rectangular area as an example, the electronic device can 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 yes, 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 most recently read from the direction list.

[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 indicator of the most recently read direction list is the first value, the index of the next target square is (R io , L ip +1).

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

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

[0203] When the indicator of the most recently read direction list 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 grid 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 the electronic device 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 a flag 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 position in the direction list is read, the electronic device may determine the next target square based on the identification of the flag position in the read 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 may refer to the electronic device determining the index of the next target square 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 identification 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 so, the electronic device may execute S401.

[0213] If not present, 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] When the identification of the flag bit in the direction list is not read, the electronic device may clear the identification of the hole-digging area 1 302 in list D.

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

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

[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 embodiment shown, when the display screen includes multiple hole-punching areas, the electronic device can, based on the coordinates of the target hole-punching area, use a square corresponding to a vertex of the area represented by the coordinates of the hole-punching area as the starting square, and calculate the invalid areas of the squares intersecting the edge of the area represented by the coordinates of the hole-punching area one by one along the edge of the area represented by the coordinates of the hole-punching area, thereby determining multiple test squares surrounding the target hole-punching area. The target hole-punching area is any one of the multiple hole-punching 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 an operation to start the touch function test, the electronic device may display the following Figure 5 The test interface shown in a. Figure 5 The interface shown in a in the figure may include: a plurality of first identifications 101 located in the outer edge area of ​​the display screen, a plurality of 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 receiving a circle operation, 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 function of the outer edge area of ​​the display screen and the touch function of the inner edge area of ​​the display screen are both normal, a hole area a 102, a 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 a touch function test is received, the interface displayed by the electronic device includes a plurality of first identifiers located in an outer edge area of ​​the display screen and a plurality of first identifiers located in an 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 paths prompted by the first identifiers displayed by 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, thereby reducing the probability of electronic devices with abnormal touch functions not being identified.

[0225] Figure 6 Another schematic diagram of a touch function test process 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 a display screen, which may include type information indicating a 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 a plurality of first identifiers corresponding to the configuration file.

[0230] The configuration file may include information of multiple test grids. The information of multiple test grids in the configuration file may be preset. The identifier of the configuration file may carry 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 by the method shown in S6031-S6033:

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

[0233] S6032: The electronic device may receive an operation acting on the target square. When receiving the operation acting on the target square, 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 region of the display screen and a plurality of test squares located in the inner edge region 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 them 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 the key-value pair, the value is 1653461,4534334,45, and the key is XXXX.touch screen points. 1653461,4534334,45 can indicate the information of 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" may indicate that the number of rows for the touch function test of the display screen is 24. value="11"key="XXXX.touch_screen_columns" may 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" may be used to determine the display position of the first identifier.

[0245] 1653461,4534334,45 belong to a long array. The long array may be converted from two-dimensional matrix information representing information of a plurality of test squares. Optionally, the configuration file may be a file in an extensible markup language (XML) format.

[0246] Optionally, the configuration file can be prefabricated into a test set including multiple configuration files, and the test set includes an identifier representing the test set version. In this way, the management of the configuration file can be facilitated. It is understandable that the test set can include the identifier of each configuration file in 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 the key-value pairs in the 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, and realize 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 for 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 is to be understood that the structure illustrated in the embodiment 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 in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0253] Exemplarily, the touch sensor 180K may receive an operation to start the touch function test. The touch sensor 180K may transmit information indicating that the touch function test is started to the processor 110. The processor 110 may control the display screen 194 to display a first interface. 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-digging area, and the plurality of test units include units surrounding the hole-digging area.

[0254] When the display screen 194 displays the first interface, the touch sensor 180K may receive an operation acting on the target test unit. The touch sensor 180K may transmit information indicating that the target test unit is touched to the processor 110. The processor 110 may display a second identifier for indicating the 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 identifications corresponding to multiple test units, it is possible to detect the touch function of the area surrounding the hole area on the display screen, thereby 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 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, the Android system of the layered architecture is taken as an example to exemplify 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] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: application layer, application framework layer, hardware abstract layer (HAL) and 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 (man-machine interface test, 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 a touch function of a display screen mounted on the electronic device 100 .

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

[0263] The application framework layer provides an application programming interface (API) and a 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 control 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 contains at least display driver, camera driver, audio driver, sensor driver, etc. Display driver can also be called 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] Exemplarily, 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 through the HAL interface, the second touch control module, and the first touch control module. The touch event may include information such as a touch position and a 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 a plurality of test squares located in the outer edge region of the display screen A and a plurality of test squares located in the inner edge region of the display screen A based on the resolution of the display screen A, the pixel density of the display screen A, the aspect ratio of the display screen A, the preset value δ2, the coordinates of the hole-digging area c, and the preset value δ1. The inner edge region of the display screen A may be understood as an area surrounding the hole-digging area c on the display screen A. The specific implementation principle of the first application determining the plurality of test squares located in the outer edge region of the display screen A and the plurality of test squares located in the inner edge region of the display screen A may refer to the specific implementation principle of S202-S207, which will not be described in detail here.

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

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

[0282] The sensor driver may receive an interrupt corresponding to the second touch operation. The second touch operation is a touch operation acting on the 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 through the HAL interface, the second touch control module, and the first touch control module.

[0283] The first application may draw an image 6, and the image 6 may include a second identifier. The first application may synthesize the image 5 and the image 6 to obtain an image 7. The image 7 includes a second identifier located at a touch position of a touch event corresponding to the second touch operation. The first application may transmit information of the image 5 to the display driver through the first display module, the second display module, and the HAL interface. The display driver may transmit information of the image 7 to the display screen A. The display screen A may display the image 7.

[0284] In this way, the touch function of the inner edge area of ​​the display screen A can be detected, and the probability of the touch function of the inner edge area of ​​the display screen A being abnormal but not being identified can be reduced.

[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 the display screen B including the hole area d as an example, when receiving a touch event corresponding to the third touch operation, the second application can determine multiple test squares located in the outer edge area of ​​the display screen B and multiple test squares located in the inner edge area of ​​the display screen B. The inner edge area of ​​the display screen B can be understood as the area surrounding the hole area d on the display screen B. The specific implementation principle of the second application determining the multiple test squares located in the outer edge area of ​​the display screen B and the multiple test squares located in the inner edge area of ​​the display screen B can refer to the specific implementation principle of the first application determining the multiple test squares located in the outer edge area of ​​the display screen A and the multiple test squares located in the inner edge area of ​​the display screen A, which will not be repeated here.

[0288] The second application may draw a composite image 8. The image 8 may include information about the test items and a plurality of first identifiers corresponding to a plurality of test squares associated with the display screen B. The second application may transmit information about the image 8 to the display driver through the first display module, the second display module, and the HAL interface. The display driver may transmit information about the image 8 to the display screen B. The display screen B may display the image 8.

[0289] When the display screen B displays the image 8 , the user can draw a circle 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, wherein the fourth touch operation is a touch operation acting on a test square corresponding to the first identifier displayed on the display screen B. The kernel layer may transmit a touch event corresponding to the fourth touch operation to the first application through the HAL interface, the second touch control module, and the first touch control module.

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

[0292] In this way, the touch function of the inner edge area of ​​the display screen B can be detected, and the probability of the touch function of the inner edge area of ​​the display screen B being abnormal but not being identified can be reduced.

[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 mounted on an electronic device, and can also detect the touch function of a display screen that is not mounted 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 of the display screen, the pixel density of the display screen, the aspect ratio of the display screen and the 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 the display screen, 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-digging area, and the plurality of test units include units surrounding the hole-digging 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, wherein the target test unit is any one of the plurality of 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 i or hole area i. The second identifier is, for example Figure 2 The specific implementation principle of the embodiment of the present application can be compared with Figure 2 The specific implementation principle of the embodiment is similar. Figure 3 The display screen 301 shown, the display screen in the embodiment of the present application includes a hole area, for example: Figure 3 The hole-digging area 1 302 and the hole-digging 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 area. The second mark is for example Figure 6 The specific implementation principle and technical effect of the embodiment of the present 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, 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 Figure 8 In the embodiment, the specific implementation principles of implementing the test of the touch function of the outer edge area of ​​the display screen A and implementing the test of the touch function of 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 Figure 8 In the embodiment, the specific implementation principle of implementing the test of the touch function of the outer edge area of ​​the display screen B and implementing the test of the touch function of 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-digging area, a first area represented by the coordinates of the hole-digging area is obtained.

[0306] Determine a first area of ​​the target unit. The first area of ​​the target unit is an area where the target unit intersects with the first region. The target unit is any one of at least one unit intersecting with the first region.

[0307] 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.

[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 area may be in a circular, elliptical or polygonal shape, etc. The embodiment of the present application does not specifically limit the shape of the first area.

[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 unit can be Figure 2 The first area of ​​the target cell 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 unit of the target unit can be Figure 2 The peripheral grid of the target grid in the embodiment.

[0311] Exemplarily, the peripheral units of the target unit are collinear or co-pointed with the target unit so that the test unit is at the shortest distance from the edge of the first area, so as to achieve accurate detection of the touch function of the inner edge area of ​​the display screen. It is understandable that if the first area is a rectangle and the target unit includes a vertex of the first area, 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 surrounding the hole-digging area can be obtained. The ratio of the first area of ​​the test unit to the area of ​​the unit is less than the first preset value, which can indicate that the touch function of the test unit will not be damaged by the hole-digging. It is necessary to test the touch function of the test unit to reduce the probability of the touch function of the test unit not being recognized after being damaged due to assembly or other reasons. Other reasons do not include hole-digging reasons, such as transportation reasons.

[0314] Optionally, 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 the target unit as a test unit includes: when the ratio K is less than the first preset value, adding information of the target unit to a first list. The first list is used to record information of the test unit.

[0315] When the ratio K is greater than or equal to the first preset value, determining the peripheral unit of the target unit as the 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 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 intersecting 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 unit that exceeds 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. The second list is used to display the first interface, and the influence of the units that exceed the boundary of the display screen on the touch function test of the display screen can be reduced, so as to improve the accuracy of the touch function test of the display screen.

[0320] Optionally, the hole-digging area may include a first hole-digging area and a second hole-digging area, and the coordinates of the hole-digging area include the coordinates of the first hole-digging area and the coordinates of the second hole-digging area. The first area includes the second area and the third area. The second area is the area represented by the coordinates of the first hole-digging area, and the third area is the area represented by the coordinates of the second hole-digging 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 where the first non-test unit intersects with 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 where the second non-test unit intersects with 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-digging area can be Figure 3 The second area can be Figure 3 The third area can be Figure 3 The rectangular area 305 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 around 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 around 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 that are determined as test units based on one hole area and determined 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 is 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-digging area include the coordinates of the 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] Taking the cell containing the first intersection point as the starting cell, along the first side, the second side, the third side and the fourth side, the cells intersecting with the side of the second region are determined one by one as the first target cell, and the first area of ​​the first target cell is calculated. The first area of ​​the first target cell is the area where the first target cell intersects with the second region. The first target cell is any one of the at least one cell intersecting with the second region.

[0328] Exemplarily, 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 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-punching areas, the electronic device can, based on the coordinates of the target hole-punching area, take a unit corresponding to a vertex of the area represented by the coordinates of the hole-punching area as a starting unit, and along the edge of the area represented by the coordinates of the hole-punching area, calculate the first area of ​​the units intersecting with the edge of the area represented by the coordinates of the hole-punching area one by one, thereby determining multiple test units surrounding the target hole-punching area. The target hole-punching area is any one of the multiple hole-punching 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 squares.

[0332] Among them, 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 a plurality of 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 of the display screen and the pixel density of the display screen, so that the display screen can be divided into a plurality of units using the number of rows and columns of the display screen.

[0339] Optionally, the first marker 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 drawing operation, if the touch function of the target test unit is normal, the second mark can be displayed at the location of the target test unit; if the touch function of the target test unit is abnormal, the first mark can be displayed at the location of the target test unit. Through the difference in display color and / or display area between the first mark and the second mark, 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] Exemplarily, the target unit may be Figure 2 or Figure 6 The target grid in the embodiment. The information indicating the display screen type may 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 information of the test unit corresponding to the target display screen in different types of display screens and the target type information representing the target display screen type into the configuration file by presetting. When receiving the operation of starting the touch function test and obtaining the target type information, the electronic device can read and parse the configuration file to display the multiple first identifiers corresponding to the configuration file associated with the target type information, and realize 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 units corresponding to the target display screen are preset, the amount of calculation for the electronic device to determine the multiple test units of the target display screen can be reduced.

[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, and the device for executing the above method provided by the embodiment of the present application is described below. Those skilled in the art can understand that the method and the device can be combined and referenced with each other, and the relevant device provided by the embodiment of the present application can execute 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, and the specific device form of the terminal devices can refer to the above related descriptions, which will not be repeated here.

[0354] An embodiment of the present application provides an electronic device, the electronic device comprising: 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 codes, the computer program codes include computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute the above 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 so that the electronic device executes the above method.

[0356] The embodiment of the present application provides a chip. The chip includes a processor, and the processor is used to call a computer program in a memory to execute the technical solution in the above embodiment. Its implementation principle and technical effect are similar to those of the above related embodiments, and will not be repeated here.

[0357] The embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium stores a computer program. The above method is implemented when the computer program is executed by the processor. The method described in the above embodiment can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. If implemented in software, the function 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 disk storage, disk storage or other magnetic storage devices, or any other medium that is intended to carry or store the required program code in the form of instructions or data structures and can be accessed 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. Disks and optical disks as used herein include optical disks, laser disks, optical disks, digital versatile disks (DVD), floppy disks and Blu-ray disks, where disks usually reproduce data magnetically, while optical disks reproduce data optically using lasers. Combinations of the above should also be included in 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 generate 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 processes in the flowchart and / or block diagram. 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 purpose, 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 substitutions, 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; 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, wherein the target test unit is any one of the multiple test units.

2. 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; 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.

3. The method according to claim 2, characterized in that The step of 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 comprises: when the ratio K is less than the first preset value, adding the information of the target unit to a first list; the first list is used to record the information of the test unit; The step of determining the peripheral unit of the target unit as the test unit when the ratio K is greater than or equal to the first preset value 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 of 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.

4. The method according to claim 3, characterized in that The hole-digging area includes a first hole-digging area and a second hole-digging area, and the coordinates of the hole-digging area include the coordinates of the first hole-digging area and the coordinates of the second hole-digging area; the first area includes a second area and a third area; the second area is an area represented by the coordinates of the first hole-digging area, and the third area is an area represented by the coordinates of the second hole-digging 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 a first non-test unit and information of a second non-test unit; the first non-test unit intersects with the second area, and the ratio of an area where the first non-test unit intersects with the second area to an 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 an area where the second non-test unit intersects with the third area to an area of ​​the unit is greater than or equal to the first preset value.

5. The method according to claim 4, 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 a first area of ​​the target unit includes: Taking the unit containing the first intersection 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.

6. The method according to any one of claims 2 to 5, characterized in that: The unit is a grid; the display screen is divided into a plurality of units, including: Dividing the display screen into M rows and N columns to obtain a plurality of squares; 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.

7. The method according to claim 6, 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: Among them, δ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.

8. The method according to any one of claims 1 to 7, characterized in that The first mark is used to mark the center point of the test unit.

9. The method according to any one of claims 1 to 8, 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.

10. 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; The displaying of the first interface on the display screen includes: When the information indicating the start of the test is received and the information indicating the type of the display screen is obtained, the configuration file is read and parsed, and the first logo is displayed on the display screen.

11. An electronic device, characterized in that: The electronic device comprises: 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 comprises computer instructions, and the one or more processors call the computer instructions so that the electronic device executes the method as described in any one of claims 1 to 10.

12. 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 10.

13. 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 10.

14. 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 10.

Citation Information

Patent Citations

  • Method and system for testing sensitiveness of touch screen

    CN104461801A

  • Touch screen test method and electronic equipment

    CN112148541A

  • Screen display method, electronic equipment and storage medium

    CN114442870A

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

    CN114689606A

  • Skin beauty integrated device combining unit chair

    KR102532893B1