Layout file supplementing method and device, electronic equipment and storage medium

By obtaining and configuring the display control information of layout files in the terminal device, the problem of missing operating interface components of layout files in different display directions is solved, and normal interface display and aesthetics are achieved in different directions.

CN120255991APending Publication Date: 2025-07-04TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410016233.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-03
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

Under different display directions of terminal devices, the lack of display control information of the operation interface components in the layout file leads to abnormal interface display.

Method used

By obtaining the layout files of the interface to be displayed in different display directions, determining the reference layout files and the layout files to be filled, obtaining the display configuration information of the target operation interface component, configuring the target display control information, and adding it to the layout files to be filled to complete the completion.

Benefits of technology

It avoids interface display abnormalities caused by the lack of display control information of the operation interface components in the layout file, ensures that the target operation interface components can be displayed normally under different display directions, and improves the aesthetics and coordination of the interface.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120255991A_ABST
    Figure CN120255991A_ABST
Patent Text Reader

Abstract

The invention discloses a layout file supplementing method and device, electronic equipment and a storage medium. The embodiment of the invention relates to the technical field of cloud technology and the like. The method comprises the steps of determining a reference layout file and a to-be-supplemented layout file from a first layout file and a second layout file corresponding to a to-be-displayed interface in two different display directions; obtaining display control information of the target operation interface component in the reference layout file as reference display control information; performing attribute value configuration on the reference display control information according to display configuration information of the target operation interface component in the target display direction to obtain target display control information; and supplementing the to-be-supplemented layout file according to the target display control information to obtain a target layout file. In the application, when the to-be-displayed interface is displayed through the target layout file, the target operation interface can also be displayed, and the situation that the to-be-displayed interface is displayed abnormally is eliminated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and more particularly, to a method, apparatus, electronic device, and storage medium for complementing layout files. Background Art

[0002] When a terminal displays the same interface in different display directions, there are differences in the display effects of the interface. Therefore, different layout files are required to display the same interface in different display directions. For example, the layout files required for landscape display and portrait display of the interface to be displayed are different.

[0003] When the information of a certain component in the interface to be displayed is missing in the layout file corresponding to a certain display direction, if the interface to be displayed is displayed according to the layout file corresponding to that display direction, an exception will occur during the display process of the interface to be displayed. Summary of the Invention

[0004] In view of this, embodiments of this application propose a method, apparatus, electronic device, and storage medium for complementing layout files.

[0005] In a first aspect, an embodiment of this application provides a method for complementing a layout file. The method includes: obtaining a first layout file and a second layout file respectively corresponding to an interface to be displayed in two different display directions, where the first layout file and the second layout file include display control information of at least one operation interface component in the interface to be displayed in the corresponding display direction; determining a reference layout file including the display control information of the target operation interface component and a layout file to be complemented that does not include the display control information of the target operation interface component in the first layout file and the second layout file; obtaining the display configuration information of the target operation interface component in the target display direction based on the target display direction corresponding to the layout file to be complemented; and obtaining the display control information of the target operation interface component in the reference layout file as the reference display control information; configuring the attribute values of the display attributes in the reference display control information according to the display configuration information of the target operation interface component in the target display direction to obtain the target display control information of the target operation interface component in the target display direction; and complementing the layout file to be complemented according to the target display control information to obtain a target layout file.

[0006] Second aspect, embodiments of the present application provide a device for completing a layout file. The device includes: a file acquisition module, configured to acquire a first layout file and a second layout file respectively corresponding to a to-be-displayed interface in two different display directions, where the first layout file and the second layout file include display control information of at least one operation interface component in the to-be-displayed interface in the corresponding display direction; a determination module, configured to determine, in the first layout file and the second layout file, a reference layout file including the display control information of the target operation interface component and a to-be-completed layout file not including the display control information of the target operation interface component; an information acquisition module, configured to acquire, based on the target display direction corresponding to the to-be-completed layout file, the display configuration information of the target operation interface component in the target display direction; and acquire the display control information of the target operation interface component in the reference layout file as the reference display control information; a configuration module, configured to configure the display attributes in the reference display control information according to the display configuration information of the target operation interface component in the target display direction to obtain the target display control information of the target operation interface component in the target display direction; a completion module, configured to complete the to-be-completed layout file according to the target display control information to obtain a target layout file.

[0007] Optionally, the completion module is further configured to add the target display control information to the to-be-completed layout file to obtain a candidate layout file; if it is determined according to the reference layout file that there is a dependent operation interface component in the to-be-displayed interface that has a position dependency relationship with the target operation interface component, establish a position dependency relationship between the target operation interface component and each dependent operation interface component in the candidate layout file to obtain the target layout file.

[0008] Optionally, the completion module is further configured to obtain a target position dependency parameter from the display configuration information of the target operation interface component in the target display direction; the target position dependency parameter is used to indicate the relative distance between the target operation interface component and the dependent operation interface component when the to-be-displayed interface is displayed in the target display direction; determine the relative direction between the target operation interface component and the dependent operation interface component according to the reference layout file; and establish a position dependency relationship between the target operation interface component and each dependent operation interface component in the candidate layout file according to the target position dependency parameter and the relative direction to obtain the target layout file.

[0009] Optionally, the completion module is further configured to, if it is determined according to the reference layout file that there is no dependent operation interface component in the to-be-displayed interface that has a position dependency relationship with the target operation interface component, obtain the candidate layout file as the target layout file.

[0010] Optionally, the complementing module is further configured to determine a target parent operation interface component to which the target operation interface component belongs according to a reference layout file; if there are other sub-operation interface components other than the target operation interface component among the sub-operation interface components of the target parent operation interface component determined according to the reference layout file, determine the other sub-operation interface components as dependent operation interface components having a position dependence relationship with the target operation interface component; if there are no other sub-operation interface components among the sub-operation interface components of the target parent operation interface component determined according to the reference layout file, determine that there are no dependent operation interface components having a position dependence relationship with the target operation interface component in the interface to be displayed.

[0011] Optionally, the information acquisition module is further configured to determine a target component group where the target operation interface component is located in at least one component group; based on the target display direction corresponding to the layout file to be complemented, obtain the component group display configuration information of the target component group in the target display direction as the display configuration information of the target operation interface component in the target display direction.

[0012] Optionally, the apparatus further includes an information configuration module, configured to group a plurality of operation interface components in the interface to be displayed according to the display attributes of each operation interface component in the interface to be displayed, to obtain at least one component group.

[0013] Optionally, the information configuration module is further configured to determine the attribute value of the common display attribute in the display direction according to the common display attribute of the operation interface components in the component group in the interface to be displayed and the display size of the interface to be displayed in each display direction; and determine the component group display configuration information of the component group in each display direction according to the attribute value of the common display attribute in the display direction.

[0014] Optionally, each display control information in the first layout file is associated with and stored with the component identifier of the corresponding operation interface component; each display control information in the second layout file is associated with and stored with the component identifier of the corresponding operation interface component; the determining module is further configured to compare the component identifiers in the first layout file and the component identifiers in the second layout file to determine a target component identifier that is only located in one of the first layout file and the second layout file; the operation interface component identified by the target component identifier is used as the target operation interface component; the layout file including the target component identifier in the first layout file and the second layout file is determined as the reference layout file including the display control information of the target operation interface component; the layout file not including the target component identifier in the first layout file and the second layout file is determined as the layout file to be complemented that does not include the display control information of the target operation interface component.

[0015] Optionally, the device further includes a display module, configured to, in response to a display operation on the interface to be displayed in the target display direction, display the interface to be displayed in the target display direction according to the target layout file.

[0016] In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory; computer-readable instructions are stored on the memory, and when the computer-readable instructions are executed by the processor, the above method is implemented.

[0017] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which computer-readable instructions are stored, and when the computer-readable instructions are executed by the processor, the above method is implemented.

[0018] In a fifth aspect, an embodiment of the present application provides a computer program product or a computer program including computer instructions, and when the computer instructions are executed by the processor, the above method is implemented.

[0019] An embodiment of the present application provides a method, a device, an electronic device, and a storage medium for supplementing a layout file. In the present application, first, a reference layout file including display control information of a target operation interface component and a layout file to be supplemented that does not include display control information of the target operation interface component are determined from a first layout file and a second layout file respectively corresponding to an interface to be displayed in two different display directions. Then, according to the display configuration information of the target operation interface component in the target display direction, attribute value configuration is performed on the display attributes in the reference display control information to obtain target display control information of the target operation interface component in the target display direction. Finally, the target display control information is used to supplement the layout file to be supplemented to obtain a target layout file. Since the target layout file includes the target display control information of the target operation interface component in the target display direction, when the interface to be displayed is displayed through the target layout file, the target operation interface component can also be displayed, which can avoid the problem of abnormal display of the interface to be displayed caused by the absence of display control information of the operation interface component in the layout file. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application, and those skilled in the art can obtain other drawings without creative efforts based on these drawings.

[0021] Figure 1 A schematic diagram showing an application scenario applicable to an embodiment of the present application;

[0022] Figure 2The flowchart of a method for completing a layout file proposed in an embodiment of the present application is shown;

[0023] Figure 3 The schematic diagram of a component identification tree in an embodiment of the present application is shown;

[0024] Figure 4 The schematic diagram of a process for completing a layout file in an embodiment of the present application is shown;

[0025] Figure 5 The schematic diagram of a page to be displayed in an embodiment of the present application is shown;

[0026] Figure 6 It shows Figure 2 The flowchart of step S150 in the corresponding embodiment in one embodiment;

[0027] Figure 7 The schematic diagram of a position dependency relationship in an embodiment of the present application is shown;

[0028] Figure 8 It shows Figure 2 The flowchart of the steps before step S130 in the corresponding embodiment in one embodiment;

[0029] Figure 9 The schematic diagram of another interface to be displayed in an embodiment of the present application is shown;

[0030] Figure 10 The schematic diagram of another process for completing a layout file in an embodiment of the present application is shown;

[0031] Figure 11 The schematic diagram of still another process for completing a layout file in an embodiment of the present application is shown;

[0032] Figure 12 The block diagram of a device for completing a layout file proposed in an embodiment of the present application is shown;

[0033] Figure 13 The block diagram of an electronic device for executing the method for completing a layout file according to an embodiment of the present application is shown. Detailed implementation manners

[0034] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. According to the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without making creative efforts belong to the scope of protection of the present application.

[0035] In the following description, the terms "first / second" are merely used to distinguish similar objects and do not represent a specific order for the objects. Understandably, "first / second" can be interchanged with a specific order or sequence when permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0036] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.

[0037] It should be noted that: "a plurality of" as mentioned herein refers to two or more. "And / or" describes the association relationship of associated objects and indicates that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after.

[0038] In the embodiments of this application, the term "module" or "unit" refers to a computer program with a predetermined function or a part of a computer program, which works together with other related parts to achieve a predetermined goal, and can be fully or partially implemented by using software, hardware (such as a processing circuit or a memory), or a combination thereof. Similarly, one processor or multiple processors or memories can be used to implement one or more modules or units. In addition, each module or unit can be a part of the entire module or unit that includes the function of that module or unit.

[0039] The explanations of non-general abbreviations or custom nouns in the embodiments of this application are as follows:

[0040] Portrait and landscape screen layout: The interfaces displayed when the device switches between portrait and landscape screens may be different, and different display interfaces need to be represented by different layout files. Generally, default layout files are created in the layout directory of the device (when there is no corresponding file in the portrait / landscape directory, the files in this directory are used for parsing and display); layout-portrait is the portrait screen directory; layout-land is the landscape screen directory. The application will respectively retrieve the layout files with the same name from the layout-portrait or layout-land directory according to whether the device is currently in landscape or portrait for parsing.

[0041] Auto-completion: In the case where the operation interface components in layout files with different display orientations (such as landscape layout files and portrait layout files) are not aligned one by one (if the display control information of operation interface component A exists in both layout files corresponding to the two display orientations, it is determined that operation interface component A is aligned in these two layout files; conversely, if the display control information of operation interface component A exists in only one of the layout files corresponding to the two display orientations, it is determined that operation interface component A is not aligned in these two layout files), technical means are used to automatically generate the missing display control information of the operation interface components, so that the application will not crash or have other application exception problems due to the misalignment of operation interface components in layout files with different display orientations.

[0042] This application discloses a method, device, electronic device, and storage medium for completing layout files, which relates to cloud technology, etc.

[0043] Cloud storage is a new concept extended and developed from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as the storage system) refers to a storage system that combines a large number of different types of storage devices (storage devices are also called storage nodes) in the network through functions such as cluster applications, grid technology, and distributed storage file systems, and works together through application software or application interfaces to provide data storage and business access functions externally.

[0044] Currently, the storage method of the storage system is as follows: Create a logical volume. When creating a logical volume, physical storage space is allocated for each logical volume, and this physical storage space may be composed of a certain storage device or the disks of several storage devices. The client stores data on a certain logical volume, that is, stores the data on the file system. The file system divides the data into many parts, and each part is an object. The object not only contains data but also contains unmatched information such as data identifiers (IDs, ID entities). The file system writes each object into the physical storage space of the logical volume respectively, and the file system will record the storage location information of each object. Thus, when the client requests to access data, the file system can enable the client to access the data according to the storage location information of each object.

[0045] The process of the storage system allocating physical storage space for a logical volume is specifically as follows: According to the capacity estimation of the objects stored in the logical volume (this estimation often has a large margin relative to the actual capacity of the objects to be stored) and the group of a redundant array of independent disks (RAID), the physical storage space is pre-divided into stripes, and a logical volume can be understood as a stripe, so as to allocate physical storage space for the logical volume.

[0046] As Figure 1 shown, the application scenarios applicable to the embodiments of the present application include a terminal 20 and a server 10, and the terminal 20 and the server 10 are communicatively connected through a wired network or a wireless network. The terminal 20 may include, but is not limited to, a mobile phone, a computer, a smart voice interaction device, a smart home appliance, a vehicle-mounted terminal, an aircraft, and other terminal devices that can execute the method for complementing a layout file, or other applications that can call the method for complementing a layout file (such as an instant messaging application, a shopping application, a search application, a game application, a forum application, a map traffic application, etc.).

[0047] The server 10 may be an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The server 10 may be used to provide services for the applications running on the terminal 20.

[0048] Among them, the server 10 may directly obtain a first layout file and a second layout file respectively corresponding to a to-be-displayed interface in two different display directions, and then determine, from the first layout file and the second layout file, a reference layout file including display control information of a target operation interface component and a to-be-complemented layout file not including display control information of the target operation interface component; thereafter, the server 10 may further obtain, based on the target display direction corresponding to the to-be-complemented layout file, display configuration information of the target operation interface component in the target display direction; and obtain the display control information of the target operation interface component in the reference layout file as reference display control information; and configure the display attributes in the reference display control information according to the display configuration information of the target operation interface component in the target display direction to obtain target display control information of the target operation interface component in the target display direction; finally, the server 10 may complement the to-be-complemented layout file according to the target display control information to obtain a target layout file. After obtaining the target layout file, the server 10 may send the target layout file to the terminal 20 so that the terminal 20 can display the to-be-displayed interface in the target display direction according to the target layout file.

[0049] In the present application, the server 10 may send the target layout file to a distributed cloud storage system, and the terminal 10 sends a file acquisition request to the server 10. The server 10 controls the distributed cloud storage system to return the target layout file corresponding to the file acquisition request to the terminal 20.

[0050] In another embodiment, the terminal 20 can directly obtain the first layout file and the second layout file corresponding to the interface to be displayed in two different display directions, and then execute the method for supplementing the layout file of the present application to obtain the target layout file, and cache the target layout file, so that the terminal 20 can display the interface to be displayed in the target display direction according to the target layout file.

[0051] Please refer to Figure 2 , Figure 2 which shows a flowchart of a method for supplementing a layout file proposed in an embodiment of the present application. The method can be applied to an electronic device, and the electronic device can be Figure 1 the terminal 20 in

[0052] S110. Obtain the first layout file and the second layout file corresponding to the interface to be displayed in two different display directions respectively.

[0053] Wherein, the first layout file and the second layout file include the display control information of at least one operation interface component in the interface to be displayed in the corresponding display direction.

[0054] The interface to be displayed can be any interface output by the electronic device. The interface to be displayed can be the main system interface of the electronic device, a certain interface in the installed application programs (including system application programs and application programs manually installed by users), the playback interface of multimedia information, and the HTML5 interface, etc. For example, the interface to be displayed can be the live broadcast interface in the video playback application. Another example is that the interface to be displayed can be the main system interface of the mobile phone.

[0055] The interface to be displayed can include at least one operation interface component (also called a view component). An operation interface component refers to a component used to implement a certain function or display a certain information. For example, the maximize button in the video playback interface can be used as an operation interface component. Another example is that the brightness button in the menu interface can be used as an operation interface component. Another example is that the little red heart used to display the like count in the live broadcast interface can be used as an operation interface component.

[0056] The display direction corresponding to the first layout file is different from the display direction corresponding to the second layout file. The two different display directions can be the landscape display direction and the portrait display direction respectively. One display direction corresponds to one layout file. For example, the layout file corresponding to the landscape display direction is the first layout file. Correspondingly, the layout file corresponding to the portrait display direction is the second layout file. Or, the layout file corresponding to the portrait display direction is the first layout file, and the layout file corresponding to the landscape display direction is the second layout file.

[0057] The first layout file and the second layout file may refer to layout files that have not undergone padding processing. The first layout file and the second layout file may lack the display control information corresponding to one or more operation interface components in the interface to be displayed. Among them, the display control information corresponding to the operation interface component refers to the control data required for displaying the operation interface component. The display control information corresponding to the operation interface component may include the attribute values of the display attributes corresponding to the operation interface component and the display content information. Among them, the display content information corresponding to the operation interface component may refer to the substantial content such as text, patterns, and images in the operation interface component; the display attributes corresponding to the operation interface component may include the size of the text in the display content information in the operation interface component, the size of the text, the color of the text, the background color of the operation interface component, the size of the operation interface component, the layout direction of the operation interface component (which may include horizontal layout or vertical layout), and the interval between operation interface components, etc. The attribute value of the display attribute refers to the specific value of the display attribute. For example, when the display attribute is the font of the text, the attribute value of the display attribute may refer to the regular script.

[0058] S120. In the first layout file and the second layout file, determine the reference layout file including the display control information of the target operation interface component and the layout file to be padded that does not include the display control information of the target operation interface component.

[0059] After obtaining the first layout file and the second layout file, the first layout file and the second layout file can be compared to determine the reference layout file including the display control information of the target operation interface component and the layout file to be padded that does not include the display control information of the target operation interface component. That is, the target operation interface refers to the operation interface component whose corresponding display control information exists only in one of the first layout file and the second layout file. At this time, the layout file that does not include the display control information of the target operation interface component is used as the layout file to be padded (because it does not have the display control information corresponding to the target operation interface component), and the layout file including the display control information of the target operation interface component is used as the reference layout file (because it has the display control information corresponding to the target operation interface component and can be used as a reference basis for padding the display control information of the target operation interface component for the layout file to be padded).

[0060] In some embodiments, each display control information in the first layout file is stored in an associated manner with the component identifier of the corresponding operation interface component; each display control information in the second layout file is stored in an associated manner with the component identifier of the corresponding operation interface component; wherein, the component identifier is used to identify the operation interface component, and the component identifier can be the name, number, etc. of the operation interface, and the component identifier can be in the form of a combination of numbers and letters; correspondingly, S120 may include: comparing the component identifiers in the first layout file and the component identifiers in the second layout file to determine the target component identifier that is only located in one of the first layout file and the second layout file; the operation interface component identified by the target component identifier is used as the target operation interface component; determining the layout file including the target component identifier in the first layout file and the second layout file as the reference layout file including the display control information of the target operation interface component; determining the layout file that does not include the target component identifier in the first layout file and the second layout file as the to-be-supplemented layout file that does not include the display control information of the target operation interface component.

[0061] In some embodiments, each operation interface component in the layout file is organized in a tree structure, and an operation interface component can be used as a node. Correspondingly, in the layout file, the component identifiers corresponding to the operation interface components form a component identifier tree, and a node in the component identifier tree is the component identifier of an operation interface component. At this time, the component identifiers in the first layout file and the component identifiers in the second layout file can be compared to determine the target component identifier that is only located in one of the first layout file and the second layout file.

[0062] As Figure 3 shown, Figure 3 a in Figure 3 shows the component identifier tree in the layout file in the landscape display direction, Figure 3 b in

[0063] The display control information of the operation interface component includes the attribute values of the display attributes of the operation interface component in the corresponding display directions. In some embodiments, the display attributes of the operation interface component in the display control information may further include a first display attribute, and the attribute value of the first display attribute is used to indicate whether it is necessary to automatically align the operation interface component when the operation interface component is misaligned in the layout files corresponding to two different display directions, that is, to automatically supplement the display control information of the operation interface component in the layout file lacking the display control information of the operation interface component. The attribute value of the first display attribute can be true or false; the attribute value of the first display attribute being true indicates that it is necessary to automatically align the operation interface component. At this time, after determining the target component identifier, the operation interface component identified by the target component identifier is obtained as the target operation interface component; then, the attribute value of the first display attribute of the target operation interface component can be obtained from the reference layout file. If the attribute value of the first display attribute is false, it is determined that there is no need to automatically align the target operation interface component. At this time, after determining the target component identifier, the to-be-displayed interface in the corresponding display direction of the to-be-supplemented layout file is followed, and there is no need to supplement the to-be-supplemented layout file.

[0064] That is to say, after determining the target component identifier, if the first display attribute does not exist in the display control information associated with the target component identifier or the attribute value of the existing first display attribute is true, the operation interface component identified by the target component identifier is determined as the target operation interface component, and the layout file including the target component identifier in the first layout file and the second layout file is determined as the reference layout file including the display control information of the target operation interface component; the layout file not including the target component identifier in the first layout file and the second layout file is determined as the to-be-supplemented layout file not including the display control information of the target operation interface component; if after determining the target component identifier, if the first display attribute exists in the display control information associated with the target component identifier and the attribute value of the first display attribute is false, the target component identifier is directly ignored, and the comparison of the component identifiers continues.

[0065] S130. Based on the target display direction corresponding to the to-be-supplemented layout file, obtain the display configuration information of the target operation interface component in the target display direction; and obtain the display control information of the target operation interface component in the reference layout file as the reference display control information.

[0066] The display direction corresponding to the layout file to be supplemented is used as the target display direction, and the display direction corresponding to the reference layout file is used as the reference display direction; among them, the display configuration information of the operation interface component refers to the configuration information used to supplement the layout file lacking the display control information of the operation interface component. Among them, the display configuration information of the operation interface component can be pre-configured. The display configuration information corresponding to the operation interface component can include the attribute values used to indicate the display attributes of the operation interface component. The display configuration information of the same operation interface component in different display directions can be different.

[0067] In some embodiments, the configuration information configured to supplement the layout file may include the display configuration information of each operation interface component in different display directions. On this basis, after determining the target display direction and the target operation interface component, the display configuration information of the target operation interface component in the target display direction can be obtained from the configuration information.

[0068] After determining the reference layout file, the display control information associated with the component identifier of the target operation interface component can be obtained from the reference layout file as the reference display control information.

[0069] In this embodiment, the display control information of the target operation interface component in the target display direction is missing in the layout file to be supplemented. However, the display content information of the target operation interface component in the target display direction and the reference display direction can be unchanged. Therefore, when adjusting the reference display control information corresponding to the target operation interface component, only the attribute value of the display attribute in the reference display control information corresponding to the target operation interface component needs to be adjusted to obtain the display control information of the target operation interface component in the target display direction.

[0070] In some embodiments, the display configuration information of the target operation interface component in the target display direction can be determined according to the display attributes of the target operation interface component in the interface to be displayed and the display size of the interface to be displayed in the target display direction.

[0071] For example, the display attribute of the target operation interface component in the display interface is red font, the font placeholder size is 4% of the entire interface, the target operation interface component is 1 / 5 from the upper edge of the interface to be displayed and 1 / 4 from the right edge. After determining that the display size of the interface to be displayed in the target display direction is 200×100, it is determined that the text in the target operation interface component is red, the text placeholder is 4×2, and the target operation interface component is 20 from the upper edge and 50 from the right edge of the interface to be displayed.

[0072] S140. Configure the attribute values of the display attributes in the reference display control information according to the display configuration information of the target operation interface component in the target display direction, so as to obtain the target display control information of the target operation interface component in the target display direction.

[0073] As can be seen from the foregoing, the display configuration information of the target operation interface component in the target display direction may include the attribute values of the display attributes of the target operation interface. The reference display control information of the target operation interface component includes the attribute values of the respective display attributes of the target operation interface component in the reference display direction. For the same operation interface component, the display attributes required for the display of the operation interface component in different display directions are basically the same. Therefore, in the application, the attribute values of the display attributes in the reference display control information are configured according to the display configuration information of the target operation interface component in the target display direction, so as to obtain the target display control information of the target operation interface component in the target display direction. The target display control information of the target operation interface component in the target display direction is used to control the display effect of the target operation interface component when the to-be-displayed interface is displayed in the target display direction.

[0074] In some embodiments, the attribute values of the respective display attributes included in the reference display control information may be directly replaced with the attribute values of the corresponding display attributes in the display configuration information of the target operation interface component in the target display direction, so as to obtain the reference display control information with the attribute values of the display attributes replaced, which is used as the target display control information of the target operation interface component in the target display direction.

[0075] It should be noted that, in order to avoid data errors in the reference layout file caused by modifying the reference display control information in the reference layout file, a copy operation may be performed on the reference display control information in the reference layout file to obtain the copied reference display control information. Then, according to the display configuration information of the target operation interface component in the target display direction, the attribute values of the display attributes in the copied reference display control information are configured to obtain the target display control information of the target operation interface component in the target display direction.

[0076] S150. Complete the to-be-completed layout file according to the target display control information to obtain the target layout file.

[0077] After obtaining the target display control information corresponding to the target operation interface component, the target display control information is added to the to-be-completed layout file to complete the to-be-completed layout file, so as to obtain the target layout file.

[0078] It is worth mentioning that if the first layout file does not include the display control information corresponding to the operation interface component A, and the second layout file includes the display control information corresponding to the operation interface component A, the first layout file can be used as the layout file to be supplemented when supplementing the operation interface component A, and the second layout file can be used as the reference layout file when supplementing the operation interface component A; similarly, if the first layout file includes the display control information corresponding to the operation interface component B, and the second layout file does not include the display control information corresponding to the operation interface component B, the second layout file can be used as the layout file to be supplemented when supplementing the operation interface component B, and the first layout file can be used as the reference layout file when supplementing the operation interface component B. That is to say, in this application, the determination of the layout file to be supplemented and the reference layout file is not fixed, but related to the target operation interface component. In other words, for different target operation interface components, the reference layout file may be different, and correspondingly, the layout file to be supplemented may also be different.

[0079] In addition, it should also be noted that in the case where the number of display directions is greater than two, any two display directions can be selected from the multiple display directions to execute the method of this application. After obtaining the target layout file, a new display direction is selected from the display directions that have not been selected among the multiple display directions. The layout file in the new display direction and the target layout file are respectively used as the first layout file and the second layout file, and the method for supplementing the layout file of this application is executed again until all the layout files in all display directions are traversed to complete the supplementation of all layout files.

[0080] For example, when the display directions include the landscape display direction and the portrait display direction, in the case where it is determined that the layout file in the landscape display direction includes the display control information corresponding to the target operation interface component, and the layout file in the portrait display direction does not include the display control information corresponding to the target operation interface component, the process of supplementing the layout file is as follows Figure 4 shown. The display control information p1 of the target operation interface component in the layout file corresponding to the landscape display direction is determined according to the target component identifier s1, the display control information p2 of the target operation interface component corresponding to the portrait display direction is generated according to the display control information p1, and the display control information p2 is added to the layout file corresponding to the portrait display direction to automatically supplement the layout file in the portrait display direction, and the supplemented layout file (i.e., the target layout file) in the portrait display direction is obtained.

[0081] After obtaining the target layout file, it is also possible to respond to the display operation of the interface to be displayed in the target display direction, and display the interface to be displayed in the target display direction according to the target layout file.

[0082] Among them, the display operation of the interface to be displayed in the target display direction can be an operation of receiving an adjustment of the display direction to the target display direction when the electronic device displays the interface to be displayed in the reference display direction (for example, clicking the display direction adjustment button in the display interface or manually adjusting the display direction of the screen of the electronic device to the target display direction); the display operation of the interface to be displayed in the target display direction can also be an interface opening operation of receiving an opening of the interface to be displayed when displaying other interfaces in the target display direction.

[0083] Upon receiving the display operation of the interface to be displayed in the target display direction, in response to the display operation, according to the target layout file, the interface to be displayed is displayed in the target display direction. At this time, the target operation interface component can be displayed in the interface to be displayed according to the target display control information.

[0084] As Figure 5 shown, in Figure 5 a in shows the display effect of the interface 50 to be displayed in the portrait display direction. The interface 50 to be displayed shows the operation interface components 501, 502, and 503. Figure 5 b in shows a schematic diagram of the interface 50 to be displayed in the landscape display direction. It can be seen that when the interface 50 to be displayed is displayed in the landscape display direction, the operation interface component 503 is missing. The reason is that the display control information corresponding to the operation interface component 503 is missing in the landscape layout file of the interface 50 to be displayed in the landscape display direction. The landscape layout file can be supplemented according to the method of this application to obtain the supplemented landscape layout file. When the interface 50 to be displayed is displayed according to the supplemented landscape layout file, the display effect is as Figure 5 shown in c in, and the interface 50 to be displayed includes the supplemented operation interface component 503.

[0085] In this embodiment, first, from the first layout file and the second layout file respectively corresponding to the interface to be displayed in two different display directions, the reference layout file including the display control information of the target operation interface component and the layout file to be supplemented that does not include the display control information of the target operation interface component are determined. Then, according to the display configuration information of the target operation interface component in the target display direction, the display attributes in the reference display control information are configured with attribute values to obtain the target display control information of the target operation interface component in the target display direction. Finally, the target display control information is used to supplement the layout file to be supplemented to obtain the target layout file. Since the target layout file includes the target display control information of the target operation interface component in the target display direction, when the interface to be displayed is displayed through the target layout file, the target operation interface component can also be displayed, which can avoid the problem of abnormal display of the interface to be displayed caused by the absence of the display control information of the operation interface component in the layout file.

[0086] Meanwhile, the target display control information is obtained by configuring the attribute values of the display attributes in the reference display control information according to the display configuration information of the target operation interface component in the target display direction, without changing the display attributes of the target operation interface component, but only changing the attribute values of the display attributes. As a result, the display effects of the target operation interface component when displayed according to the target display control information and the reference display control information are relatively similar, avoiding the situation where the display effects of the target operation interface component in different display directions are significantly different due to different display attributes of the target operation interface in different display directions, which may lead to a poor visual experience of the target operation interface. Therefore, the display effect of the target operation interface component in the target direction is consistent with the display effect in the display direction corresponding to the reference layout file, improving the aesthetics and harmony of the target operation interface component.

[0087] In one embodiment, as Figure 6 shown, step S150 may include:

[0088] S210. Add the target display control information to the layout file to be completed to obtain a candidate layout file.

[0089] The target display control information can be directly added to the layout file to be completed, and the layout file to be completed with the added target display control information is used as the candidate layout file.

[0090] S220. If it is determined according to the reference layout file that there are dependent operation interface components in the interface to be displayed that have a positional dependency relationship with the target operation interface component, establish a positional dependency relationship between the target operation interface component and each dependent operation interface component in the candidate layout file to obtain a target layout file.

[0091] The positional dependency relationship between different operation interface components can be established based on the relative position and relative direction between different operation interfaces. That is to say, when displaying the interface to be displayed based on the established positional dependency relationship, the relative position and relative direction between two operation interfaces are the relative position and relative direction used to establish the positional dependency relationship. The positional dependency relationship can be divided into an explicit positional dependency relationship and an implicit positional dependency relationship.

[0092] In this application, an operation interface component in the interface to be displayed that has a positional dependency relationship with the target operation interface component is called a dependent operation interface component.

[0093] When the positional dependency relationship between operation interface components is an explicit positional dependency relationship, the reference display control information of the reference layout file includes the dependent operation interface component identifier on which the target component identifier (the component identifier corresponding to the target operation interface component) depends and the specific positional dependency relationship. The component identified by the dependent operation interface component identifier refers to the component identifier of the dependent operation interface component that has a positional dependency relationship with the target operation interface component. The positional dependency relationship may include the relative direction and relative distance between the target operation interface component and the dependent operation interface component. Therefore, when copying the reference display control information of the reference layout file, the copied reference display control information also includes the dependent operation interface component identifier on which the target component identifier depends and the positional dependency relationship. At this time, if the copied reference display control information includes the dependent operation interface component identifier on which the target component identifier depends and the positional dependency relationship, it is determined that there is a dependent operation interface component in the interface to be displayed that has a positional dependency relationship with the target operation interface component, and the operation interface component identified by the dependent operation interface component identifier on which the target component identifier depends in the copied reference display control information is used as the dependent operation interface component.

[0094] When the positional dependency relationship between operation interface components is an implicit positional dependency relationship, the reference display control information of the reference layout file does not include the dependent operation interface component identifier on which the target component identifier depends; at this time, according to the reference layout file, the target parent operation interface component to which the target operation interface component belongs is determined; if, according to the reference layout file, it is determined that there are other sub-operation interface components other than the target operation interface component among the sub-operation interface components of the target parent operation interface component, the other sub-operation interface components are determined to be the dependent operation interface components that have a positional dependency relationship with the target operation interface component; if, according to the reference layout file, it is determined that there are no other sub-operation interface components among the sub-operation interface components of the target parent operation interface component, it is determined that there is no dependent operation interface component in the interface to be displayed that has a positional dependency relationship with the target operation interface component.

[0095] In this embodiment, the operation interface components in the layout file are organized in a tree structure. An operation interface component can be used as a node, and the operation interface component represented by the parent node directly connected to a child node refers to the parent operation interface component of the operation interface component represented by the child node. Correspondingly, in the layout file, the component identifiers corresponding to the operation interface components form a component identifier tree. A node in the component identifier tree is the component identifier of an operation interface component, as Figure 3 shown.

[0096] Based on the component identification tree formed by the component identifications in the reference layout file, the parent component identification to which the target component identification of the target operation interface component belongs can be determined as the target parent component identification, and the operation interface component identified by the target parent component identification is obtained as the target parent operation interface component. For example, Figure 3 in a, when the target component identification of the target operation interface component is id-4, the determined target parent component identification is id2.

[0097] After determining the target parent component identification, obtain the child component identifications of the target parent component identification. If the child component identifications of the target parent component identification include the child component identifications excluding the target component identification, it is determined that there are other sub-operation interface components other than the target operation interface component in the sub-operation interface components of the target parent operation interface component, and the other sub-operation interface components are determined as the dependent operation interface components having a position dependence relationship with the target operation interface component (that is, the operation interface components identified by the child component identifications of the target parent component identification that include the child component identifications excluding the target component identification are used as the dependent operation interface components); if the child component identifications of the target parent component identification do not include the child component identifications excluding the target component identification, it is determined that there are no other sub-operation interface components other than the target operation interface component in the sub-operation interface components of the target parent operation interface component.

[0098] It is worth mentioning that, as Figure 7 shown, the position dependence relationship between the target operation interface component and the dependent operation interface component includes that the target operation interface component depends on the dependent operation interface component in terms of position, and the dependent operation interface component depends on the target operation interface component in terms of position. That is to say, the position dependence relationship is mutual. When there is a position dependence relationship between one operation interface component and another operation interface component, it indicates that they are mutually dependent in terms of position.

[0099] After determining that there are dependent operation interface components having a position dependence relationship with the target operation interface component in the interface to be displayed according to the reference layout file, the position dependence relationship between the target operation interface component and each dependent operation interface component can be established in the candidate layout file to obtain the target layout file.

[0100] If the position dependence relationship between the target operation interface component and the dependent operation interface component is an explicit position dependence relationship, the display configuration information of the target operation interface component in the target display direction may include the relative direction and relative distance between the target operation interface component and the dependent operation interface component. Therefore, according to the relative direction and relative distance in the display configuration information of the target operation interface component in the target display direction, the position dependence relationship between the target operation interface component and each dependent operation interface component can be established in the candidate layout file to obtain the target layout file.

[0101] If the positional dependency relationship between the target operation interface component and the dependent operation interface component is an implicit positional dependency relationship, the display configuration information of the target operation interface component in the target display direction only includes the target positional dependency parameter, which is used to indicate the relative distance between the target operation interface component and the dependent operation interface component when displaying the interface to be displayed in the target display direction; at this time, the target positional dependency parameter can be obtained from the display configuration information of the target operation interface component in the target display direction; according to the reference layout file, the relative direction between the target operation interface component and the dependent operation interface component is determined; according to the target positional dependency parameter and the relative direction, the positional dependency relationship between the target operation interface component and each dependent operation interface component is established in the candidate layout file to obtain the target layout file.

[0102] Among them, the reference display control information in the reference layout file may include the relative order between the target operation component and the dependent operation interface component (where the relative order refers to the arrangement order between the target operation component and each dependent operation interface component), and the relative direction between the target operation component and the dependent operation interface component can be determined according to this relative order. After that, the relative direction between the target operation interface component and the dependent operation interface component can be directly obtained from the copied reference display control information obtained after copying the reference display control information in the reference layout file.

[0103] Then, after obtaining the relative direction, the positional dependency relationship between the target operation interface component and each dependent operation interface component can be established in the candidate layout file according to the target positional dependency parameter and the relative direction to obtain the target layout file.

[0104] S230. If it is determined according to the reference layout file that there is no dependent operation interface component in the interface to be displayed that has a positional dependency relationship with the target operation interface component, obtain the candidate layout file as the target layout file.

[0105] If it is determined according to the reference layout file that there is no dependent operation interface component in the interface to be displayed that has a positional dependency relationship with the target operation interface component, it means that the target operation interface component does not need to establish a positional dependency relationship with other interface components. At this time, the candidate layout file can be directly obtained as the target layout file.

[0106] In this embodiment, it is also possible to determine a dependent operation interface component that has a positional dependency relationship with the target operation interface component, and establish a positional dependency relationship between the target operation interface component and each dependent operation interface component in the candidate layout file to obtain a target layout file, so that the target layout file has a positional dependency relationship between the target operation interface component and each dependent operation interface component. Therefore, when the interface to be displayed is displayed according to the target layout file, it is ensured that the target operation interface component and the dependent operation interface components follow the established positional dependency relationship, avoiding the situation where the positional relationship between the target operation interface component and other operation interface components is confused due to adding the target display control information of the target operation interface component in the target display direction to the target layout file.

[0107] In one embodiment, as Figure 8 shown, step S130 may include:

[0108] S310. Determine the target component group where the target operation interface component is located in at least one component group.

[0109] Wherein, a component group includes at least one operation interface component in the interface to be displayed, and the attribute values of the display attributes of the respective operation interface components in a component group may be the same. Among them, the component group including the target operation interface group is used as the target component group.

[0110] In this embodiment, the multiple operation interface components in the interface to be displayed may be grouped according to the display attributes of the respective operation interface components in the interface to be displayed to obtain at least one component group.

[0111] Exemplarily, operation interface components with the same attribute value of the display attribute or the difference between the attribute values under the same display attribute being less than the difference threshold in the interface to be displayed may be divided into one group to obtain at least one component group. For example, the interface to be displayed is as Figure 9As shown, the sizes of the operation interface components 611, 612, and 613 enclosed by the solid line frame 610, the sizes of the included text, the fonts of the text, the colors of the text, and the background colors are the same. It is determined that the attribute values of the display attributes of 611, 612, and 613 are the same, and 611, 612, and 613 are divided into a component group; the sizes of the operation interface components 621 and 622 enclosed by the solid line frame 620, the sizes of the included text, the fonts of the text, the colors of the text, and the background colors are the same. It is determined that the attribute values of the display attributes of 621 and 622 are the same, and 621 and 622 are divided into a component group; the sizes of the operation interface components 631 and 632 enclosed by the solid line frame 630, the sizes of the included text, the fonts of the text, the colors of the text, and the background colors are the same. It is determined that the attribute values of the display attributes of 631 and 632 are the same, and 631 and 632 are divided into a component group; the sizes of the operation interface components 641, 642, and 643 enclosed by the solid line frame 640, the sizes of the included text, the fonts of the text, the colors of the text, and the background colors are the same. It is determined that the attribute values of the display attributes of 641, 642, and 643 are the same, and 641, 642, and 643 are divided into a component group.

[0112] It is worth mentioning that in one embodiment, there may be some operation interface components on the to-be-displayed interface whose display attributes are similar to or the same as those of the to-be-displayed interface. Then, these operation interface components can be divided into the interface component group, and each operation interface component in the interface component group shares the display attributes of the to-be-displayed interface. For example, in Figure 9 , the operation interface component 650 including "Follow" has the same display attributes as the to-be-displayed interface, and it can be divided into the interface component group corresponding to the entire to-be-displayed interface to share the display attributes of the to-be-displayed interface.

[0113] S320. Based on the target display direction corresponding to the to-be-supplemented layout file, obtain the component group display configuration information of the target component group in the target display direction as the display configuration information of the target operation interface component in the target display direction.

[0114] Each component group corresponds to component group display configuration information in different display directions. The component group display configuration information is used to indicate the attribute values of the common display attributes of each operation interface component in the component group; for example, the display configuration information of the component group in the portrait direction is used to indicate the attribute values of the common display attributes corresponding to each operation interface component in the component group when displayed in the portrait direction. Another example is that the display configuration information of the component group in the landscape direction is used to indicate the attribute values of the common display attributes corresponding to each operation interface component in the component group when displayed in the landscape direction. Among them, the common display attribute of the operation interface component refers to the display attribute shared by each operation interface component, and the display effects of the operation interface components configured according to the common display attribute are similar or the same.

[0115] In this embodiment, the attribute value of the common display attribute in the display direction can be determined according to the common display attribute of the operation interface component in the component group in the interface to be displayed and the display size of the interface to be displayed in each display direction; according to the attribute value of the common display attribute in the display direction, the component group display configuration information of the component group in each display direction can be determined.

[0116] For each component group, the common display attribute of the operation interface component in the component group in the interface to be displayed can be determined, and then according to the common display attribute and the display size of the interface to be displayed in each display direction, the attribute value of the common display attribute in each display direction can be determined. For example, the common display attributes of each operation interface component in the component group c1 in the display interface include red font, the font placeholder size is 4% of the entire interface, and the horizontal spacing between two adjacent operation interface components in the component group is 2%. It is determined that the display size of the interface to be displayed in the first display direction is 2000×1600, and it is determined that the display size of the interface to be displayed in the second display direction is 1600×2000. At this time, the attribute values of the common attributes in the component group c1 in the first display direction are: red font, the font placeholder size is 80×64, and the horizontal spacing between two adjacent operation interface components in the component group is 40. The attribute values of the common attributes in the component group c1 in the second display direction are: red font, the font placeholder size is 64×80, and the horizontal spacing between two adjacent operation interface components in the component group is 32.

[0117] After obtaining the attribute values of the corresponding common display attribute of the component group in each display direction, for each display direction, the attribute values of the corresponding common display attribute of the component group in this display direction are summarized to obtain the component group display configuration information of the component group in this display direction.

[0118] In some examples, the display attributes involved in the determined component group display configuration information are shown in Table 1 as follows:

[0119] Table 1

[0120]

[0121] After determining the display direction of the layout file to be supplemented as the target display direction, the target component group including the target operation interface component can be obtained, and the component group display configuration information of the target component group in the two display directions can be determined, and then the component group display configuration information of the target component group in the target display direction can be obtained as the display configuration information of the target operation interface component in the target display direction.

[0122] After that, the steps of S130 - S150 can be continued according to the display configuration information of the target operation interface component in the target display direction to complete the incomplete layout file and obtain the target layout file.

[0123] In some embodiments, the simplification process of completing the layout file is as Figure 10 shown. First, the operation interface components in the interface to be displayed are divided to obtain component groups, and then the component group display configuration information for the component groups is determined. After that, the target operation interface components that are not aligned are searched for, and the target display control information corresponding to the target operation interface components is generated, so as to complete the incomplete layout file that does not include the display control information of the target operation interface components through the target display control information and obtain the target layout file.

[0124] In some other embodiments, the detailed process of completing the layout file is as Figure 11 shown. The component identifiers of the two layout files are compared to determine the target component identifier. The reference display control information is determined in the reference layout file according to the target component identifier, and the copied reference display control information is obtained by copying the reference display control information. At the same time, according to the target component identifier, the target component group where the target operation interface component is located is determined, and the component group display configuration information corresponding to the target display direction of the incomplete layout file is obtained from the component group display configuration information corresponding to the two different display directions of the target component group as the display configuration information of the target operation interface component in the target display direction.

[0125] After that, through the display configuration information of the target operation interface component in the target display direction, the attribute values of the display attributes in the copied reference display control information are configured to obtain the target display control information, and the target display control information is added to the incomplete layout file to obtain a candidate layout file.

[0126] When the target operation interface component is determined, the dependent operation interface component that has a dependency relationship with the target operation interface component can also be determined, and the positional dependency relationship between the target operation interface component and the dependent operation interface component is obtained according to the reference layout file. According to the positional dependency relationship obtained from the reference layout file, the positional dependency relationship between the target operation interface component and the dependent operation interface component is established in the candidate layout file to obtain the target layout file.

[0127] In this embodiment, the operation interface components are divided into component groups, and the component groups share display attributes. It is not necessary to configure display attributes for each operation interface separately, which improves the configuration efficiency of display attributes. At the same time, the operation interface components in each component group share display attributes, making the display effects of the operation interface components in the same component group similar when displayed, improving the coordination and unity of the operation interface components in the same component group, and further improving the display effect of the interface to be displayed.

[0128] Please refer to Figure 12 , Figure 12 which shows a block diagram of a device for supplementing a layout file proposed in an embodiment of the present application. The device 900 includes:

[0129] A file acquisition module 910, configured to acquire a first layout file and a second layout file respectively corresponding to an interface to be displayed in two different display directions. The first layout file and the second layout file include display control information of at least one operation interface component in the interface to be displayed in the corresponding display direction;

[0130] A determination module 920, configured to determine, in the first layout file and the second layout file, a reference layout file including the display control information of the target operation interface component and a layout file to be supplemented that does not include the display control information of the target operation interface component;

[0131] An information acquisition module 930, configured to acquire, based on the target display direction corresponding to the layout file to be supplemented, the display configuration information of the target operation interface component in the target display direction; and acquire the display control information of the target operation interface component in the reference layout file as the reference display control information;

[0132] A configuration module 940, configured to perform attribute value configuration on the display attributes in the reference display control information according to the display configuration information of the target operation interface component in the target display direction, to obtain the target display control information of the target operation interface component in the target display direction;

[0133] A supplementing module 950, configured to supplement the layout file to be supplemented according to the target display control information to obtain a target layout file.

[0134] Optionally, the supplementing module 950 is further configured to add the target display control information to the layout file to be supplemented to obtain a candidate layout file; if it is determined from the reference layout file that there are dependent operation interface components in the interface to be displayed that have a position dependency relationship with the target operation interface component, establish a position dependency relationship between the target operation interface component and each dependent operation interface component in the candidate layout file to obtain the target layout file.

[0135] Optionally, the complementing module 950 is further configured to obtain a target position dependency parameter from the display configuration information of the target operation interface component in the target display direction; the target position dependency parameter is used to indicate the relative distance between the target operation interface component and the dependent operation interface component when the interface to be displayed is displayed in the target display direction; determine the relative direction between the target operation interface component and the dependent operation interface component according to the reference layout file; establish a position dependency relationship between the target operation interface component and each dependent operation interface component in the candidate layout file according to the target position dependency parameter and the relative direction, so as to obtain a target layout file.

[0136] Optionally, the complementing module 950 is further configured to, if it is determined according to the reference layout file that there is no dependent operation interface component in the interface to be displayed that has a position dependency relationship with the target operation interface component, obtain the candidate layout file as the target layout file.

[0137] Optionally, the complementing module 950 is further configured to determine the target parent operation interface component to which the target operation interface component belongs according to the reference layout file; if it is determined according to the reference layout file that there are other sub-operation interface components other than the target operation interface component among the sub-operation interface components of the target parent operation interface component, determine the other sub-operation interface components as the dependent operation interface components that have a position dependency relationship with the target operation interface component; if it is determined according to the reference layout file that there are no other sub-operation interface components among the sub-operation interface components of the target parent operation interface component, determine that there is no dependent operation interface component in the interface to be displayed that has a position dependency relationship with the target operation interface component.

[0138] Optionally, the information acquisition module 930 is further configured to determine the target component group where the target operation interface component is located in at least one component group; based on the target display direction corresponding to the layout file to be complemented, obtain the component group display configuration information of the target component group in the target display direction as the display configuration information of the target operation interface component in the target display direction.

[0139] Optionally, the device further includes an information configuration module, configured to group multiple operation interface components in the interface to be displayed according to the display attributes of each operation interface component in the interface to be displayed, so as to obtain at least one component group.

[0140] Optionally, the information configuration module is further configured to determine the attribute value of the common display attribute in the display direction according to the common display attribute of the operation interface components in the component group in the interface to be displayed and the display size of the interface to be displayed in each display direction; determine the component group display configuration information of the component group in each display direction according to the attribute value of the common display attribute in the display direction.

[0141] Optionally, each display control information in the first layout file is associated and stored with the component identifier of the corresponding operation interface component; each display control information in the second layout file is associated and stored with the component identifier of the corresponding operation interface component; the determining module 920 is further configured to compare the component identifiers in the first layout file and the component identifiers in the second layout file, and determine the target component identifiers that are only located in one of the first layout file and the second layout file; the operation interface component identified by the target component identifier is used as the target operation interface component; the layout file including the target component identifier in the first layout file and the second layout file is determined as the reference layout file including the display control information of the target operation interface component; the layout file that does not include the target component identifier in the first layout file and the second layout file is determined as the to-be-supplemented layout file that does not include the display control information of the target operation interface component.

[0142] Optionally, the apparatus further includes a display module, configured to, in response to a display operation on the interface to be displayed in the target display direction, display the interface to be displayed in the target display direction according to the target layout file.

[0143] It should be noted that the apparatus embodiments in this application correspond to the foregoing method embodiments. For the specific principles in the apparatus embodiments, reference may be made to the content in the foregoing method embodiments, which will not be elaborated here.

[0144] Figure 13 The structural block diagram of an electronic device for executing the method for supplementing a layout file according to an embodiment of the present application is shown. This electronic device may be Figure 1 the terminal 20 or the server 10 in Figure 11 The computer system 1200 of the electronic device shown is only an example, and should not impose any limitation on the functions and usage scope of the embodiments of the present application.

[0145] As Figure 13 shown, the computer system 1200 includes a central processing unit (CPU) 1201, which can execute various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1202 or the program loaded from the storage section 1208 into the random access memory (RAM) 1203, such as executing the method in the foregoing embodiments. In the RAM 1203, various programs and data required for system operation are also stored. The CPU 1201, the ROM 1202, and the RAM 1203 are connected to each other through a bus 1204. The input / output (I / O) interface 1205 is also connected to the bus 1204.

[0146] The following components are connected to the I / O interface 1205: an input section 1206 including a keyboard, a mouse, etc.; an output section 1207 including such as a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage section 1208 including a hard disk, etc.; and a communication section 1209 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to the I / O interface 1205 as required. A removable medium 1211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1210 as required so that a computer program read therefrom can be installed into the storage section 1208 as required.

[0147] Specifically, according to an embodiment of the present application, the processes described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program codes for performing the methods shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication section 1209, and / or installed from the removable medium 1211. When the computer program is executed by a central processing unit (CPU) 1201, various functions defined in the system of the present application are executed.

[0148] It should be noted that the computer-readable medium shown in the embodiments of the present application can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. The 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 of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, apparatus, or device. In the present application, the computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, in which computer-readable program code is carried. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, and this computer-readable medium can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0149] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. Among them, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code, and the above module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

[0150] The units involved in the embodiments described in this application can be implemented in software or in hardware, and the described units can also be provided in a processor. Among them, the names of these units do not constitute a limitation to the units themselves in some cases.

[0151] On the other hand, this application also provides a computer-readable storage medium, which can be included in the electronic device described in the above embodiments; or can exist separately without being assembled into the electronic device. The above computer-readable storage medium carries computer-readable instructions, and when the computer-readable storage instructions are executed by a processor, the methods in any of the above embodiments are implemented.

[0152] According to one aspect of the embodiments of this application, there is provided a computer program product or a computer program, the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the methods in any of the above embodiments.

[0153] It should be noted that although several modules or units of devices for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of the two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0154] Through the description of the above embodiments, those skilled in the art can easily understand that the example embodiments described herein can be implemented by software or by a combination of software and necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable an electronic device (such as a personal computer, a server, a touch terminal, or a network device, etc.) to execute the methods according to the embodiments of this application.

[0155] Other embodiments of the present application will be readily conceived by those skilled in the art after considering the specification and practicing the embodiments disclosed herein. The present application is intended to cover any variations, uses, or adaptations of the present application, which follow the general principles of the present application and include well-known knowledge or conventional technical means in the technical field not disclosed in the present application. It should be understood that the present application is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present application is only limited by the appended claims.

[0156] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and are not intended to limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or equivalently replace some of the technical features. These modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for complementing a layout file, characterized in that, The method includes: Obtaining a first layout file and a second layout file respectively corresponding to a to-be-displayed interface in two different display directions, where the first layout file and the second layout file include display control information of at least one operation interface component in the to-be-displayed interface in the corresponding display direction; In the first layout file and the second layout file, determining a reference layout file including the display control information of the target operation interface component and a to-be-supplemented layout file not including the display control information of the target operation interface component; Based on the target display direction corresponding to the to-be-supplemented layout file, obtaining the display configuration information of the target operation interface component in the target display direction; and obtaining the display control information of the target operation interface component in the reference layout file as the reference display control information; According to the display configuration information of the target operation interface component in the target display direction, configuring the display attributes in the reference display control information to obtain the target display control information of the target operation interface component in the target display direction; Complementing the to-be-supplemented layout file according to the target display control information to obtain a target layout file.

2. The method according to claim 1, wherein The complementing the to-be-supplemented layout file according to the target display control information to obtain a target layout file includes: Adding the target display control information to the to-be-supplemented layout file to obtain a candidate layout file; If it is determined according to the reference layout file that there is a dependent operation interface component in the to-be-displayed interface that has a position dependency relationship with the target operation interface component, establishing a position dependency relationship between the target operation interface component and each dependent operation interface component in the candidate layout file to obtain a target layout file.

3. The method according to claim 2, wherein The establishing a position dependency relationship between the target operation interface component and each dependent operation interface component in the candidate layout file to obtain a target layout file includes: Obtaining a target position dependency parameter from the display configuration information of the target operation interface component in the target display direction; the target position dependency parameter is used to indicate the relative distance between the target operation interface component and the dependent operation interface component when the to-be-displayed interface is displayed in the target display direction; According to the reference layout file, determining the relative direction between the target operation interface component and the dependent operation interface component; According to the target position dependency parameter and the relative direction, establishing a position dependency relationship between the target operation interface component and each dependent operation interface component in the candidate layout file to obtain a target layout file.

4. The method according to claim 2, wherein The complementing the to-be-supplemented layout file according to the target display control information to obtain a target layout file further includes: If it is determined according to the reference layout file that there is no dependent operation interface component in the to-be-displayed interface that has a position dependency relationship with the target operation interface component, obtaining the candidate layout file as the target layout file.

5. The method according to any one of claims 2-4, characterized in that, The method further includes: According to the reference layout file, determining the target parent operation interface component to which the target operation interface component belongs; If, according to the reference layout file, it is determined that there are other sub-operation interface components in the sub-operation interface components of the target parent operation interface component except the target operation interface component, determine that the other sub-operation interface components are dependent operation interface components that have a positional dependency relationship with the target operation interface component; If, according to the reference layout file, it is determined that there are no such other sub-operation interface components in the sub-operation interface components of the target parent operation interface component, determine that there are no dependent operation interface components in the to-be-displayed interface that have a positional dependency relationship with the target operation interface component.

6. The method according to claim 1, wherein The obtaining the display configuration information of the target operation interface component in the target display direction based on the target display direction corresponding to the to-be-supplemented layout file includes: Determine the target component group where the target operation interface component is located in at least one component group; Based on the target display direction corresponding to the to-be-supplemented layout file, obtain the component group display configuration information of the target component group in the target display direction as the display configuration information of the target operation interface component in the target display direction.

7. The method according to claim 6, characterized in that, Before determining the target component group where the target operation interface component is located in at least one component group, the method further includes: Group the multiple operation interface components in the to-be-displayed interface according to the display attributes of each operation interface component in the to-be-displayed interface to obtain at least one component group.

8. The method according to claim 6, characterized in that, Before obtaining the component group display configuration information of the target component group in the target display direction as the display configuration information of the target operation interface component in the target display direction, the method further includes: According to the common display attributes of the operation interface components in the component group in the to-be-displayed interface and the display size of the to-be-displayed interface in each display direction, determine the attribute values of the common display attributes in each display direction; According to the attribute values of the common display attributes in the display direction, determine the component group display configuration information of the component group in the display direction.

9. The method according to claim 1, characterized in that, Each display control information in the first layout file is associated and stored with the component identifier of the corresponding operation interface component; each display control information in the second layout file is associated and stored with the component identifier of the corresponding operation interface component; Determining the reference layout file including the display control information of the target operation interface component and the to-be-supplemented layout file not including the display control information of the target operation interface component in the first layout file and the second layout file includes: Compare the component identifiers in the first layout file and the component identifiers in the second layout file to determine the target component identifier that is only located in one of the first layout file and the second layout file; the operation interface component identified by the target component identifier is used as the target operation interface component; Determine the layout file including the target component identifier in the first layout file and the second layout file as the reference layout file including the display control information of the target operation interface component; Determine the layout files that do not include the target component identifier in the first layout file and the second layout file as the layout files to be supplemented that do not include the display control information of the target operation interface component.

10. The method according to claim 1, wherein After supplementing the layout file to be supplemented according to the target display control information to obtain a target layout file, the method further includes: In response to a display operation on the interface to be displayed in the target display direction, display the interface to be displayed in the target display direction according to the target layout file.

11. An apparatus for complementing a layout file, characterized in that, The device includes: A file acquisition module, configured to acquire a first layout file and a second layout file respectively corresponding to an interface to be displayed in two different display directions, where the first layout file and the second layout file include the display control information of at least one operation interface component in the interface to be displayed in the corresponding display direction; A determination module, configured to determine, in the first layout file and the second layout file, a reference layout file that includes the display control information of the target operation interface component and a layout file to be supplemented that does not include the display control information of the target operation interface component; An information acquisition module, configured to acquire the display configuration information of the target operation interface component in the target display direction based on the target display direction corresponding to the layout file to be supplemented; and acquire the display control information of the target operation interface component in the reference layout file as reference display control information; A configuration module, configured to configure the display attributes in the reference display control information according to the display configuration information of the target operation interface component in the target display direction to obtain the target display control information of the target operation interface component in the target display direction; A supplementing module, configured to supplement the layout file to be supplemented according to the target display control information to obtain a target layout file.

12. An electronic device, characterized in that, Includes: A processor; A memory, on which computer-readable instructions are stored, and when the computer-readable instructions are executed by the processor, the method described in any one of claims 1-10 is implemented.

13. A computer-readable storage medium, characterized in that, On which computer-readable instructions are stored, and when the computer-readable instructions are executed by a processor, the method described in any one of claims 1-10 is implemented.

14. A computer program product or a computer program, characterized in that, Includes computer instructions, characterized in that when the computer instructions are executed by a processor, the method described in any one of claims 1-10 is implemented.