A control measurement method, device and equipment based on relative layout

CN118939892BActive Publication Date: 2026-09-18BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310531261.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-11
Publication Date
2026-09-18
Estimated Expiration
2043-05-11

AI Technical Summary

Technical Problem

[0003]而在对控件的测量过程中,目前需要对每个控件在水平方向上测量一次,在垂直方向上测量一次,测量过程耗时长、计算开销较大

Benefits of technology

[0019] In this embodiment, the layout attributes of the relatively laid-out controls are first obtained. These attributes determine the dependencies of any control, allowing the system to mark whether each control depends on other controls in the first and second directions, thus obtaining a marking result. During the measurement of any control, the marking result is read. If the control does not depend on other controls in the first direction, its measurement is skipped in that direction. Similarly, if the control does not depend on other controls in the second direction, its measurement is skipped in that direction. Because some control measurements are skipped, the current practice of performing two measurements for each control is optimized to performing only one measurement for some controls, reducing measurement time and computational overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118939892B_ABST
    Figure CN118939892B_ABST
Patent Text Reader

Abstract

The application discloses a control measurement method and device based on relative layout and equipment, and optimizes the control measurement process based on relative layout. The method comprises the following steps: obtaining the layout attribute of the control based on relative layout; determining the dependency relationship of the target control according to the layout attribute of the control, wherein the dependency relationship comprises a control set depended by the target control, and the target control is one of the controls; generating a marking result of whether the target control depends on other controls in a first direction and a second direction according to the dependency relationship; reading the marking result when the target control is measured, and if the target control does not depend on other controls in a target direction, skipping the measurement of the target control in the target direction, and the target direction is the first direction or the second direction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computers, and specifically to a method, apparatus, and device for measuring controls based on relative layout. Background Technology

[0002] Relative Layout is a layout method for page controls in the Android operating system. It determines the display position of each control on the page based on the relative positions of the controls. To implement page display using Relative Layout, the width and height of each control must first be measured, and then the page display is achieved based on the constraints defined for each control in the Relative Layout.

[0003] Currently, the measurement process for each control requires measuring it once in the horizontal direction and once in the vertical direction, which is time-consuming and computationally expensive. Summary of the Invention

[0004] In view of this, embodiments of this application provide a control measurement method, apparatus, and device based on relative layout to optimize the control measurement process based on relative layout.

[0005] To address the above problems, the technical solutions provided in this application are as follows:

[0006] In a first aspect, embodiments of this application provide a control measurement method based on relative layout, the method comprising:

[0007] Get the layout properties of controls based on relative layout;

[0008] Based on the layout properties of the control, the dependency relationship of the target control is determined. The dependency relationship includes the set of controls that the target control depends on, and the target control is one of the controls.

[0009] Based on the dependency relationship, generate a marker result indicating whether the target control depends on other controls in the first and second directions;

[0010] When measuring the target control, the mark result is read. If the target control does not depend on other controls in the target direction, the measurement of the target control in the target direction is skipped. The target direction is either the first direction or the second direction.

[0011] Secondly, embodiments of this application provide a control measurement device based on relative layout, the device comprising:

[0012] The get unit is used to retrieve the layout properties of controls based on relative layout;

[0013] The determining unit is configured to determine the dependency relationship of the target control based on the layout attributes of the control, wherein the dependency relationship includes a set of controls that the target control depends on, and the target control is one of the controls;

[0014] The generation unit is configured to generate a marking result indicating whether the target control depends on other controls in the first and second directions, based on the dependency relationship.

[0015] A measurement unit is used to read the marking result when measuring the target control. If the target control does not depend on other controls in the target direction, the measurement of the target control in the target direction is skipped. The target direction is either the first direction or the second direction.

[0016] Thirdly, embodiments of this application provide a control measurement device based on relative layout, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the control measurement method based on relative layout as described above.

[0017] Fourthly, embodiments of this application provide a computer-readable storage medium storing instructions that, when executed on a terminal device, cause the terminal device to perform the control measurement method based on relative layout as described above.

[0018] Therefore, the embodiments of this application have the following beneficial effects:

[0019] In this embodiment, the layout attributes of the relatively laid-out controls are first obtained. These attributes determine the dependencies of any control, allowing the system to mark whether each control depends on other controls in the first and second directions, thus obtaining a marking result. During the measurement of any control, the marking result is read. If the control does not depend on other controls in the first direction, its measurement is skipped in that direction. Similarly, if the control does not depend on other controls in the second direction, its measurement is skipped in that direction. Because some control measurements are skipped, the current practice of performing two measurements for each control is optimized to performing only one measurement for some controls, reducing measurement time and computational overhead. Attached Figure Description

[0020] Figure 1 A schematic diagram illustrating an exemplary application scenario provided in this application embodiment;

[0021] Figure 2 A flowchart illustrating a control measurement method based on relative layout provided in an embodiment of this application;

[0022] Figure 3 A schematic diagram illustrating the dependence of a target control on a parent view, as provided in an embodiment of this application;

[0023] Figure 4 A schematic diagram illustrating that the target control provided in this application depends on controls at the same level;

[0024] Figure 5 This is an example flowchart of a control measurement method based on relative layout in the prior art;

[0025] Figure 6 An example flowchart of a control measurement method based on relative layout provided in an embodiment of this application;

[0026] Figure 7 A schematic diagram of a control measurement device based on relative layout provided in an embodiment of this application;

[0027] Figure 8 This is a schematic diagram of a device provided in an embodiment of this application. Detailed Implementation

[0028] To make the above-mentioned objectives, features and advantages of the embodiments of this application more apparent and understandable, the embodiments of this application will be further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0029] To facilitate understanding and explanation of the technical solutions provided in the embodiments of this application, the background technology of the embodiments of this application will be described first below.

[0030] Relative layout is a page control layout method in the Android operating system. It determines the display position of each control on the page based on the relative positions of the controls (Views). For example, the parent view of a control or other controls at the same level can be used as a reference to determine the display position of that control. In implementing page display using relative layout, the width and height of each control must first be measured, and then the page display is achieved based on the constraints defined for each control in the relative layout.

[0031] Currently, in practical applications, the `onMeasure` method in the Android operating system's source code can be used to measure controls. However, measuring controls currently requires measuring the width and height of each control both horizontally and vertically, resulting in a time-consuming measurement process and significant computational overhead, leaving room for optimization.

[0032] Based on this, embodiments of this application provide a control measurement method, apparatus, and device based on relative layout, which optimizes two measurements of some controls into one measurement in certain scenarios, thereby reducing the measurement process time and reducing computational overhead.

[0033] To facilitate understanding of the control measurement method based on relative layout provided in the embodiments of this application, the following is combined with... Figure 1 The example scenario is shown below. See also... Figure 1 As shown in the figure, this figure is a schematic diagram of an exemplary application scenario provided in the embodiments of this application.

[0034] The embodiments of this application can be applied to devices that display pages based on relative layouts, and optimize the measurement process of controls on the page during the display process.

[0035] First, information related to the relative layout can be obtained, such as the layout properties of the controls included in the relative layout. The layout properties of a control can be understood as parameters defining how the control is displayed on the page. Based on the layout properties of the controls, the dependencies of a target control can be determined. These dependencies include the set of controls the target control depends on, and can also include the set of controls that depend on the target control. Therefore, it is possible to mark whether the target control depends on other controls in the first and second directions, and obtain and save the marking results. Specifically, if the first direction is horizontal, then the second direction is vertical; if the first direction is vertical, then the second direction is horizontal.

[0036] During the measurement of controls, the marking results of the controls are read, and the measurement of the control is skipped based on the marking results. Specifically, if the control does not depend on other controls in the first direction, the measurement of the control in the first direction is skipped. Similarly, if the control does not depend on other controls in the second direction, the measurement of the control in the second direction is skipped. This allows some controls to be measured only once, reducing the measurement time and computational overhead.

[0037] Those skilled in the art will understand that Figure 1 The schematic diagram shown is merely one example in which embodiments of this application can be implemented. The scope of application of the embodiments of this application is not limited by any aspect of this framework.

[0038] To facilitate understanding of the embodiments of this application, the following description, in conjunction with the accompanying drawings, illustrates a control measurement method based on relative layout provided by the embodiments of this application.

[0039] See Figure 2 As shown, this figure is a flowchart of a control measurement method based on relative layout provided in an embodiment of this application. Figure 2 As shown, the method may include S201-S204:

[0040] S201: Get the layout properties of a control based on relative layout.

[0041] In this embodiment, relevant information about the relative layout is first obtained, such as the layout attributes of controls in the relative layout. The layout attributes of a control define parameters related to how the control is displayed on the page. For example, the layout attributes of a control may include horizontal attributes, vertical attributes, etc. Horizontal attributes may include the controls that the control depends on in the horizontal direction and their relative positional relationship, or the relative positional relationship between the control and its parent view in the horizontal direction, or the display position of the control in the horizontal direction. For example, the horizontal attributes of control A include: control A depends on control B in the horizontal direction, and control A is offset 10 pixels to the right of control B. Another example is that the horizontal attributes of control A include: control A depends on its parent view in the horizontal direction, and is 10 pixels from the left edge of the parent view in the horizontal direction. Similarly, vertical attributes may include the controls that the control depends on in the vertical direction and their relative positional relationship, or the relative positional relationship between the control and its parent view in the vertical direction, or the display position of the control in the vertical direction.

[0042] S202: Determine the dependencies of the target control based on the layout properties of the control. The dependencies include the set of controls that the target control depends on, and the target control is one of the controls.

[0043] By examining the layout properties of controls, the dependencies of the target control can be further determined. The target control can be any one of the controls, allowing the individual dependencies of each control to be identified. The dependencies of a target control include the set of controls it depends on, and also the set of controls that depend on it. By analyzing the dependencies of the target control, we can obtain a list of controls that the target control depends on, and similarly, we can obtain a list of controls that depend on the target control. A target control depending on other controls can be understood as the target control needing to determine its own position based on the positions of other controls; conversely, other controls depending on the target control needing to determine their own positions based on the position of the target control.

[0044] In practical implementation, the dependencies of the target control in the first and second directions can be determined separately. If the first direction is horizontal, then the second direction is vertical; conversely, if the first direction is vertical, then the second direction is horizontal. The set of controls that the target control depends on can include other controls that the target control depends on in the first direction and other controls that the target control depends on in the second direction, such as controls at the same level that the target control depends on in the first direction and controls at the same level that the target control depends on in the second direction. Similarly, the set of controls that depend on the target control can include other controls that depend on the target control in the first direction and other controls that depend on the target control in the second direction. For example, in the first direction, control A depends on control B, control D depends on control B, and control B depends on control C. If control B is the target control, then the set of controls that control B depends on includes control C, which depends on control B in the first direction. The set of controls that depend on control B includes control A and control D, which depend on control B in the first direction. It is understood that each control has a control identifier, and the dependency relationships can be statistically analyzed through these identifiers.

[0045] S203: Based on the dependency relationship, generate a marker result indicating whether the target control depends on other controls in the first and second directions.

[0046] After determining the dependencies of the target control, you can mark whether the target control depends on other controls in the first and second directions, and then obtain and save the marking results. For example, you can use 1 or 0 to mark whether it depends on other controls. Here, whether it depends on other controls specifically refers to whether it depends on controls at the same level.

[0047] In one possible implementation, the specific implementation of S203 in generating the marking results of whether the target control depends on other controls in the first and second directions based on the dependency relationships of the target control may include:

[0048] If the target control depends on the parent view based on the target control's dependencies, the generated result will show that the target control does not depend on any other controls in either the first or second direction.

[0049] In one possible scenario, the target control may depend on its parent view. In this case, the target control does not depend on controls of the same level in either the first or second direction. Therefore, the generated markup result will show that the target control does not depend on any other controls in either the first or second direction. See also Figure 3 As shown, a schematic diagram illustrates how a target control depends on its parent view. For example, if the target control is 10 pixels away from the left edge of the parent view in the horizontal direction, the target control does not depend on the same level control in either the first or second direction, and thus a marking result is generated accordingly.

[0050] In one possible implementation, the specific implementation of S203 in generating the marking results of whether the target control depends on other controls in the first and second directions based on the dependency relationships of the target control may include:

[0051] If the set of controls that the target control depends on includes controls at the same level as the target control in the first direction, generate a tagging result showing the target control's dependencies on other controls in the first direction;

[0052] If the set of controls that the target control depends on does not include controls at the same level as the target control in the first direction, a markup result is generated indicating that the target control does not depend on any other controls in the first direction.

[0053] If the set of controls that the target control depends on includes controls at the same level as the target control in the second direction, generate a marked result showing the target control's dependencies on other controls in the second direction;

[0054] If the set of controls that the target control depends on does not include controls at the same level as the target control in the second direction, a markup result is generated indicating that the target control does not depend on any other controls in the second direction.

[0055] In another possible scenario, the target control may depend on controls of the same level in both the first and / or second directions. The marking result is generated based on whether or not it depends on controls of the same level. Specifically, if the set of controls the target control depends on includes controls of the same level as the target control in the first direction, it means the target control depends on controls of the same level in the first direction, and a marking result is generated indicating that the target control depends on other controls in the first direction. If the set of controls the target control depends on does not include controls of the same level as the target control in the first direction, it means the target control does not depend on controls of the same level in the first direction, and a marking result is generated indicating that the target control does not depend on other controls in the first direction. Similarly, if the set of controls the target control depends on includes controls of the same level as the target control in the second direction, it means the target control depends on controls of the same level in the second direction, and a marking result is generated indicating that the target control depends on other controls in the second direction. If the set of controls the target control depends on does not include controls of the same level as the target control in the second direction, it means the target control does not depend on controls of the same level in the second direction, and a marking result is generated indicating that the target control does not depend on other controls in the second direction.

[0056] See Figure 4The diagram illustrates a target control that depends on controls at the same level. For example, the target control depends on control A at the same level in a first direction (such as the horizontal direction), generating a markup result showing the target control depending on other controls in the first direction. At the same time, the target control depends on control B at the same level in a second direction (such as the vertical direction), generating a markup result showing the target control depending on other controls in the second direction.

[0057] S204: When measuring the target control, read the mark result. If the target control does not depend on other controls in the target direction, skip the measurement of the target control in the target direction, which is either the first direction or the second direction.

[0058] When measuring each control individually in the target direction, each control can be treated as a target control, and the corresponding marker result can be read. If a target control does not depend on other controls in the target direction, it means its position can be determined by itself in the target direction, and the measurement of that target control in the target direction can be skipped. However, if the target control depends on other controls in the target direction, the target control will be measured normally in the target direction. Here, measurement refers to measuring the width and height of the target control.

[0059] The target direction can be either a first direction or a second direction. During the measurement of controls in the first direction, if the target control does not depend on other controls in that direction, the measurement of that target control is skipped in the first direction; if the target control depends on other controls in the first direction, the measurement of that target control is performed normally in the first direction. Similarly, during the measurement of controls in the second direction, if the target control does not depend on other controls in the second direction, the measurement of that target control is skipped in the second direction; if the target control depends on other controls in the second direction, the measurement of that target control is performed normally in the second direction. When the target control depends on other controls in both the first and second directions, the target control is measured in both directions, and the second measurement can adjust the measurement results of the first measurement. Furthermore, this application does not limit whether the measurement process for controls in the first direction or the measurement process for controls in the second direction is performed first.

[0060] To ensure that each control is measured at least once, in one possible implementation, the control measurement method based on relative layout provided in this application embodiment may further include: if the target control does not depend on other controls in either the first or second direction, measuring the target control in either the first or second direction.

[0061] That is, if the target control does not depend on other controls in the first and second directions, it is still necessary to measure the target control once to ensure that all controls are measured. In the specific implementation, the measurement can be performed in the first or second direction.

[0062] Based on the descriptions in S201-S204, the layout properties of the relatively laid-out controls are first obtained. These properties determine the dependencies of any control, allowing the system to mark whether each control depends on other controls in the first and second directions, thus obtaining the marking results. During the measurement of any control, the marking result is read. If the control does not depend on other controls in the first direction, its measurement in that direction is skipped. Similarly, if the control does not depend on other controls in the second direction, its measurement in that direction is skipped. Because some control measurements are skipped, the current practice of performing two measurements for each control is optimized to performing only one measurement for some controls, reducing measurement time and computational overhead.

[0063] In one possible implementation, the control measurement method based on relative layout provided in this application embodiment may further include:

[0064] Based on the layout properties of the controls, the measurement order of the controls is sorted in the first and second directions.

[0065] When performing dependency analysis on controls, the measurement order of each control can be sorted in both the first and second directions. Controls ranked higher will be measured first. The sorting can be determined according to the dependency order. For example, if control A depends on control B, control B depends on control C, and control C depends on control D in the first direction, then the measurement order in the first direction is control D, control C, control B, and control A.

[0066] In one possible implementation, S204 reads the marking result when measuring the target control. If the target control does not depend on other controls in the target direction, skipping the measurement of the target control in the target direction may include:

[0067] Following the measurement order of controls in the first direction, each control is treated as a target control, and the marking result of the target control is read. If the target control does not depend on other controls in the first direction, the measurement of the target control in the first direction is skipped.

[0068] Following the measurement order of controls in the second direction, each control is treated as a target control, and the marking result of the target control is read. If the target control does not depend on other controls in the second direction, the measurement of the target control in the second direction is skipped.

[0069] In this embodiment, controls can be measured sequentially in the first direction and then sequentially in the second direction. During the measurement process, if the marking results indicate that the measurement of a control needs to be skipped, it is skipped, thereby reducing the number of controls measured. If the marking results indicate that the measurement of a control does not need to be skipped, the measurement is performed normally. That is, if the target control depends on other controls in the first direction, the target control is measured in the first direction; if the target control depends on other controls in the second direction, the target control is measured in the second direction.

[0070] See Figure 5 The diagram illustrates an exemplary flowchart of a control measurement method based on relative layout in the prior art. In the original process, the measurement process is initiated using the onMeasure method in relative layout. First, the measurement order of the controls (views) is sorted using the sortChildren method. The width and height of each control are measured in a loop in the horizontal direction, following the horizontal measurement order. Then, the width and height of each control are measured in a loop in the vertical direction, following the vertical measurement order, until onMeasure finishes execution.

[0071] See Figure 6The diagram illustrates an exemplary flowchart of a control measurement method based on relative layout provided in this application embodiment. In practical applications, this application embodiment utilizes a new onMeasure method to begin the measurement process. To implement the method provided in this application embodiment, a custom subclass inheriting from RelativeLayout can be defined, skipping the original RelativeLayout.onMeasure method. First, the measurement order of the controls (views) is sorted. To perform dependency analysis during the sorting process, i.e., to generate marking results indicating whether the target control depends on other controls in the first and second directions, the sortChildren method needs to be modified. The modification involves copying the subclass and the DependencyGraph class that generates the marking results, and passing a marking object to the getSortedViews method to record the marking results. Then, based on the horizontal measurement order, the width and height of each control are measured cyclically in the horizontal direction. Controls without horizontal dependencies are skipped during the measurement process. Based on the vertical measurement order, the width and height of each control are measured cyclically in the vertical direction. Controls without vertical dependencies are skipped during the measurement process, until onMeasure execution ends. To skip the measurement process for some controls, previously saved marker results are retrieved during the loop measurement, allowing unnecessary measurements to be skipped promptly. After the measurement of each control is completed, other functions within the original onMeasure method are executed via Hook. This reduces the number of control measurements and improves measurement speed in practical applications.

[0072] Based on the control measurement method based on relative layout provided in the above method embodiments, this application embodiment also provides a control measurement device based on relative layout, which will be described below with reference to the accompanying drawings.

[0073] See Figure 7 As shown, this figure is a schematic diagram of the structure of a control measurement device based on relative layout provided in an embodiment of this application. Figure 7 As shown, the device includes:

[0074] Get unit 701, used to get the layout properties of controls based on relative layout;

[0075] The determining unit 702 is used to determine the dependency relationship of the target control based on the layout attributes of the control. The dependency relationship includes a set of controls that the target control depends on, and the target control is one of the controls.

[0076] The generation unit 703 is used to generate a marking result indicating whether the target control depends on other controls in the first direction and the second direction, based on the dependency relationship.

[0077] The measurement unit 704 is used to read the marking result when measuring the target control. If the target control does not depend on other controls in the target direction, the measurement of the target control in the target direction is skipped. The target direction is either the first direction or the second direction.

[0078] In one possible implementation, the measuring unit is further used for:

[0079] If the target control does not depend on other controls in either the first or the second direction, the target control is measured in either the first or the second direction.

[0080] In one possible implementation, the generation unit is specifically used for:

[0081] If the target control depends on the parent view based on the dependency relationship of the target control, a marker result is generated indicating that the target control does not depend on any other controls in the first direction and the second direction.

[0082] In one possible implementation, the generating unit is specifically used for

[0083] If the set of controls that the target control depends on includes controls at the same level as the target control in the first direction, generate a marking result showing that the target control depends on other controls in the first direction;

[0084] If the set of controls that the target control depends on does not include controls at the same level as the target control in the first direction, a markup result is generated indicating that the target control does not depend on any other controls in the first direction;

[0085] If the set of controls that the target control depends on includes controls at the same level as the target control in the second direction, generate a marking result showing that the target control depends on other controls in the second direction;

[0086] If the set of controls that the target control depends on does not include controls at the same level as the target control in the second direction, a markup result is generated indicating that the target control does not depend on any other controls in the second direction.

[0087] In one possible implementation, the device further includes:

[0088] The sorting unit is used to sort the measurement order of the controls in a first direction and a second direction according to the layout attributes of the controls.

[0089] In one possible implementation, the measurement unit includes:

[0090] The first measurement subunit is used to take each of the controls as a target control in the measurement order of the controls in the first direction, read the marking result of the target control, and skip the measurement of the target control in the first direction if the target control does not depend on other controls in the first direction.

[0091] The second measurement subunit is used to take each of the controls as a target control in the second direction according to the measurement order of the controls, read the marking result of the target control, and skip the measurement of the target control in the second direction if the target control does not depend on other controls in the second direction.

[0092] In one possible implementation, the first direction is horizontal and the second direction is vertical, or the first direction is vertical and the second direction is horizontal.

[0093] Based on the control measurement method based on relative layout provided in the above method embodiments, this application also provides an electronic device, including: one or more processors; a storage device storing one or more programs thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the control measurement method based on relative layout as described in any of the above embodiments.

[0094] The following is for reference. Figure 8 The diagram illustrates a structural schematic of an electronic device 1300 suitable for implementing embodiments of this application. The terminal devices in these embodiments may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Android Devices), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs (televisions), desktop computers, etc. Figure 8 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0095] like Figure 8As shown, electronic device 1300 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 1301, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 1302 or a program loaded from storage device 1306 into random access memory (RAM) 1303. RAM 1303 also stores various programs and data required for the operation of electronic device 1300. Processing device 1301, ROM 1302, and RAM 1303 are interconnected via bus 1304. Input / output (I / O) interface 1305 is also connected to bus 1304.

[0096] Typically, the following devices can be connected to I / O interface 1305: input devices 1306 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 1307 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1306 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1309. Communication device 1309 allows electronic device 1300 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 8 An electronic device 1300 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0097] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 1309, or installed from storage device 1306, or installed from ROM 1302. When the computer program is executed by processing device 1301, it performs the functions defined in the methods of embodiments of this application.

[0098] The electronic device provided in this application embodiment belongs to the same inventive concept as the control measurement method based on relative layout provided in the above embodiment. Technical details not described in detail in this embodiment can be found in the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0099] Based on the control measurement method based on relative layout provided in the above method embodiments, this application provides a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the control measurement method based on relative layout as described in any of the above embodiments.

[0100] It should be noted that the computer-readable medium described in the embodiments of this application can be a computer-readable signal medium, a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In the embodiments of this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the embodiments of this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0101] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0102] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0103] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the aforementioned control measurement method based on relative layout.

[0104] Computer program code for performing the operations of the embodiments of this application can be written in one or more programming languages ​​or a combination thereof. These programming languages ​​include, but are not limited to, object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0105] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0106] The units described in the embodiments of this application can be implemented in software or hardware. The names of the units / modules do not necessarily limit the specific unit itself.

[0107] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0108] In the context of embodiments of this application, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0109] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems or apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and relevant parts can be referred to the method section.

[0110] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0111] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0112] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0113] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A control measurement method based on relative layout, characterized in that, The method includes: Get the layout properties of controls based on relative layout; Based on the layout properties of the control, the dependency relationship of the target control is determined. The dependency relationship includes the set of controls that the target control depends on, and the target control is one of the controls. Based on the dependency relationship, generate a marker result indicating whether the target control depends on other controls in the first and second directions; When measuring the target control, the mark result is read. If the target control does not depend on other controls in the target direction, the measurement of the target control in the target direction is skipped. The target direction is either the first direction or the second direction.

2. The method according to claim 1, characterized in that, The method further includes: If the target control does not depend on other controls in either the first or the second direction, the target control is measured in either the first or the second direction.

3. The method according to claim 1, characterized in that, The step of generating a marker result indicating whether the target control depends on other controls in the first and second directions based on the dependency relationships of the target control includes: If the target control depends on the parent view based on the dependency relationship of the target control, a marker result is generated indicating that the target control does not depend on any other controls in the first direction and the second direction.

4. The method according to claim 1, characterized in that, The step of generating a marker result indicating whether the target control depends on other controls in the first and second directions based on the dependency relationships of the target control includes: If the set of controls that the target control depends on includes controls at the same level as the target control in the first direction, generate a marking result showing that the target control depends on other controls in the first direction; If the set of controls that the target control depends on does not include controls at the same level as the target control in the first direction, a markup result is generated indicating that the target control does not depend on any other controls in the first direction; If the set of controls that the target control depends on includes controls at the same level as the target control in the second direction, generate a marking result showing that the target control depends on other controls in the second direction; If the set of controls that the target control depends on does not include controls at the same level as the target control in the second direction, a markup result is generated indicating that the target control does not depend on any other controls in the second direction.

5. The method according to any one of claims 1-4, characterized in that, The method further includes: Based on the layout properties of the controls, the measurement order of the controls is sorted in the first and second directions.

6. The method according to claim 5, characterized in that, The step of reading the marking result when measuring the target control, and skipping the measurement of the target control in the target direction if the target control does not depend on other controls in the target direction, includes: According to the measurement order of the controls in the first direction, each control is taken as a target control, and the marking result of the target control is read. If the target control does not depend on other controls in the first direction, the measurement of the target control in the first direction is skipped. According to the measurement order of the controls in the second direction, each control is taken as a target control, and the marking result of the target control is read. If the target control does not depend on other controls in the second direction, the measurement of the target control in the second direction is skipped.

7. The method according to any one of claims 1-6, characterized in that, The first direction is horizontal and the second direction is vertical, or the first direction is vertical and the second direction is horizontal.

8. A control measurement device based on relative layout, characterized in that, The device includes: The get unit is used to retrieve the layout properties of controls based on relative layout; The determining unit is configured to determine the dependency relationship of the target control based on the layout attributes of the control, wherein the dependency relationship includes a set of controls that the target control depends on, and the target control is one of the controls; The generation unit is configured to generate a marking result indicating whether the target control depends on other controls in the first and second directions, based on the dependency relationship. A measurement unit is used to read the marking result when measuring the target control. If the target control does not depend on other controls in the target direction, the measurement of the target control in the target direction is skipped. The target direction is either the first direction or the second direction.

9. A control measurement device based on relative layout, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the control measurement method based on relative layout as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a terminal device, cause the terminal device to perform the control measurement method based on relative layout as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Optical system, in particular in a microlithographic projection exposure apparatus

    CN102648402A

  • Control layout method and system based on intelligent filtering

    CN108363571A