Interface display method and device, electronic equipment and computer readable storage medium
By acquiring and adjusting canvas fill information, the problems of low canvas utilization and low generation efficiency caused by the increase in the number of elements to be filled are solved, achieving efficient display interface generation and optimized layout, and improving the user interaction experience.
Patent Information
- Application Number
- CN202410968999.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-18
- Publication Date
- 2026-01-20
AI Technical Summary
In existing technologies, as the number of elements to be filled increases, the infinite loop limits the number of iterations, resulting in low canvas utilization and low efficiency in user interface generation.
By obtaining the position and attribute information of the element to be filled, the position of the element to be filled is adjusted using the intermediate canvas filling information, the target canvas filling information is generated, and finally the display interface is generated in the canvas to be filled.
It achieves accurate filling of multiple elements to be filled, improves canvas utilization and display interface generation efficiency, and enhances user interaction experience and visualization effects.
Smart Images

Figure CN121364906A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the fields of computer technology and software technology, and more particularly, to an interface display method and apparatus, an electronic device, a computer-readable storage medium, and a computer program product. Background Art
[0002] With the development of computer technology, a canvas (i.e., Canvas) can be used to generate and display a user interface (User Interface, UI). The canvas can refer to a "container" for user interface components in a game.
[0003] In one example, a user interface can be generated on a canvas based on an overlapping layout algorithm. For example, a canvas and elements to be filled can be generated first, and then the elements to be filled can be filled into the canvas one by one based on the number of loop iterations to generate a user interface.
[0004] In the process of implementing the concept of the present disclosure, the inventors found that there are at least the following problems in the related art: as the number of elements to be filled increases and infinite loops can limit the number of loop iterations, it is impossible to effectively ensure the utilization rate of the canvas and the efficiency of generating the user interface. Summary of the Invention
[0005] In view of this, the present disclosure provides an interface display method and apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
[0006] According to one aspect of the present disclosure, there is provided an interface display method, including: obtaining M positions to be filled and element attribute information corresponding to P element identifiers respectively, where the M positions to be filled are generated according to a canvas to be filled, and both M and P are positive integers; filling the elements to be filled corresponding to the P element identifiers into N positions to be filled according to the P element attribute information, where N < M, to obtain intermediate canvas filling information; adjusting the positions of the P elements to be filled according to the intermediate canvas filling information to obtain target canvas filling information; generating a display interface in the canvas to be filled according to the target canvas filling information; and displaying the display interface.
[0007] According to another aspect of the present disclosure, there is provided an interface display device, including: an acquisition module configured to acquire M positions to be filled and element attribute information corresponding to each of the P element identifiers, wherein the M positions to be filled are generated according to a canvas to be filled, and both M and P are positive integers; a filling module configured to fill the elements to be filled corresponding to each of the P element identifiers into N positions to be filled according to the P element attribute information, obtaining intermediate canvas filling information, where N < M; an adjustment module configured to adjust the positions of the P elements to be filled according to the intermediate canvas filling information, obtaining target canvas filling information; a generation module configured to generate a display interface in the canvas to be filled according to the target canvas filling information; and a display module configured to display the display interface.
[0008] According to another aspect of the present disclosure, there is provided an electronic device, including: one or more processors; a memory configured to store one or more instructions, wherein when the one or more instructions are executed by the one or more processors, the one or more processors are caused to implement the method as described in the present disclosure.
[0009] According to another aspect of the present disclosure, there is provided a computer-readable storage medium having executable instructions stored thereon, where when the executable instructions are executed by a processor, the processor is caused to implement the method as described in the present disclosure.
[0010] According to another aspect of the present disclosure, there is provided a computer program product, where the computer program product includes computer-executable instructions, and the computer-executable instructions are used to implement the method as described in the present disclosure when executed.
[0011] According to an embodiment of the present disclosure, since the intermediate canvas filling information is obtained by filling the elements to be filled corresponding to each of the P element identifiers into N positions to be filled according to the P element attribute information, correct filling of multiple elements to be filled is achieved, ensuring the accuracy and integrity of the filling, and thus the utilization rate of the canvas to be filled can be effectively guaranteed. Since the target canvas filling information is obtained by adjusting the positions of the P elements to be filled according to the intermediate canvas filling information, it helps to optimize the layout of the display interface, thereby improving the efficiency and visual effect of generating the display interface. On this basis, by generating a display interface in the canvas to be filled according to the target canvas filling information, the user can intuitively view the display interface, thus enhancing the interaction experience and visualization effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, the above and other objects, features, and advantages of the present disclosure will become clearer. In the drawings:
[0013] Figure 1 This illustration schematically shows a system architecture to which the interface display method can be applied according to embodiments of the present disclosure;
[0014] Figure 2 A flowchart illustrating an interface display method according to an embodiment of the present disclosure is shown schematically.
[0015] Figure 3A An example schematic diagram of a canvas to be filled according to an embodiment of the present disclosure is shown;
[0016] Figure 3B An example schematic diagram of an element to be filled according to an embodiment of the present disclosure is shown;
[0017] Figure 4 This illustration schematically shows an example diagram of a process for obtaining target canvas fill information according to an embodiment of the present disclosure;
[0018] Figure 5 This illustration shows an example of a process according to an embodiment of the present disclosure, in which P element attribute information is used to fill N positions with elements corresponding to each of the P element identifiers to obtain intermediate canvas filling information.
[0019] Figure 6 This schematically illustrates an example of a process in which the positions of P elements to be filled are adjusted based on intermediate canvas fill information according to an embodiment of the present disclosure to obtain target canvas fill information.
[0020] Figure 7 A block diagram schematically illustrates an interface display device according to an embodiment of the present disclosure; and
[0021] Figure 8 A block diagram schematically illustrates an electronic device suitable for implementing an interface display method according to an embodiment of the present disclosure. Detailed Implementation
[0022] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.
[0023] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0024] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0025] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).
[0026] In the embodiments disclosed herein, the collection, updating, analysis, processing, use, transmission, provision, disclosure, and storage of data (e.g., including but not limited to user personal information) comply with relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. In particular, necessary measures have been taken to prevent unauthorized access to user personal information data and to safeguard user personal information security and network security.
[0027] In the embodiments disclosed herein, user authorization or consent is obtained before acquiring or collecting user personal information.
[0028] For example, after collecting information and / or data, methods such as de-identification or anonymization can be used to de-identify your information in order to protect your information security.
[0029] In one example, an overlapping layout algorithm can be used to generate a user interface on a canvas. For instance, the canvas and elements to be filled can be generated first, and then the elements to be filled can be added to the canvas one by one based on the number of iterations to generate the user interface.
[0030] However, in the example above, as the number of elements to be filled gradually increases, the probability of element collision also increases, resulting in a low canvas occupancy rate. Furthermore, because an infinite loop limits the number of iterations for the elements to be filled, there are issues where configured elements cannot be generated or the number of generated elements is uncertain.
[0031] In order to at least partially solve the technical problems existing in the related art, this disclosure provides an interface display method and apparatus, an electronic device and a computer-readable storage medium.
[0032] Figure 1 The illustration schematically depicts a system architecture to which the interface display method can be applied according to embodiments of the present disclosure. It should be noted that... Figure 1 The examples shown are merely examples of system architectures that can be applied to the embodiments of this disclosure, in order to help those skilled in the art understand the technical content of this disclosure, but do not mean that the embodiments of this disclosure cannot be used in other devices, systems, environments or scenarios.
[0033] like Figure 1 As shown, the system architecture 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between different devices.
[0034] It should be noted that the interface display method provided in this embodiment can generally be executed by the server 105. Accordingly, the interface display device provided in this embodiment can generally be located in the server 105.
[0035] Alternatively, the interface display method provided in this embodiment of the present disclosure can also be executed by the first terminal device 101, the second terminal device 102, or the third terminal device 103. Correspondingly, the interface display device provided in this embodiment of the present disclosure can also be disposed in the first terminal device 101, the second terminal device 102, or the third terminal device 103.
[0036] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0037] It should be noted that the sequence numbers of the operations in the following methods are for descriptive purposes only and should not be considered as indicating the execution order of the operations. Unless explicitly stated otherwise, the method does not need to be executed in the exact order shown.
[0038] Figure 2 A flowchart illustrating an interface display method according to an embodiment of the present disclosure is shown schematically.
[0039] like Figure 2 As shown, the interface display method 200 includes operations S210~S250.
[0040] In operation S210, obtain M positions to be filled and the element attribute information corresponding to P element identifiers. The M positions to be filled are generated based on the canvas to be filled, and M and P are both positive integers.
[0041] In operation S220, based on the attribute information of P elements, the elements to be filled corresponding to the P element identifiers are filled into N positions to obtain the intermediate canvas filling information, where N... <M。
[0042] In operation S230, the positions of P elements to be filled are adjusted according to the intermediate canvas fill information to obtain the target canvas fill information.
[0043] In operation S240, a display interface is generated in the canvas to be filled based on the target canvas fill information.
[0044] When operating the S250, the display interface is shown.
[0045] According to embodiments of this disclosure, the positions to be filled can be generated based on the canvas to be filled. For example, M positions to be filled on the canvas to be filled can be determined based on the size of the canvas to be filled. The size can be used to characterize the size of the canvas to be filled, and can be the length * width of the canvas to be filled. The positions to be filled can be used to characterize the coordinates of unoccupied positions on the canvas to be filled.
[0046] According to embodiments of this disclosure, element attribute information can be used to characterize the size of the element to be filled corresponding to the element identifier. The shape of the element to be filled can be configured according to actual business needs and is not limited herein. The shape of the element to be filled can include at least one of the following: circle, rectangle, square, sector, and polygon, etc. For example, when the shape of the element to be filled is a circle, the element attribute information can be the radius of the circle * the radius of the circle. Alternatively, when the shape of the element to be filled is a rectangle, the element attribute information can be the length of the rectangle * the width of the rectangle.
[0047] According to embodiments of this disclosure, after obtaining M positions to be filled and P element attribute information, a plurality of arranged element identifiers can be determined according to the size of each element to be filled. Based on the plurality of arranged element identifiers, intermediate canvas filling information corresponding to each element identifier is determined one by one according to the M positions to be filled and the P element attribute information.
[0048] According to embodiments of this disclosure, the intermediate canvas fill information may include multiple positions to be filled and multiple filled positions, each filled position may have its own status information. The status information can be used to characterize the fill status of the position to be verified. For example, if the status information is "idle," it can indicate that the position to be verified is not occupied by the element to be filled. Alternatively, if the status information is an element identifier, it can indicate that the position to be verified is occupied by the element to be filled corresponding to the element identifier.
[0049] According to embodiments of this disclosure, after obtaining the intermediate canvas fill information, for each element to be filled, the already filled positions corresponding to each element can be adjusted based on multiple fill positions to obtain the target canvas fill information. In one example, any fill position can be validated based on the size of the element to be filled to obtain a validation result.
[0050] For example, if the validation result indicates that the position to be filled matches the element to be filled, the already filled position corresponding to the element to be filled can be replaced with the position to be filled. Alternatively, if the validation result indicates that the position to be filled does not match the element to be filled, the already filled position corresponding to the element to be filled can remain unchanged.
[0051] According to embodiments of this disclosure, after obtaining the target canvas fill information, unit information for each of at least one UI unit in the display interface can be determined based on the target canvas fill information. Based on the unit information for each of the at least one UI unit, primitive information for at least one graphic element is determined. Based on the primitive information of the at least one graphic element, the display interface is generated in the canvas to be filled. After generating the display interface, it can be displayed to the user.
[0052] According to embodiments of this disclosure, since the intermediate canvas fill information is obtained by filling the elements to be filled corresponding to each of the P element identifiers into N positions based on the P element attribute information, the correct filling of multiple elements to be filled is achieved, ensuring the accuracy and completeness of the filling, thereby effectively guaranteeing the utilization rate of the canvas to be filled. Since the target canvas fill information is obtained by adjusting the positions of the P elements to be filled based on the intermediate canvas fill information, it helps optimize the layout of the display interface, thereby improving the efficiency and visual effect of display interface generation. Based on this, by generating the display interface in the canvas to be filled according to the target canvas fill information, users can intuitively view the display interface, thereby improving the interactive experience and visualization effect.
[0053] The following is for reference. Figure 3A , Figure 3B , Figures 4-6 The interface display method 200 according to an embodiment of the present invention will be further described.
[0054] According to embodiments of this disclosure, operation S210 may include the following operations.
[0055] In response to a received interface display request, a canvas to be filled is generated based on the identifiers of the interface to be displayed indicated in the interface display request. The interface display request also includes P element identifiers. Based on the size of the canvas to be filled, M positions to be filled are generated. The element attribute information corresponding to each of the P element identifiers is determined according to preset element configuration information.
[0056] According to embodiments of this disclosure, the code for generating an interface display request can be pre-written into a script. In response to detecting a user-initiated interface display operation, the script can obtain the identifier of the interface to be generated and P element identifiers input by the user. The identifier of the interface to be generated can be used to uniquely identify the canvas to be filled. The element identifiers can be used to uniquely identify the elements to be filled. The client can run the script to generate an interface display request message based on the identifier of the interface to be generated and the P element identifiers.
[0057] According to embodiments of this disclosure, the client can send the interface display request message to the server. After receiving the interface display request message, the server can generate a canvas to be filled based on the identifier of the interface to be displayed, and determine a List collection corresponding to the canvas to be filled based on the size of the canvas to be filled. The List collection can include M positions to be filled. For example, if the size of the canvas to be filled is 10*10, the positions to be filled can include (1,1), ..., (1,10), ..., (2,1), ..., (2,10), ..., (10,1), ..., (10,10).
[0058] According to embodiments of this disclosure, preset element configuration information can be pre-set. After the server receives the interface display request message, it can also determine the element attribute information corresponding to each element identifier based on the preset element configuration information and element identifiers. The preset element configuration information may include at least one candidate element identifier and candidate element attribute information corresponding to each candidate element identifier. The candidate element attribute information can be used to characterize the size of the candidate element.
[0059] According to embodiments of this disclosure, each element identifier included in the interface display request message can be matched with at least one candidate element identifier, and the candidate element attribute information corresponding to the candidate element identifier that matches the element identifier can be determined as the element attribute information corresponding to the element identifier. The element attribute information can be used to characterize the size of the element to be filled corresponding to the element identifier.
[0060] For example, element attribute information may include at least one of the following: center point coordinates, second x-coordinate, second y-coordinate, left boundary coordinates of the region, right boundary coordinates of the region, upper boundary coordinates of the region, and lower boundary coordinates of the region. In one example, the left boundary coordinates and right boundary coordinates of the region can be determined based on the center point coordinates and second x-coordinate. The upper boundary coordinates and lower boundary coordinates of the region can be determined based on the center point coordinates and second y-coordinate.
[0061] According to embodiments of this disclosure, since the canvas to be filled is generated based on the identifier of the display interface to be generated as indicated by the interface display request, by generating M positions to be filled according to the size of the canvas, it is possible to ensure the reasonable distribution and arrangement of the elements to be filled on the canvas. Furthermore, since the element attribute information is determined based on preset element configuration information, the attribute information of each element to be filled can be configured more accurately, which helps to improve the efficiency of subsequent display interface generation.
[0062] Figure 3A An example schematic diagram of a canvas to be filled according to an embodiment of the present disclosure is shown.
[0063] like Figure 3A As shown in 300A, taking the size of the canvas 301 to be filled as 12*12 as an example, the canvas 301 to be filled can include 12*12 positions to be filled, namely (1,1), ..., (1,12), ..., (12,12).
[0064] Figure 3B An example schematic diagram of an element to be filled according to an embodiment of the present disclosure is shown.
[0065] like Figure 3B As shown in 300B, taking the ellipse-shaped element 302 to be filled as an example, the element attribute information corresponding to the element 302 to be filled can include the center point coordinates. The second horizontal axis Second ordinate .
[0066] According to embodiments of this disclosure, operation S220 may include the following operations.
[0067] Based on the dimensions of the P elements to be filled, determine the P element identifiers in an arranged manner. Based on the attribute information of the P elements, determine the original canvas fill information corresponding to each of the P element identifiers in the arrangement. According to the preset transformation rules, transform the P original canvas fill information to obtain the intermediate canvas fill information.
[0068] According to embodiments of this disclosure, after obtaining the element attribute information corresponding to each of the P element identifiers, the P element identifiers can be sorted according to the size of the P elements to be filled, resulting in a plurality of element identifiers arranged according to the size of the elements to be filled.
[0069] According to embodiments of this disclosure, based on a set of P element identifiers, for each element to be filled, the original canvas fill information for each element to be filled is determined sequentially based on M fill positions and element attribute information corresponding to that element. The original canvas fill information may include the fill positions corresponding to that element.
[0070] According to embodiments of this disclosure, the preset conversion rule may include a method for converting two-dimensional position coordinates into one-dimensional information of a preset representation type. After obtaining the original canvas fill information corresponding to each element identifier, each two-dimensional original canvas fill information can be converted into one-dimensional intermediate canvas fill information one by one based on the preset conversion rule.
[0071] According to embodiments of this disclosure, since the P element identifiers are determined based on the dimensions of the P elements to be filled, by sequentially determining the original canvas fill information corresponding to each of the P element identifiers, the number of elements that can be filled into the canvas can be determined in the early stages of element filling, thereby ensuring that all P elements to be filled are filled into the canvas. By converting the P original canvas fill information according to preset conversion rules, flexible adjustments and transformations can be made as needed, thereby obtaining intermediate canvas fill information that meets different design requirements, facilitating better subsequent processing and improving the efficiency of subsequent interface display.
[0072] According to embodiments of this disclosure, determining the original canvas fill information corresponding to each of the arranged P element identifiers based on the P element attribute information may include the following operations.
[0073] For each of the P arranged element identifiers, candidate x-coordinates and candidate y-coordinates are determined from among M first x-coordinates and M first y-coordinates based on the center point coordinates. The candidate x-coordinates and candidate y-coordinates are then validated based on the second x-coordinate and second y-coordinate to obtain a first validation result. Responding to the first validation result indicating a match between the position to be filled and the element to be filled, the original canvas fill information corresponding to the element identifier is determined based on the position to be filled.
[0074] According to embodiments of this disclosure, each position to be filled may include a first horizontal coordinate and a first vertical coordinate, and each element attribute information may include the center point coordinates, a second horizontal coordinate, and a second vertical coordinate.
[0075] According to embodiments of this disclosure, after obtaining P arranged element identifiers, the elements to be filled can be traversed sequentially from smallest to largest. That is, based on each element identifier arranged according to the size of the element to be filled, candidate positions are determined from M positions. Based on this, the candidate position can be verified according to the element attribute information corresponding to that element identifier, resulting in a first verification result. The first verification result can be used to characterize whether the candidate position matches the element to be filled.
[0076] In one example, the candidate x and y coordinates of the candidate positions to be filled can be verified based on the second x and y coordinates included in the element attribute information to obtain a first verification result. For example, if the first verification result indicates that the position to be filled matches the element to be filled, the candidate position to be filled can be determined as the original canvas filling information corresponding to the element identifier. Alternatively, if the first verification result indicates that the position to be filled does not match the element to be filled, the next candidate position to be filled can be determined and verified. Similarly, by iterating through each element to be filled, P elements to be filled can be sequentially filled into a List from smallest to largest, obtaining the original canvas filling information corresponding to each element identifier.
[0077] According to embodiments of this disclosure, since the first verification result is obtained by verifying the candidate horizontal and vertical coordinates based on the second horizontal and second vertical coordinates, the accuracy of filling each element to be filled can be guaranteed. Furthermore, since the original canvas fill information is determined based on the position to be filled, given that the first verification result indicates a match between the position to be filled and the element to be filled, this helps ensure the accuracy of the original canvas fill information, achieving precise control and optimization of the filling process, and improving the efficiency of subsequent display interface generation.
[0078] Figure 4 The illustration shows an example schematic diagram of a process for obtaining target canvas fill information according to an embodiment of the present disclosure.
[0079] like Figure 4 As shown in Figure 400, after obtaining the attribute information of P elements, the P element identifiers can be determined based on the dimensions of the P elements to be filled. For example, the P element identifiers are element 401, element 402, and element 403 to be filled. Taking the example of needing to fill 5 elements 401, 4 elements 402, and 3 elements 403, the process of obtaining the target canvas fill information is explained.
[0080] Based on the attribute information of P elements, the 12 elements to be filled can be filled into N positions, resulting in an intermediate canvas 404 and its corresponding filling information. Furthermore, based on this intermediate canvas 404, the positions of the 12 elements to be filled can be adjusted to obtain a target canvas 405 and its corresponding filling information. This approach at least partially overcomes the problems of increased element collisions and low canvas occupancy as the number of elements to be filled increases, as well as the issues of unspecified elements failing to be generated or inconsistent element counts due to the infinite loop limiting the number of iterations.
[0081] According to embodiments of this disclosure, verifying candidate abscissas and candidate ordinates based on a second abscissa and a second ordinate to obtain a first verification result may include the following operations.
[0082] Based on the second x-coordinate, the second y-coordinate, the candidate x-coordinate, and the candidate y-coordinate, a first number of first positions to be verified are determined. If the status information of each of the first number of first positions to be verified is idle, a first verification result indicating a match between the position to be filled and the element to be filled is determined. If any of the status information among the first number of status information is occupied, a first verification result indicating a mismatch between the position to be filled and the element to be filled is determined.
[0083] According to embodiments of this disclosure, each position to be filled may have its own status information. The status information can be used to characterize whether the position to be filled has been filled. For example, if the position to be filled is not occupied (i.e., free), the status information can be 0. Alternatively, if the position to be filled is occupied, the status information can be an identifier of the element occupying the position.
[0084] According to embodiments of this disclosure, for each element to be filled, after determining candidate positions to be filled, a first number of first positions to be verified can be determined based on the candidate positions to be filled and the element attribute information of the element to be filled. For example, a first horizontal coordinate threshold and a second horizontal coordinate threshold can be determined based on the second horizontal coordinate and the candidate horizontal coordinate. A first range of horizontal coordinates to be verified is determined based on the first horizontal coordinate threshold and the second horizontal coordinate threshold. A first vertical coordinate threshold and a second vertical coordinate threshold are determined based on the second vertical coordinate and the candidate vertical coordinate. A first range of vertical coordinates to be verified is determined based on the first vertical coordinate threshold and the second vertical coordinate threshold. Based on this, all positions to be filled located within the first range of horizontal coordinates to be verified and the first range of vertical coordinates to be verified can be determined as the first number of first positions to be verified.
[0085] In one example, the sum of the candidate x-coordinate and the second x-coordinate can be determined as the first x-coordinate threshold, and the difference between the candidate x-coordinate and the second x-coordinate can be determined as the second x-coordinate threshold. In another example, the sum of the candidate y-coordinate and the second y-coordinate can be determined as the first y-coordinate threshold, and the difference between the candidate y-coordinate and the second y-coordinate can be determined as the second y-coordinate threshold.
[0086] According to embodiments of this disclosure, after obtaining a first number of first positions to be verified, the status information of each first position to be verified can be determined, and then a first verification result can be determined based on the first number of status information. For example, if all the first number of status information are idle, that is, if none of the first number of first positions to be verified are occupied, a first verification result indicating that the candidate position to be filled matches the element to be filled can be determined. Alternatively, if any of the first number of status information is occupied, a first verification result indicating that the candidate position to be filled does not match the element to be filled can be determined.
[0087] According to embodiments of this disclosure, by accurately judging and effectively controlling the matching between the position to be filled and the element to be filled, the accuracy and efficiency of the element filling process can be improved, thereby improving the accuracy of the subsequent determination of the original canvas filling information.
[0088] According to embodiments of this disclosure, in response to a first verification result indicating that the position to be filled matches the element to be filled, determining the original canvas fill information corresponding to the element identifier based on the position to be filled may include the following operations.
[0089] Update the status information of the first number of first positions to be verified to the element identifier corresponding to the element to be filled. Determine the original canvas filling information based on the first number of first positions to be verified and the status information of each first position to be verified.
[0090] For example, taking a canvas of size 3*3, where the positions to be filled include (1,1), (1,2), (1,3), (2,1), (2,2), (2,3), (3,1), (3,2), and (3,3), and the element attribute information of element A to be filled is (1,1), meaning the second horizontal coordinate of element A to be filled is 1 and the second vertical coordinate is 1, and the element attribute information of element B to be filled is (2,2), meaning the second horizontal coordinate of element B to be filled is 2 and the second vertical coordinate is 2, this example illustrates the process of determining the element canvas fill information.
[0091] For element A to be filled, the candidate position to be filled can be determined as (1, 1), that is, the first horizontal coordinate is 1 and the first vertical coordinate is 1. Then, the first position to be verified corresponding to element A is (1, 1). When the state information corresponding to the above first position to be verified (1, 1) is all idle, the first verification result that represents the match between the candidate position to be filled (1, 1) and element A can be determined.
[0092] Based on this, the status information corresponding to the first position to be verified (1,1) can be updated to the element identifier a1 corresponding to the element A to be filled. Furthermore, the first position to be verified (1,1) and the status information "a1" can be associated and determined as the original canvas filling information corresponding to the element A to be filled.
[0093] For element B to be filled, the candidate position to be filled can be determined as (2, 2). The first verification positions corresponding to element B include (2, 1), (3, 1), (2, 2), and (3, 2). If the state information corresponding to each of the above four first verification positions is idle, the first verification result indicating that the candidate position to be filled (2, 2) matches the element B can be determined.
[0094] Based on this, the status information corresponding to the first positions to be verified (2,1), (3,1), (2,2), and (3,2) can be updated to the element identifier b1 corresponding to the element B to be filled. Furthermore, the first positions to be verified (2,1), (3,1), (2,2), and (3,2) and the status information "b1" can be associated and determined as the original canvas filling information corresponding to the element B to be filled.
[0095] According to embodiments of this disclosure, by updating the state information of each of the first number of first verification positions to the element identifier corresponding to the element to be filled, the correct matching between the filling position and the element to be filled can be ensured. Furthermore, since the original canvas filling information is determined based on the first number of first verification positions and the state information of each first verification position, it helps to accurately obtain the correspondence between the filling position and the element identifier, thereby providing an accurate reference and basis for subsequent filling operations.
[0096] According to embodiments of this disclosure, converting P original canvas fill information according to preset conversion rules to obtain intermediate canvas fill information may include the following operations.
[0097] For each of the P original canvas fill information, and for each of the second number of positions to be transformed, determine the product between the x-coordinate to be transformed and a preset value. Determine the cumulative value between the product and the y-coordinate to be transformed. Based on the cumulative value for each position to be transformed, determine the transformed canvas fill information corresponding to the original canvas fill information. Based on the M positions to be filled and the P transformed canvas fill information, determine the intermediate canvas fill information.
[0098] According to embodiments of this disclosure, each original canvas fill information may include a second number of positions to be transformed, and each position to be transformed may include a horizontal coordinate to be transformed and a vertical coordinate to be transformed.
[0099] According to embodiments of this disclosure, the preset conversion rule can be configured according to actual business needs, and is not limited herein. It is sufficient to convert the two-dimensional x-coordinate and y-coordinate to be converted into the corresponding one-dimensional index. For example, the preset conversion rule can be as shown in equation (1) below.
[0100] (1);
[0101] in, It can represent the x-coordinate to be transformed. It can represent a preset value. It can represent the ordinate to be transformed. It can represent the transformed canvas fill information.
[0102] According to embodiments of this disclosure, after obtaining P original canvas fill information, the horizontal coordinate to be converted can be determined sequentially for each position to be converted in each original canvas fill information. Compared with preset values The product between Determine the product and the ordinate to be transformed The cumulative value between Based on the accumulated value of each position to be converted. Determine the transformed canvas fill information corresponding to the original canvas fill information. Based on this, the intermediate canvas fill information can be determined according to the M positions to be filled and the P transformed canvas fill information.
[0103] For example, taking a preset value of 100, the size of the element C to be filled is 3*3, and the filling starts from the position (55, 38), the original canvas filling information corresponding to the element C to be filled can include the positions to be converted (55, 38), (55, 39), (55, 40), (56, 38), (56, 39), (56, 40), (57, 38), (57, 39) and (58, 40). The index of each position to be converted can be determined by the above formula (1) as shown in Table 1 below.
[0104] Table 1
[0105]
[0106] According to embodiments of this disclosure, since the accumulated value is determined based on the product and the vertical coordinate of the position to be converted, and the product is determined based on the horizontal coordinate of the position to be converted and a preset value, by determining the converted canvas fill information corresponding to the original canvas fill information based on the accumulated value of each position to be converted, it is possible to automatically convert the two-dimensional original canvas fill information into one-dimensional converted canvas fill information, thereby improving the efficiency of subsequent display interface generation.
[0107] Figure 5 The illustration shows an example of a process according to an embodiment of the present disclosure, in which elements corresponding to each of the P element identifiers are filled into N positions to obtain intermediate canvas filling information based on the P element attribute information.
[0108] like Figure 5 As shown in Figure 500, after obtaining the P arranged element identifiers, the center point coordinates 502 corresponding to each element identifier 501 in the P arranged element identifiers can be determined. Based on the center point coordinates 502, candidate abscissas 505 and candidate ordinates 506 are determined from the M first abscissas and M first ordinates.
[0109] Based on the second abscissa 503, second ordinate 504, candidate abscissa 505, and candidate ordinate 506 corresponding to the element identifier 501, a first number of first positions to be verified 507 are determined. Based on the first number of first positions to be verified 507, status information 508 corresponding to each first position to be verified 507 is determined. After obtaining the first number of status information 508, operation S510 can be executed.
[0110] In operation S510, it can be determined whether all status information is idle. If so, a first verification result 509 indicating that the candidate position to be filled matches the element to be filled can be determined. If not, a first verification result 510 indicating that the candidate position to be filled does not match the element to be filled can be determined.
[0111] After obtaining the first verification result 509 that represents the matching of candidate positions to be filled with the element to be filled, the state information of the first number of first positions to be verified can be updated to the element identifier corresponding to the element to be filled, and the original canvas filling information 511 can be determined according to the first number of first positions to be verified and the state information of each first position to be verified.
[0112] For each of the P original canvas fill information 511, and for each of the second number of positions to be converted 512, the product 516 between the x-coordinate 513 to be converted and the preset value 514 of the position to be converted 512 can be determined. The cumulative value 517 between the product 516 and the y-coordinate 514 to be converted of the position to be converted 512 is then determined. Based on the cumulative value 517 for each position to be converted 512, the converted canvas fill information 518 corresponding to the original canvas fill information 511 is determined. Based on this, intermediate canvas fill information 519 can be determined according to the M positions to be filled and the P converted canvas fill information 518.
[0113] According to an embodiment of this disclosure, operation S230 includes repeatedly performing the following operations until target canvas fill information is obtained.
[0114] For each of the P elements to be filled, candidate fill positions are determined from the third number of possible fill positions. The candidate fill positions are validated based on the third x-coordinate and third y-coordinate of the element to be filled, yielding a second validation result. In response to the second validation result indicating a match between the candidate fill position and the element to be filled, the position of the element to be filled is adjusted, resulting in adjusted canvas fill information. Based on the adjusted canvas fill information of each of the P elements to be filled, the target canvas fill information is determined.
[0115] According to embodiments of this disclosure, the intermediate canvas fill information may include a third number of positions to be filled and a fourth number of positions already filled, the sum of the third number and the fourth number being M.
[0116] According to embodiments of this disclosure, after obtaining intermediate canvas fill information, the operations of determining candidate fill positions, verifying candidate fill positions, and adjusting the positions of elements to be filled can be repeatedly performed until all elements to be filled are randomly shuffled and target canvas fill information is obtained.
[0117] According to embodiments of this disclosure, after obtaining the intermediate canvas fill information, candidate fill positions can be randomly determined from a third number of fill positions for each element to be filled. Based on this, the candidate fill positions can be verified according to the element to be filled to obtain a second verification result. The second verification result can be used to characterize whether the candidate fill position matches the element to be filled.
[0118] In one example, candidate fill positions can be validated based on the third x-coordinate and third y-coordinate corresponding to the element to be filled, resulting in a second validation result. For instance, if the second validation result indicates that the candidate fill position matches the element to be filled, the position of the element to be filled can be adjusted to obtain the adjusted canvas fill information corresponding to that element. Alternatively, if the second validation result indicates that the candidate fill position does not match the element to be filled, the next candidate fill position can be randomly determined from a third number of candidate fill positions.
[0119] According to embodiments of this disclosure, since the second verification result is obtained by verifying the candidate fill positions based on the third horizontal and third vertical coordinates of the element to be filled, the accuracy of filling each element to be filled can be guaranteed. Furthermore, since the adjusted canvas fill information is obtained by adjusting the position of the element to be filled after the second verification result indicates that the candidate fill position matches the element to be filled, this helps ensure the accuracy of the target canvas fill information, achieving precise control and optimization of the filling process, and improving the efficiency of subsequent display interface generation.
[0120] According to embodiments of this disclosure, verifying candidate filling positions based on the third abscissa and third ordinate of the element to be filled, and obtaining a second verification result may include the following operations.
[0121] Based on the candidate fill positions, the third x-coordinate, and the third y-coordinate, a fifth number of second positions to be verified are determined. If the status information of each of these fifth number of second positions to be verified is idle, a second verification result indicating a match between the candidate fill position and the element to be filled is determined. If any of the fifth number of status information is occupied, a second verification result indicating a mismatch between the candidate fill position and the element to be filled is determined.
[0122] According to embodiments of this disclosure, for each element to be filled, a candidate filling position can be randomly determined from a third number of positions to be filled. Then, with the candidate filling position as the center and the third x-coordinate and third y-coordinate of the element to be filled as the boundaries, a fifth number of second positions to be verified are determined. The candidate filling position may include a fourth x-coordinate and a fourth y-coordinate.
[0123] For example, threshold values for the third and fourth horizontal coordinates can be determined based on the third and fourth horizontal coordinates. The range of the second horizontal coordinate to be verified can then be determined based on these threshold values. Similarly, threshold values for the third and fourth vertical coordinates can be determined based on the third and fourth vertical coordinates. Finally, the range of the second vertical coordinate to be verified can be determined based on these threshold values. Based on this, all positions to be filled that fall within the range of the second horizontal coordinate to be verified and the range of the second vertical coordinate to be verified can be identified as the fifth number of second positions to be verified.
[0124] According to embodiments of this disclosure, it can be further determined whether the index value of the list corresponding to each two-dimensional array located within the second x-coordinate range and the second y-coordinate range to be verified is empty. For example, after obtaining a fifth number of second positions to be verified, the state information of each second position to be verified can be determined, and then the second verification result can be determined based on the fifth number of state information. For example, if all the fifth number of state information are empty, that is, if none of the fifth number of second positions to be verified are occupied, a second verification result indicating that the candidate filling position matches the element to be filled can be determined. Alternatively, if any of the fifth number of state information is occupied, a second verification result indicating that the candidate filling position does not match the element to be filled can be determined.
[0125] According to embodiments of this disclosure, by accurately judging and effectively controlling the matching between candidate fill positions and elements to be filled, the accuracy and efficiency of the element filling process can be improved, thereby improving the accuracy of the subsequent determination of canvas fill information after adjustment.
[0126] According to embodiments of this disclosure, in response to a second verification result indicating that the candidate fill position matches the element to be filled, adjusting the position of the element to be filled to obtain adjusted canvas fill information may include the following operations.
[0127] Update the current converted canvas fill information of the element to be filled to "empty". Update the state information of the fifth number of second verification positions to the element identifier of the element to be filled, obtaining the updated state information of the fifth number of second verification positions. Based on the fifth number of second verification positions and the updated state information of each second verification position, determine the adjusted canvas fill information of the element to be filled.
[0128] According to an embodiment of this disclosure, in response to the second verification result indicating that the candidate filling position matches the element to be filled, that is, the fifth number of second verification positions corresponding to the candidate filling position are all empty, the list.get(index) corresponding to each of the fifth number of second verification positions can be filled with the element identifier corresponding to the element to be filled. At the same time, the current converted canvas filling information of the element to be filled can be updated to empty to realize area swapping.
[0129] For example, taking a canvas of size 5*5 as an example, the element attribute information of element C to be filled is (1,1), that is, the second horizontal coordinate of element C to be filled is 1 and the second vertical coordinate is 1. The corresponding transformed canvas fill information of element C to be filled is (1,1). The element attribute information of element D to be filled is (2,2), that is, the second horizontal coordinate of element D to be filled is 2 and the second vertical coordinate is 2. The corresponding transformed canvas fill information of element D to be filled is (2,1), (3,1), (2,2) and (3,2). That is, the filled positions include (1,1), (2,1), (3,1), (2,2) and (3,2), and the positions to be filled include (1,2), (1,3), (1,4), (1,5), ..., (2,3), ..., (2,5), (3,3), ..., (3,5), ..., (5,1), ..., (5,5) as an example, the process of determining the adjusted canvas fill information is explained.
[0130] For the element C to be filled, a candidate filling position (3, 3) can be randomly determined from the third number of filling positions. Then, the second verification position corresponding to the element C to be filled includes (3, 3). If the status information corresponding to the second verification position (3, 3) is idle, a second verification result indicating that the candidate filling position (3, 3) and the element C to be filled are matched can be determined.
[0131] Based on this, the status information corresponding to the current converted canvas fill information (1,1) of the element to be filled C can be updated to "idle", and the status information corresponding to the second verification position (3,3) can be updated to the element identifier c1 corresponding to the element to be filled C. Furthermore, the second verification position (3,3) and the status information "c1" can be associated and determined as the adjusted canvas fill information corresponding to the element to be filled C.
[0132] For the element D to be filled, a candidate filling position (1, 3) can be randomly determined from the third number of filling positions. Then, the second verification positions corresponding to the element D to be filled include (1, 3), (1, 4), (2, 3), and (2, 4). If the state information corresponding to the above second verification positions (1, 3), (1, 4), (2, 3), and (2, 4) are all idle, a second verification result indicating that the candidate filling position (1, 3) matches the element D to be filled can be determined.
[0133] Based on this, the status information corresponding to the current converted canvas fill information (2,1), (3,1), (2,2), and (3,2) of the element to be filled, D, can be updated to "idle," and the status information corresponding to the second verification positions (1,3), (1,4), (2,3), and (2,4) can be updated to the element identifier d1 corresponding to the element to be filled, D. Furthermore, the second verification positions (1,3), (1,4), (2,3), and (2,4) and the status information "d1" can be associated and determined as the adjusted canvas fill information corresponding to the element to be filled, D.
[0134] According to embodiments of this disclosure, by updating the state information of each of the fifth number of second verification positions to the element identifier corresponding to the element to be filled, the correct matching between the fill position and the element to be filled can be ensured. Furthermore, since the adjusted canvas fill information is determined based on the fifth number of second verification positions and the updated state information of each second verification position, it helps to accurately obtain the correspondence between the fill position and the element identifier, thereby providing an accurate reference and basis for subsequent fill operations.
[0135] Figure 6 The illustration shows an example of a process in which the positions of P elements to be filled are adjusted according to intermediate canvas fill information to obtain target canvas fill information, according to an embodiment of the present disclosure.
[0136] like Figure 6 As shown, in step 600, candidate filling positions 602 can be determined from the third number of positions to be filled 601. Based on the candidate filling positions 602 and the third horizontal coordinate 604 and third vertical coordinate 605 of the element to be filled 603, a fifth number of second positions to be verified 606 are determined. Based on the fifth number of second positions to be verified 606, the status information 607 of each second position to be verified 606 is determined. After obtaining the fifth number of status information 607, operation S610 can be executed.
[0137] In operation S610, it can be determined whether all status information is idle. If so, a second verification result 608 indicating that the candidate filling position matches the element to be filled can be determined. If not, a second verification result 609 indicating that the candidate filling position does not match the element to be filled can be determined.
[0138] After obtaining the second verification result 608 that represents the candidate filling position matching the element to be filled, the current converted canvas filling information of the element to be filled 603 can be updated to idle, and the state information of the fifth number of second verification positions 606 can be updated to the element identifier of the element to be filled 603, resulting in the fifth number of updated state information 610.
[0139] Based on this, the adjusted canvas fill information 611 of the elements to be filled can be determined according to the fifth number of second verification positions 606 and the updated state information 610 of each second verification position 606. The target canvas fill information 612 is determined according to the adjusted canvas fill information 611 of each of the P elements to be filled 603.
[0140] The above are merely exemplary embodiments, but are not limited thereto. Other interface display methods known in the art may also be included, as long as they can ensure the utilization rate of the canvas to be filled and the efficiency of the display interface generation.
[0141] Figure 7 A block diagram of an interface display device according to an embodiment of the present disclosure is shown schematically.
[0142] like Figure 7 As shown, the interface display device 700 may include an acquisition module 710, a filling module 720, an adjustment module 730, a generation module 740, and a display module 750.
[0143] The acquisition module 710 is used to acquire M positions to be filled and the element attribute information corresponding to P element identifiers. The M positions to be filled are generated based on the canvas to be filled, and M and P are both positive integers.
[0144] Fill module 720 is used to fill the N positions corresponding to the P element identifiers according to the P element attribute information, thereby obtaining the intermediate canvas fill information, where N <M。
[0145] The adjustment module 730 is used to adjust the positions of P elements to be filled based on the intermediate canvas fill information to obtain the target canvas fill information.
[0146] The generation module 740 is used to generate a display interface in the canvas to be filled based on the target canvas fill information.
[0147] Display module 750 is used to display the interface.
[0148] According to embodiments of this disclosure, the filling module 720 may include a first determining submodule, a second determining submodule, and a conversion submodule.
[0149] The first determination submodule is used to determine the identifiers of the P arranged elements based on the dimensions of the P elements to be filled.
[0150] The second determination submodule is used to determine the original canvas fill information corresponding to each of the arranged P element identifiers based on the attribute information of the P elements.
[0151] The conversion submodule is used to convert P original canvas fill information according to preset conversion rules to obtain intermediate canvas fill information.
[0152] According to embodiments of this disclosure, each position to be filled includes a first horizontal coordinate and a first vertical coordinate, and each element attribute information includes center point coordinates, a second horizontal coordinate, and a second vertical coordinate.
[0153] According to embodiments of this disclosure, the second determining submodule may include a first determining unit, a verification unit, and a second determining unit.
[0154] The first determining unit is used to determine, for each of the P arranged element identifiers, a candidate abscissa and a candidate ordinate from M first abscissas and M first ordinates based on the center point coordinates.
[0155] The verification unit is used to verify the candidate abscissa and candidate ordinate based on the second abscissa and the second ordinate, and obtain the first verification result.
[0156] The second determining unit is used to determine the original canvas filling information corresponding to the element identifier based on the original canvas filling information in response to the first verification result indicating that the position to be filled matches the element to be filled.
[0157] According to embodiments of this disclosure, each position to be filled has its own status information.
[0158] According to embodiments of this disclosure, the verification unit may include a first determining subunit, a second determining subunit, and a third determining subunit.
[0159] The first determining subunit is used to determine a first number of first positions to be verified based on the second abscissa, the second ordinate, the candidate abscissa, and the candidate ordinate.
[0160] The second determining subunit is used to determine a first verification result that represents the matching between the position to be filled and the element to be filled, when the status information of each of the first number of first positions to be verified is idle.
[0161] The third determining subunit is used to determine a first verification result indicating that the position to be filled and the element to be filled do not match when any of the first number of state information is occupied.
[0162] According to embodiments of this disclosure, the second determining unit may include an updating subunit and a fourth determining subunit.
[0163] The update sub-unit is used to update the status information of the first number of first positions to be checked to the element identifier corresponding to the element to be filled.
[0164] The fourth determining subunit is used to determine the original canvas filling information based on the first number of first positions to be verified and the state information of each first position to be verified.
[0165] According to embodiments of this disclosure, each original canvas fill information includes a second number of positions to be transformed, and each position to be transformed includes a horizontal coordinate to be transformed and a vertical coordinate to be transformed.
[0166] According to embodiments of this disclosure, the conversion submodule may include a third determining unit, a fourth determining unit, a fifth determining unit, and a sixth determining unit.
[0167] The third determining unit is used to determine the product between the horizontal coordinate to be converted and the preset value for each of the P original canvas fill information and for each of the second number of positions to be converted.
[0168] The fourth determining unit is used to determine the cumulative value between the product and the ordinate to be transformed.
[0169] The fifth determining unit is used to determine the converted canvas fill information corresponding to the original canvas fill information based on the accumulated value of each position to be converted.
[0170] The sixth determining unit is used to determine the intermediate canvas filling information based on the M positions to be filled and the P converted canvas filling information.
[0171] According to embodiments of this disclosure, the intermediate canvas fill information includes a third number of positions to be filled and a fourth number of positions already filled, the sum of the third number and the fourth number being M.
[0172] According to embodiments of this disclosure, the adjustment module 730 may include a third determining submodule, a verification submodule, an adjustment submodule, and a fourth determining submodule.
[0173] The third determination submodule is used to determine the candidate filling position among the third number of filling positions for each of the P elements to be filled.
[0174] The verification submodule is used to verify the candidate filling positions based on the third horizontal and third vertical coordinates of the element to be filled, and obtain the second verification result.
[0175] The adjustment submodule is used to adjust the position of the element to be filled in response to the second verification result indicating that the candidate fill position matches the element to be filled, thereby obtaining the adjusted canvas fill information.
[0176] The fourth determination submodule is used to determine the target canvas fill information based on the adjusted canvas fill information of each of the P elements to be filled.
[0177] According to embodiments of this disclosure, the verification submodule may include a seventh determining unit, an eighth determining unit, and a ninth determining unit.
[0178] The seventh determining unit is used to determine the fifth number of second positions to be verified based on the candidate filling position, the third horizontal coordinate, and the third vertical coordinate.
[0179] The eighth determining unit is used to determine a second verification result that represents the matching between the candidate filling position and the element to be filled, when the status information of each of the fifth number of second positions to be verified is idle.
[0180] The ninth determining unit is used to determine a second verification result indicating that the candidate filling position and the element to be filled do not match when any of the fifth number of state information is occupied.
[0181] According to embodiments of this disclosure, the adjustment submodule may include a first update unit, a second update unit, and a tenth determination unit.
[0182] The first update unit is used to update the current converted canvas fill information of the element to be filled to idle.
[0183] The second update unit is used to update the status information of the fifth number of second positions to be verified to the element identifier of the element to be filled, so as to obtain the updated status information of the fifth number of second positions to be verified.
[0184] The tenth determining unit is used to determine the adjusted canvas fill information of the element to be filled based on the fifth number of second positions to be verified and the updated state information of each second position to be verified.
[0185] According to embodiments of this disclosure, the acquisition module 710 may include a first generation submodule, a second generation submodule, and a fifth determination submodule.
[0186] The first generation submodule is used to respond to a received interface display request and generate a canvas to be filled according to the identifier of the display interface to be generated indicated by the interface display request. The interface display request also includes P element identifiers.
[0187] The second generation submodule is used to generate M positions to be filled based on the size of the canvas to be filled.
[0188] The fifth determination submodule is used to determine the element attribute information corresponding to each of the P element identifiers based on the preset element configuration information.
[0189] Any one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure, or at least part of the functions of any one or more of them, can be implemented in one module. Any one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure can be implemented by dividing them into multiple modules. Any one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure can be at least partially implemented as hardware circuitry, such as a Field-Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a System-on-Chip, a System-on-a-Substrate, a System-on-Package, an Application-Specific Integrated Circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure can be at least partially implemented as computer program modules, which, when run, can perform corresponding functions.
[0190] It should be noted that the interface display device part in the embodiments of this disclosure corresponds to the interface display method part in the embodiments of this disclosure. For a detailed description of the interface display device part, please refer to the interface display method part, which will not be repeated here.
[0191] Figure 8 A block diagram schematically illustrates an electronic device suitable for implementing an interface display method according to an embodiment of the present disclosure. Figure 8 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0192] like Figure 8As shown, a computer electronic device 800 according to an embodiment of the present disclosure includes a processor 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage portion 809 into a random access memory (RAM) 803. The processor 801 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 801 may also include onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0193] RAM 803 stores various programs and data required for the operation of electronic device 800. Processor 801, ROM 802, and RAM 803 are interconnected via bus 804.
[0194] According to embodiments of this disclosure, the electronic device 800 may further include an input / output (I / O) interface 805, which is also connected to a bus 804. The electronic device 800 may also include one or more of the following components connected to the input / output (I / O) interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the input / output (I / O) interface 805 as needed. A removable medium 811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 810 as needed so that computer programs read from it can be installed into the storage section 808 as needed.
[0195] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.
[0196] In this disclosure, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0197] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods provided in the embodiments of this disclosure. When the computer program product is run on an electronic device, the program code is used to enable the electronic device to implement the interface display methods provided in the embodiments of this disclosure.
[0198] When the computer program is executed by the processor 801, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0199] According to embodiments of this disclosure, program code for executing computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages.
[0200] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. It should also be noted that in some alternative implementations, the functions indicated in the boxes may occur in a different order than those shown in the drawings.
[0201] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. The scope of this disclosure is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.
Claims
1. An interface display method, comprising: obtaining M to-be-filled positions and element attribute information corresponding to P element identifiers respectively, wherein the M to-be-filled positions are generated according to a to-be-filled canvas, and M and P are positive integers; filling, according to the P element attribute information, to-be-filled elements corresponding to the P element identifiers into N to-be-filled positions to obtain intermediate canvas filling information, wherein N < M; adjusting, according to the intermediate canvas filling information, positions of the P to-be-filled elements to obtain target canvas filling information; generating, according to the target canvas filling information, a display interface in the to-be-filled canvas; and displaying the display interface.
2. The method of claim 1, wherein, The filling, according to the P element attribute information, of the to-be-filled elements corresponding to the P element identifiers into the N to-be-filled positions to obtain the intermediate canvas filling information comprises: determining arranged P element identifiers according to sizes of the P to-be-filled elements; determining original canvas filling information corresponding to the arranged P element identifiers according to the P element attribute information; and converting, according to a preset conversion rule, the P original canvas filling information to obtain the intermediate canvas filling information.
3. The method of claim 2, wherein, Each of the to-be-filled positions comprises a first horizontal coordinate and a first vertical coordinate, and each of the element attribute information comprises a center point coordinate, a second horizontal coordinate and a second vertical coordinate. The determining, according to the P element attribute information, of the original canvas filling information corresponding to the arranged P element identifiers comprises: for each of the arranged P element identifiers, determining a candidate horizontal coordinate and a candidate vertical coordinate from the M first horizontal coordinates and the M first vertical coordinates according to the center point coordinate; verifying the candidate horizontal coordinate and the candidate vertical coordinate according to the second horizontal coordinate and the second vertical coordinate to obtain a first verification result; and in response to the first verification result representing that the to-be-filled position matches the to-be-filled element, determining the original canvas filling information corresponding to the element identifier according to the to-be-filled position.
4. The method of claim 3, wherein, Each of the to-be-filled positions has state information. The verifying the candidate horizontal coordinate and the candidate vertical coordinate according to the second horizontal coordinate and the second vertical coordinate to obtain the first verification result comprises: determining a first number of first to-be-verified positions according to the second horizontal coordinate, the second vertical coordinate, the candidate horizontal coordinate and the candidate vertical coordinate; in a case where the state information of the first number of first to-be-verified positions is all idle, determining the first verification result representing that the to-be-filled position matches the to-be-filled element; and in a case where any of the first number of state information is occupied, determining the first verification result representing that the to-be-filled position does not match the to-be-filled element.
5. The method of claim 3 or 4, wherein, The determining, in response to the first verification result representing that the to-be-filled position matches the to-be-filled element, of the original canvas filling information corresponding to the element identifier according to the to-be-filled position comprises: updating state information of each of the first number of first to-be-verified positions as an element identifier corresponding to the to-be-filled element; and determining the original canvas filling information according to the first number of first to-be-verified positions and the state information of each of the first to-be-verified positions.
6. The method of claim 2, wherein, Each of the original canvas filling information includes a second number of to-be-converted positions, and each of the to-be-converted positions includes a to-be-converted horizontal coordinate and a to-be-converted vertical coordinate. The converting, according to a preset conversion rule, the P original canvas filling information to obtain the intermediate canvas filling information includes: For each of the P original canvas filling information, for each of the second number of to-be-converted positions, determining a product between the to-be-converted horizontal coordinate and a preset value; determining an accumulated value between the product and the to-be-converted vertical coordinate; determining, according to the accumulated value of each of the to-be-converted positions, a converted canvas filling information corresponding to the original canvas filling information; and determining the intermediate canvas filling information according to the M to-be-filled positions and the P converted canvas filling information.
7. The method of claim 1, wherein, The intermediate canvas filling information includes a third number of to-be-filled positions and a fourth number of filled positions, and a sum of the third number and the fourth number is M; the position adjusting, according to the intermediate canvas filling information, the P to-be-filled elements to obtain target canvas filling information includes repeatedly performing the following operations until the target canvas filling information is obtained: For each of the P to-be-filled elements, determining a candidate filling position in the third number of to-be-filled positions; verifying, according to the third horizontal coordinate and the third vertical coordinate of the to-be-filled element, the candidate filling position to obtain a second verification result; in response to the second verification result representing that the candidate filling position matches the to-be-filled element, adjusting the position of the to-be-filled element to obtain the adjusted canvas filling information; and determining the target canvas filling information according to the adjusted canvas filling information of each of the P to-be-filled elements. The verifying, according to the third horizontal coordinate and the third vertical coordinate of the to-be-filled element, the candidate filling position to obtain a second verification result includes:
8. The method of claim 7, wherein, determining a fifth number of second to-be-verified positions according to the candidate filling position, the third horizontal coordinate and the third vertical coordinate; in a case where the state information of each of the fifth number of second to-be-verified positions is all idle, determining a second verification result representing that the candidate filling position matches the to-be-filled element; and in a case where any of the fifth number of state information is occupied, determining a second verification result representing that the candidate filling position does not match the to-be-filled element. The adjusting, in response to the second verification result representing that the candidate filling position matches the to-be-filled element, the position of the to-be-filled element to obtain the adjusted canvas filling information includes:
9. The method of claim 7 or 8, wherein, updating the current converted canvas filling information of the to-be-filled element as idle; update the state information of each of the fifth number of second to-be-verified positions as the element identifier of the to-be-filled element, to obtain updated state information of each of the fifth number of second to-be-verified positions; and determine adjusted canvas filling information of the to-be-filled element according to the fifth number of second to-be-verified positions and the updated state information of each of the second to-be-verified positions.
10. The method of claim 1, wherein, The obtaining of the M to-be-filled positions and the element attribute information corresponding to the P element identifiers comprises: In response to receiving an interface display request, generating the to-be-filled canvas according to a to-be-generated display interface identifier indicated by the interface display request, wherein the interface display request further comprises the P element identifiers; generating the M to-be-filled positions according to the size of the to-be-filled canvas; and determining the element attribute information corresponding to the P element identifiers according to preset element configuration information.
11. An interface display apparatus, comprising: an obtaining module configured to obtain M to-be-filled positions and element attribute information corresponding to P element identifiers, wherein the M to-be-filled positions are generated according to a to-be-filled canvas, and M and P are positive integers; a filling module configured to fill to-be-filled elements corresponding to the P element identifiers into N to-be-filled positions according to the P element attribute information, to obtain intermediate canvas filling information, wherein N < M; an adjusting module configured to perform position adjustment on the P to-be-filled elements according to the intermediate canvas filling information, to obtain target canvas filling information; a generating module configured to generate a display interface in the to-be-filled canvas according to the target canvas filling information; and a display module configured to display the display interface.
12. An electronic device, comprising: one or more processors; a memory configured to store one or more instructions, wherein when the one or more instructions are executed by the one or more processors, the one or more processors are caused to implement the method of any one of claims 1 to 10.
13. A computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to implement the method of any one of claims 1 to 10.
14. A computer program product, comprising computer executable instructions that, when executed, are configured to implement the method of any one of claims 1 to 10.