Screen adaptation method and device and storage medium

By setting up grid layout and component group layout for preset screens, and determining the layout of the screen to be adapted based on the size similarity, the problem of cumbersome screen adaptation operations in the prior art is solved, and the effect of quickly adapting to different screens is achieved.

CN120029700APending Publication Date: 2025-05-23CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311579252.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-23
Publication Date
2025-05-23

AI Technical Summary

Technical Problem

The prior art is complicated to operate when adapting to different screens and requires manual adjustment of the screen layout and component position.

Method used

A screen adaptation method is provided, by setting a grid layout and component group layout for the preset screen, determining the grid layout and component group layout of the screen to be adapted based on the similarity between the size information of the screen to be adapted and the size information of the preset screen, and rendering the screen.

Benefits of technology

Simplifies the screen adaptation process, reduces the steps of manual adjustment, and can quickly adapt to different screen pages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120029700A_ABST
    Figure CN120029700A_ABST
Patent Text Reader

Abstract

The invention discloses a screen adaptation method and device and a storage medium, relates to the technical field of computer vision, and is used for solving the problem that the operation is relatively tedious when different screens are adapted. The method comprises the following steps: respectively setting grid layouts for a plurality of preset screens, and setting a layout of a component group in each grid layout; obtaining size information of a to-be-adapted screen and size information of each preset screen; determining a grid layout of the to-be-adapted screen and a layout of a component group in the grid layout of the to-be-adapted screen based on the size information of the to-be-adapted screen and the similarity of the size information of each preset screen; and rendering the to-be-adapted screen based on the grid layout of the to-be-adapted screen and the layout of the component group in the grid layout of the to-be-adapted screen. Different screen pages can be quickly adapted only by determining the grid layout of the to-be-adapted screen.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer vision technology, and in particular to a screen adaptation method, device and storage medium. Background Art

[0002] Currently, free layout or grid layout is usually used for the layout of visualization large screens. Free layout is to use the mouse to drag components to the target position, and grid layout is to set preset grid lines and layout multiple components in each grid. The multiple components in each grid are called component groups.

[0003] However, both the grid layout and the free layout can only adapt to large screens with similar screen ratios. When adapting to other screens, the free layout needs to copy a screen to adjust the screen layout and then manually adjust the positions of all components in the layout. The grid layout needs to adjust the screen layout by adjusting the grid lines and then drag the components to adjust the layout. Both methods are very cumbersome. Summary of the invention

[0004] The present application provides a screen adaptation method, device and storage medium, which are used to solve the problem of complicated operations when adapting to different screens in the general method.

[0005] In order to achieve the above objectives, this application adopts the following technical solutions:

[0006] In a first aspect, a screen adaptation method is provided, comprising: setting a grid layout for each preset screen in at least one preset screen, and setting a layout of a component group in each grid layout; obtaining size information of a screen to be adapted, and size information of each preset screen in at least one preset screen; determining a grid layout of the screen to be adapted, and a layout of a component group in the grid layout of the screen to be adapted based on the size information of the screen to be adapted, and a similarity of the size information of each preset screen in at least one preset screen; rendering the screen to be adapted based on the grid layout of the screen to be adapted, and the layout of the component group in the grid layout of the screen to be adapted.

[0007] Optionally, based on the size information of the screen to be adapted and the similarity of the size information of each preset screen in at least one preset screen, the grid layout of the screen to be adapted and the layout of the component groups in the grid layout of the screen to be adapted are determined, including: calculating the similarity between the size information of each preset screen in at least one preset screen and the size information of the screen to be adapted, and determining the preset screen that meets the similarity rule as the target screen; determining the grid layout of the target screen as the grid layout of the screen to be adapted, and determining the layout of the component groups in the grid layout of the target screen as the layout of the component groups in the grid layout of the screen to be adapted.

[0008] Optionally, the size information of each preset screen in at least one preset screen is respectively calculated to be similar to the size information of the screen to be adapted, and the preset screen that meets the similarity rule is determined as the target screen, including: step 1, determining the size information of the first screen; the first screen is any screen in the preset screens that has not currently been calculated to be similar to the screen to be adapted; step 2, determining the similarity between the size information of the screen to be adapted and the size information of the first screen; step 3, when the similarity between the size information of the screen to be adapted and the first screen meets the preset similarity rule, determining the first screen as the target screen; step 4, when the similarity between the size information of the screen to be adapted and the first screen does not meet the preset similarity rule, reselecting the first screen from the preset screens that have not currently been calculated to be similar to the screen to be adapted, and iteratively executing steps 1, step 2, step 3, and step 4 until the target screen is determined.

[0009] Optionally, the size information includes size and aspect ratio; the preset similarity rule includes: the absolute value of the difference between the size of the screen to be adapted and the size of the preset screen is less than the first difference, and the absolute value of the difference between the aspect ratio of the screen to be adapted and the aspect ratio of the preset screen is less than the second difference.

[0010] Optionally, based on the grid layout of the screen to be adapted and the layout of the component groups in the grid layout of the screen to be adapted, rendering the screen to be adapted includes: determining the configuration information of the layout of the component groups in the grid layout of the target screen; the configuration information of the layout of the component groups includes the attribute information, event information, and data interaction information of the component groups; determining the configuration information of the grid layout of the screen to be adapted; the configuration information of the grid layout includes the row and column information of the grid layout; based on the layout of the component groups in the grid layout of the screen to be adapted, using the configuration information of the layout of the component groups and the configuration information of the grid layout, rendering the screen to be adapted.

[0011] Optionally, a grid layout is set for each preset screen in at least one preset screen, and a layout of a component group in each grid layout is set, including: setting a grid layout for each preset screen in at least one preset screen; setting a layout of a component group for a first preset screen in at least one preset screen; the first preset screen is any preset screen in at least one preset screen; based on the layout of the component group for the first preset screen, obtaining the layout of the component groups for other preset screens in at least one preset screen.

[0012] In a second aspect, a screen adaptation device is provided, comprising: a processing unit and a communication unit; the processing unit is used to set a grid layout for each preset screen in at least one preset screen, and set the layout of the component group in each grid layout; the communication unit is used to obtain the size information of the screen to be adapted, and the size information of each preset screen in at least one preset screen; the processing unit is also used to determine the grid layout of the screen to be adapted, and the layout of the component group in the grid layout of the screen to be adapted based on the size information of the screen to be adapted and the similarity of the size information of each preset screen in at least one preset screen; the processing unit is also used to render the screen to be adapted based on the grid layout of the screen to be adapted and the layout of the component group in the grid layout of the screen to be adapted.

[0013] Optionally, the processing unit is specifically used to: calculate the similarity between the size information of each preset screen in at least one preset screen and the size information of the screen to be adapted, and determine the preset screen that meets the similarity rule as the target screen; determine the grid layout of the target screen as the grid layout of the screen to be adapted, and determine the layout of the component group in the grid layout of the target screen as the layout of the component group in the grid layout of the screen to be adapted.

[0014] Optionally, the processing unit is specifically used to: Step 1, determine the size information of the first screen; the first screen is any screen among the preset screens that have not currently performed similarity calculation with the screen to be adapted; Step 2, determine the similarity between the size information of the screen to be adapted and the size information of the first screen; Step 3, when the similarity between the size information of the screen to be adapted and the first screen meets the preset similarity rule, determine the first screen as the target screen; Step 4, when the similarity between the size information of the screen to be adapted and the first screen does not meet the preset similarity rule, reselect the first screen from the preset screens that have not currently performed similarity calculation with the screen to be adapted, and iteratively execute Step 1, Step 2, Step 3, and Step 4 until the target screen is determined.

[0015] Optionally, the size information includes size and aspect ratio; the preset similarity rule includes: the absolute value of the difference between the size of the screen to be adapted and the size of the preset screen is less than the first difference, and the absolute value of the difference between the aspect ratio of the screen to be adapted and the aspect ratio of the preset screen is less than the second difference.

[0016] Optionally, the processing unit is specifically used to: determine the configuration information of the layout of the component group in the grid layout of the target screen; the configuration information of the component group's layout includes attribute information, event information, and data interaction information of the component group; determine the configuration information of the grid layout of the screen to be adapted; the configuration information of the grid layout includes row and column information of the grid layout; based on the layout of the component group in the grid layout of the screen to be adapted, use the configuration information of the component group's layout and the configuration information of the grid layout to render the screen to be adapted.

[0017] Optionally, the processing unit is specifically used to: set a grid layout for each preset screen in at least one preset screen; set a layout for a component group for a first preset screen in at least one preset screen; the first preset screen is any preset screen in at least one preset screen; based on the layout of the component group for the first preset screen, obtain the layout of the component groups for other preset screens in at least one preset screen.

[0018] In a third aspect, a screen adaptation device is provided, comprising a memory and a processor; the memory is used to store computer execution instructions, and the processor is connected to the memory through a bus; when the screen adaptation device is running, the processor executes the computer execution instructions stored in the memory, so that the screen adaptation device performs the screen adaptation method of the first aspect or any implementation thereof.

[0019] The screen adaptation device may be a network device, or a part of a network device, such as a chip system in a network device. The chip system is used to support the network device to implement the functions involved in the first aspect and any possible implementation thereof, for example, to obtain, determine, and send the data and / or information involved in the above-mentioned screen adaptation method. The chip system includes a chip, and may also include other discrete devices or circuit structures.

[0020] In a fourth aspect, a computer-readable storage medium is provided, the computer-readable storage medium comprising computer execution instructions, and when the computer execution instructions are executed on a computer, the computer executes the screen adaptation method of the first aspect.

[0021] In a fifth aspect, a computer program product is also provided. The computer program product includes computer instructions. When the computer instructions are executed on a screen adaptation device, the screen adaptation device executes the screen adaptation method of the first aspect.

[0022] It should be noted that the above computer instructions may be stored in whole or in part on a computer-readable storage medium, wherein the computer-readable storage medium may be packaged together with the processor of the screen adaptation device, or may be packaged separately from the processor of the screen adaptation device, which is not limited in this application.

[0023] The description of the second, third, fourth and fifth aspects of the present application can refer to the detailed description of the first aspect; and the beneficial effects of the second, third, fourth and fifth aspects can refer to the beneficial effect analysis of the first aspect, which will not be repeated here.

[0024] In this application, the name of the above screen adaptation device does not limit the device or functional module itself. In actual implementation, these devices or functional modules may appear with other names. As long as the functions of each device or functional module are similar to those of this application, they fall within the scope of the claims of this application and their equivalent technologies.

[0025] These and other aspects of the present application will become more apparent from the following description.

[0026] The technical solution provided by this application brings at least the following beneficial effects:

[0027] Based on any of the above aspects, the present application provides a screen adaptation method, which can set a grid layout for multiple preset screens and a layout of component groups in the grid layout, and determine the grid layout and component group layout of the screen to be adapted based on the size information of the preset screen and the size information of the screen to be adapted, and finally render the screen to be adapted. The present application only needs to determine the grid layout of the screen to be adapted to quickly adapt to different screen pages. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 A schematic diagram of the structure of a screen adaptation system provided in an embodiment of the present application;

[0029] Figure 2 A hardware structure diagram of a communication device provided in an embodiment of the present application Figure 1 ;

[0030] Figure 3 A hardware structure diagram of a communication device provided in an embodiment of the present application Figure 2 ;

[0031] Figure 4 A schematic diagram of a screen adaptation method provided in an embodiment of the present application Figure 1 ;

[0032] Figure 5 A schematic diagram of a screen adaptation method provided in an embodiment of the present application Figure 2 ;

[0033] Figure 6 A schematic diagram of a screen adaptation method provided in an embodiment of the present application Figure 3 ;

[0034] Figure 7 A schematic diagram of a screen adaptation method provided in an embodiment of the present application Figure 4 ;

[0035] Figure 8 A schematic diagram of a screen adaptation method provided in an embodiment of the present application Figure 5 ;

[0036] Fig. 9 This is a schematic structural diagram of a screen adaptation device provided by an embodiment of the present application. Specific embodiments

[0037] 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 invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0038] It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to represent examples, illustrations or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific manner.

[0039] In order to facilitate a clear description of the technical solutions in the embodiments of the present application, in the embodiments of the present application, the same items or similar items with basically the same functions and effects are distinguished by using words such as "first" and "second". Those skilled in the art can understand that the words such as "first" and "second" do not limit the quantity and execution order.

[0040] For ease of understanding, first, the nouns involved in the present application are explained.

[0041] 1. Free layout: The free layout is to use the mouse to drag and place a component to a position, and the placed position is the final position of the component. The free layout currently supports manually adjusting the position of the component, or performing operations such as left alignment, horizontal center alignment, right alignment, top alignment, horizontal and vertical center alignment, and bottom alignment on a single component.

[0042] 2. Grid layout: The grid layout is a layout method that divides the page into columns of equal width. The grid layout needs to first set the overall layout scheme of N rows and M columns, and there will be N x M grids. In each grid, multiple components can be laid by nesting multiple grid containers. All the components in a grid are called a component group.

[0043] The above has provided a detailed explanation of the nouns involved in the embodiments of the present application.

[0044] Currently, in the related art, the free layout can only adapt to screens that are close to each other. If it is necessary to adapt to other screens with large differences, it is necessary to copy a new screen and then manually adjust the positions of the components in the layout. Manually adjusting the positions of multiple components is rather cumbersome.

[0045] In the related art, the grid layout has a relatively low degree of freedom, and it is not possible to drag components to the placement position like in the free layout. When adapting to screens with large differences, the grid layout needs to be redesigned and the layout of the component group needs to be adjusted.

[0046] As shown in the background technology, when adapting to different screens, both free layout and grid layout need to adjust the screen layout first and then adjust the component layout, which is relatively cumbersome.

[0047] In response to the above technical problems, an embodiment of the present application provides a screen adaptation method. The present application can set a grid layout for multiple preset screens, as well as the layout of the component group in the grid layout, and determine the grid layout and component group layout of the screen to be adapted based on the size information of the preset screen and the size information of the screen to be adapted, and finally render the screen to be adapted. The present application only needs to determine the grid layout of the screen to be adapted to quickly adapt to different screen pages.

[0048] The screen adaptation method is applicable to the screen adaptation system. Figure 1 FIG. 1 shows a schematic diagram of the structure of a screen adaptation system. Figure 1 As shown, the screen adaptation system 100 includes a screen adaptation device 101, a plurality of screens ( Figure 1 Take “the plurality of screens including a preset screen 102, a preset screen 103, and a screen to be adapted 104” as an example for explanation).

[0049] Optionally, the screen adaptation device 101 may be connected to the multiple screens in a wireless or wired manner.

[0050] Combination Figure 1 The screen adaptation device 101 in the screen adaptation system includes Figure 2 or Figure 3 The communication device shown in FIG. Figure 2 and Figure 3 Taking the communication device shown in the figure as an example, the hardware structure of the screen adaptation device 101 is introduced.

[0051] like Figure 2 , which is a schematic diagram of a hardware structure of a communication device provided in an embodiment of the present application. The communication device includes a processor 21, a memory 22, a communication interface 23, and a bus 24. The processor 21, the memory 22, and the communication interface 23 can be connected via a bus 24.

[0052] The processor 21 is the control center of the communication device, which can be a processor or a general term for multiple processing elements. For example, the processor 21 can be a general-purpose central processing unit (CPU) or other general-purpose processors. Among them, the general-purpose processor can be a microprocessor or any conventional processor.

[0053] As an embodiment, the processor 21 may include one or more CPUs, such as Figure 2 CPU 0 and CPU 1 are shown in .

[0054] The memory 22 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.

[0055] In a possible implementation, the memory 22 may exist independently of the processor 21, and the memory 22 may be connected to the processor 21 via a bus 24 to store instructions or program codes. When the processor 21 calls and executes the instructions or program codes stored in the memory 22, the screen adaptation method provided in the following embodiments of the present invention can be implemented.

[0056] In another possible implementation, the memory 22 may also be integrated with the processor 21 .

[0057] The communication interface 23 is used for the communication device to connect with other devices through a communication network, and the communication network may be Ethernet, wireless access network, wireless local area network (WLAN), etc. The communication interface 23 may include a receiving unit for receiving data and a sending unit for sending data.

[0058] The bus 24 may be an industry standard architecture (ISA) bus, a peripheral component interconnect (PCI) bus, or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 2 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0059] Figure 3 FIG. 2 shows another hardware structure of the communication device in the embodiment of the present invention. Figure 3 As shown, the communication device may include a processor 31 and a communication interface 32. The processor 31 is coupled to the communication interface 32.

[0060] The functions of the processor 31 may refer to the description of the processor 21. In addition, the processor 31 also has a storage function and can function as the memory 22 described above.

[0061] The communication interface 32 is used to provide data to the processor 31. The communication interface 32 may be an internal interface of the communication device, or an external interface of the communication device (equivalent to the communication interface 23).

[0062] It should be pointed out that Figure 2 (or Figure 3 ) does not constitute a limitation on the communication device, except Figure 2 (or Figure 3 ) In addition to the components shown in the figure, the communication device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0063] The screen adaptation method provided in the embodiment of the present application is described in detail below with reference to the accompanying drawings.

[0064] The screen adaptation method provided in the embodiment of the present application can be applied to the aforementioned Figure 1 The screen adaptation device 101 in the application scenario shown. Figure 4 As shown, the screen adaptation method includes:

[0065] S401: The screen adaptation apparatus sets a grid layout for each preset screen in at least one preset screen, and sets a layout of component groups in each grid layout.

[0066] In a possible implementation, the screen adaptation device sets a grid layout of 1 row and 12 columns for a preset screen, which is equivalent to 12 grids. Dozens of components can be laid out in each grid, and all components in a grid are a component group. The screen adaptation device can set the layout of each component in each grid in a free layout manner.

[0067] Exemplarily, the screen adaptation device may set a grid layout of 12 rows and 1 column for a mobile phone screen, thereby realizing a layout commonly seen on mobile phone screens in which each chart occupies a single row.

[0068] S402: The screen adaptation apparatus obtains size information of the screen to be adapted and size information of each preset screen in at least one preset screen.

[0069] Optionally, the size information may include at least one of size, aspect ratio, etc.

[0070] Optionally, the size of the screen may include at least one of 4 inches, 6 inches, 6.1 inches, 6.7 inches, etc., and the aspect ratio of the screen may include at least one of 16:9, 16:10, 18:9, etc.

[0071] S403: The screen adaptation apparatus determines a grid layout of the screen to be adapted and a layout of component groups in the grid layout of the screen to be adapted based on the size information of the screen to be adapted and the similarity of the size information of each preset screen in at least one preset screen.

[0072] In one possible implementation, the screen adaptation device calculates the similarity between each preset screen and the screen to be adapted, determines a target screen from at least one preset screen whose similarity with the screen to be adapted satisfies a preset similarity rule, and determines the grid layout of the target screen as the grid layout of the screen to be adapted, and determines the layout of the component groups in the grid layout of the target screen as the layout of the component groups in the grid layout of the screen to be adapted.

[0073] In one possible implementation, the screen adaptation device is based on the size information of the screen to be adapted and the preset screen. When the similarity between the preset screen and the screen to be adapted does not meet the preset similarity rule, the screen adaptation device changes the row and column information of the grid layout based on the size information of the screen to be adapted to determine the grid layout of the screen to be adapted, and then determines the layout of the component group of the preset screen as the layout of the component group in the grid layout of the screen to be adapted.

[0074] S404: The screen adaptation apparatus renders the screen to be adapted based on the grid layout of the screen to be adapted and the layout of the component groups in the grid layout of the screen to be adapted.

[0075] In one possible implementation, the screen adaptation device can determine the overall grid layout of the screen to be adapted from the grid layout of the screen to be adapted, determine the number of rows and columns set for the screen to be adapted, and then determine the position of the component group in each grid in the grid layout according to the layout of the component group in the grid layout of the screen to be adapted, so as to obtain the layout of the screen to be adapted and render the screen to be adapted.

[0076] The technical solution provided by the above embodiments brings at least the following beneficial effects: It can be seen from S401-S404 that the present application provides a screen adaptation method, which can set a grid layout for multiple preset screens and a layout of component groups in the grid layout, and determine the grid layout and component group layout of the screen to be adapted based on the size information of the preset screen and the size information of the screen to be adapted, and finally render the screen to be adapted. The present application only needs to determine the grid layout of the screen to be adapted to quickly adapt to different screen pages.

[0077] In an optional embodiment, in combination Figure 4 ,like Figure 5 As shown, the process of determining the grid layout of the screen to be adapted and the layout of the component groups in the grid layout of the screen to be adapted based on the size information of the screen to be adapted and the similarity of the size information of each preset screen in at least one preset screen in the above S403 can be specifically implemented by the following S501-S502:

[0078] S501. The screen adaptation apparatus calculates similarity between size information of each preset screen in at least one preset screen and size information of a screen to be adapted, and determines a preset screen that meets a similarity rule as a target screen.

[0079] In a possible implementation, the screen adaptation device determines the preset similarity rule as that the absolute value of the difference between the size of the screen to be adapted and the size of the screen is less than the first difference or the absolute value of the difference between the aspect ratio of the screen to be adapted and the aspect ratio of the screen is less than the second difference. The screen adaptation device determines one screen among at least one preset screen, and determines the size and aspect ratio of the screen to be adapted and the screen, and then calculates the absolute value of the difference between the size and aspect ratio of the screen to be adapted and the screen, and when the similarity between the screen and the screen to be adapted meets the preset similarity rule, the screen is determined as the target screen.

[0080] Exemplarily, the screen adaptation device determines that the first difference is 1, the size of the screen to be adapted is 6.1 inches, the size of a preset screen is 6.0 inches, and the absolute value of the difference in size between the screen to be adapted and the screen is 0.1. Then the similarity between the screen and the screen to be adapted satisfies the preset similarity rule, and the screen is determined as the target screen.

[0081] Exemplarily, the screen adaptation device determines that the second difference is 3:9, the aspect ratio of the screen to be adapted is 17:9, the aspect ratio of a preset screen is 16:9, and the absolute value of the difference in aspect ratio between the screen to be adapted and the screen is 1:9. Then, the similarity between the screen and the screen to be adapted satisfies the preset similarity rule, and the screen is determined as the target screen.

[0082] S502: The screen adaptation apparatus determines the grid layout of the target screen as the grid layout of the screen to be adapted, and determines the layout of the component groups in the grid layout of the target screen as the layout of the component groups in the grid layout of the screen to be adapted.

[0083] In one possible implementation, after the screen adaptation device determines the target screen, the screen adaptation device does not need to adjust the row and column parameters in the grid layout of the target screen, but directly determines the grid layout of the target screen as the grid layout of the screen to be adapted, and determines the layout of the component groups in the grid layout of the target screen as the layout of the component groups in the grid layout of the screen to be adapted.

[0084] The technical solution provided by the above embodiments brings at least the following beneficial effects: It can be seen from S501-S502 that the present application determines the target screen by calculating the similarity between each preset screen in multiple preset screens and the screen to be adapted, and determines the grid layout and component group layout of the target screen as the grid layout and component group layout of the screen to be adapted, so as to easily adapt to the screen with a size similar to the preset screen.

[0085] In an optional embodiment, in combination Figure 5 ,like Figure 6 As shown, the process of calculating the similarity between the size information of each preset screen in at least one preset screen and the size information of the screen to be adapted in the above S501 and determining the preset screen that meets the similarity rule as the target screen can be specifically implemented by the following S601-S604:

[0086] S601, step 1, the screen adaptation device determines the size information of the first screen.

[0087] The first screen is any screen among the preset screens that has not been currently subjected to similarity calculation with the screen to be adapted.

[0088] Exemplarily, the screen adaptation device determines that the size of the screen to be adapted is 6.1 inches and the aspect ratio is 17:9, and determines that the size of the first screen is 5.1 inches and the aspect ratio is 18:9.

[0089] Exemplarily, the screen adaptation device determines that the size of the screen to be adapted is 6.1 inches and the aspect ratio is 17:9, and determines that the size of the first screen is 6.0 inches and the aspect ratio is 16:9.

[0090] Exemplarily, the screen adaptation device determines that the size of the screen to be adapted is 6.1 inches and the aspect ratio is 17:9, and determines that the size of the first screen is 6.7 inches and the aspect ratio is 21:9.

[0091] Exemplarily, the screen adaptation device determines that the size of the screen to be adapted is 6.1 inches and the aspect ratio is 17:9, and determines that the size of the first screen is 14 inches and the aspect ratio is 4:3.

[0092] Exemplarily, the screen adaptation device determines that the size of the screen to be adapted is 6.1 inches and the aspect ratio is 17:9, and determines that the size of the first screen is 18.5 inches and the aspect ratio is 3:2.

[0093] S602, step 2, the screen adaptation apparatus determines the similarity between the size information of the screen to be adapted and the size information of the first screen.

[0094] In a possible implementation, the screen adaptation device can determine the similarity between the size information of the screen to be adapted and the size information of the first screen based on the size and aspect ratio of the screen to be adapted and the first screen. The similarity between the size information of the screens is the absolute value of the difference in the size information of the screens.

[0095] Exemplarily, the size of the screen to be adapted is 6.1 inches and the aspect ratio is 17:9, the size of the first screen is 5.1 inches and the aspect ratio is 18:9, and the screen adaptation device determines that the absolute value of the difference in size between the screen to be adapted and the first screen is 1, and the absolute value of the difference in aspect ratio between the screen to be adapted and the first screen is 1:9.

[0096] Exemplarily, the size of the screen to be adapted is 6.1 inches and the aspect ratio is 17:9, the size of the first screen is 6.0 inches and the aspect ratio is 16:9, and the screen adaptation device determines that the absolute value of the difference in size between the screen to be adapted and the first screen is 0.1, and the absolute value of the difference in aspect ratio between the screen to be adapted and the first screen is 1:9.

[0097] S603, step 3, when the similarity between the size information of the screen to be adapted and the first screen meets a preset similarity rule, the screen adaptation apparatus determines the first screen as the target screen.

[0098] Optionally, the preset similarity rule may include: the absolute value of the difference between the size of the screen to be adapted and the size of the preset screen is smaller than the first difference, and the absolute value of the difference between the aspect ratio of the screen to be adapted and the aspect ratio of the preset screen is smaller than the second difference.

[0099] Exemplarily, the screen adaptation device determines that the first difference is 1 and the second difference is 7:18. The screen adaptation device can determine that the similarity between the size information of the first screen with a size of 6.0 inches and an aspect ratio of 16:9 and the size of the screen to be adapted with a size of 6.1 inches and an aspect ratio of 17:9 meets the preset similarity rule, and the screen adaptation device determines the first screen as the target screen.

[0100] S604, step 4, when the similarity between the size information of the screen to be adapted and the first screen does not meet the preset similarity rule, the screen adaptation device reselects the first screen from the preset screens that are not currently subjected to similarity calculation with the screen to be adapted, and iteratively executes steps 1, 2, 3, and 4 until the target screen is determined.

[0101] Exemplarily, the screen adaptation device determines that the first difference is 1 and the second difference is 7:18. When the size of the first screen is 5.1 inches and the aspect ratio is 18:9, and the size of the screen to be adapted is 6.1 inches and the aspect ratio is 17:9, the similarity of the size information of the screen to be adapted and the first screen does not meet the preset similarity rule.

[0102] The screen adaptation device reselects the first screen and determines that the size of the new first screen is 6.7 inches and the aspect ratio is 21:9. The absolute value of the difference between the size of the screen to be adapted is 0.6, and the absolute value of the aspect ratio of the size of the screen to be adapted is 4:9. The similarity between the size information of the screen to be adapted and the new first screen still does not meet the preset similarity rule. The screen adaptation device reselects the first screen and repeats the above steps until the target screen is determined.

[0103] The technical solution provided by the above embodiments brings at least the following beneficial effects: It can be seen from S601-S604 that the present application can determine the target screen by determining the similarity between the first screen and the screen to be adapted, which can make the screen to be adapted select the target screen between screens more flexible and easy, and can adapt to different screens more quickly without manually adjusting the screen layout.

[0104] In an optional embodiment, in combination Figure 5 ,like Figure 7 As shown, the process of rendering the screen to be adapted based on the grid layout of the screen to be adapted and the layout of the component groups in the grid layout of the screen to be adapted in the above S404 can be specifically implemented by the following S701-S703:

[0105] S701: The screen adaptation apparatus determines the layout configuration information of the component group in the grid layout of the target screen.

[0106] The configuration information of the component group layout includes the component group's attribute information, event information, and data interaction information.

[0107] In a possible implementation manner, the screen adaptation apparatus stores the configuration information of the layout of the component groups in the grid layout of the target screen as a json schema file.

[0108] Exemplarily, the data format in the configuration information of the component group of the target screen is as follows:

[0109]

[0110]

[0111]

[0112] S702: The screen adaptation apparatus determines configuration information of the grid layout of the screen to be adapted.

[0113] The configuration information of the grid layout includes row and column information of the grid layout.

[0114] In a possible implementation, the screen adaptation apparatus stores the configuration information of the grid layout of the screen to be adapted as a json schema file.

[0115] Exemplarily, the data format in the configuration information of the grid layout of the screen to be adapted is as follows:

[0116]

[0117]

[0118] "items":[] / / This field will store the specific component information represented by the empty container component id in the subsequent component group layout configuration information and grid layout configuration information

[0119]

[0120] In the above configuration information format, the screen adaptation device may set the grid component to grid, the row component to row, the column component to col, and the empty container component in the grid to EmptyContainer.

[0121] S703: The screen adaptation apparatus renders the screen to be adapted based on the layout of the component group in the grid layout of the screen to be adapted, using the configuration information of the layout of the component group and the configuration information of the grid layout.

[0122] In one possible implementation, the empty containers in the grid of the screen to be adapted only store the IDs of the empty containers. The screen adaptation device can find the specific component information from the configuration information of the component group layout according to the ID, and store the component information in the items field of the configuration file of the grid layout, thereby obtaining all the configuration information of the component group layout and the configuration information of the grid layout, and then use the full information to render the screen to be adapted.

[0123] In a possible implementation, when the IDs of some empty container components are deleted in the grid layout of the screen to be adapted, the component group represented by the empty container component will not be rendered in the end and will not be displayed on the page.

[0124] The technical solution provided by the above embodiments brings at least the following beneficial effects: It can be seen from S701-S702 that the present application can render the screen to be adapted according to the configuration information of the layout of the component group in the target screen and the configuration information of the grid layout of the screen to be adapted. The configuration information of the layout of the component group and the configuration information of the grid layout are saved separately, which can adapt to different screen sizes more flexibly.

[0125] In an optional embodiment, in combination Figure 4 ,like Figure 8 As shown, the process of setting a grid layout for each preset screen in at least one preset screen in S401 and setting the layout of the component group in each grid layout can be specifically implemented by the following S801-S803:

[0126] S801. The screen adaptation apparatus sets a grid layout for each preset screen in at least one preset screen.

[0127] S802: The screen adaptation apparatus sets a layout of a component group of a first preset screen in at least one preset screen.

[0128] The first preset screen is any preset screen among the at least one preset screen.

[0129] In one possible implementation, the outer div of the component can be used to control the layout and style of the component. When setting the layout of the component group in the grid layout of the preset screen, the screen adapter needs to drag the component from the component bar and place it on the middle canvas. The outer div of the component will add absolute positioning attributes to the component and set the values ​​of the top and left attributes. The values ​​of the top and left attributes indicate the positioning of the upper left corner of the component relative to the component group, thereby ensuring that the position of the component is relative to the component group rather than the entire canvas.

[0130] S803: The screen adaptation apparatus obtains layouts of component groups of other preset screens in at least one preset screen based on the layout of the component group of the first preset screen.

[0131] In one possible implementation, the screen adaptation device has set a grid layout for multiple preset screens and set the layout of the component group of the first preset screen. When setting the layout of the component group of other preset screens, it is only necessary to drag the layout of the component group of the first preset screen to each grid of the other preset screens to obtain the layout of the component group of the other preset screens.

[0132] The technical solution provided by the above embodiments brings at least the following beneficial effects: It can be seen from S801-S803 that the present application can only set the layout of the component group of one preset screen, and then obtain the layout of the component group of other preset screens based on the layout of the component group of one preset screen, which can determine the layout of the component group of the screen more simply and quickly.

[0133] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to realize the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0134] The embodiment of the present application can divide the functional modules of the screen adaptation device according to the above method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. Optionally, the division of modules in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.

[0135] like Fig. 9 FIG. 1 is a schematic diagram of the structure of a screen adaptation device provided in an embodiment of the present application. The screen adaptation device can be used to perform Figures 4 to 8 The screen adaptation method shown. Fig. 9 The screen adaptation device shown includes: a processing unit 901 and a communication unit 902 .

[0136] The processing unit 901 is configured to set a grid layout for each of at least one preset screen respectively, and set the layout of component groups in each grid layout.

[0137] The communication unit 902 is configured to obtain the size information of the screen to be adapted, and the size information of each of at least one preset screen.

[0138] The processing unit 901 is further configured to determine the grid layout of the screen to be adapted, and the layout of component groups in the grid layout of the screen to be adapted, based on the similarity between the size information of the screen to be adapted and the size information of each of at least one preset screen.

[0139] The processing unit 901 is further configured to render the screen to be adapted, based on the grid layout of the screen to be adapted, and the layout of component groups in the grid layout of the screen to be adapted.

[0140] Optionally, the processing unit 901 is specifically configured to: calculate the similarity between the size information of each of at least one preset screen and the size information of the screen to be adapted respectively, and determine the preset screen that meets the similarity rule as the target screen; determine the grid layout of the target screen as the grid layout of the screen to be adapted, and determine the layout of component groups in the grid layout of the target screen as the layout of component groups in the grid layout of the screen to be adapted.

[0141] Optionally, the processing unit 901 is specifically configured to: Step 1, determine the size information of the first screen; the first screen is any one of the preset screens that have not been calculated for similarity with the screen to be adapted currently; Step 2, determine the similarity between the size information of the screen to be adapted and the size information of the first screen; Step 3, when the similarity between the size information of the screen to be adapted and the size information of the first screen meets the preset similarity rule, determine the first screen as the target screen; Step 4, when the similarity between the size information of the screen to be adapted and the size information of the first screen does not meet the preset similarity rule, reselect the first screen from the preset screens that have not been calculated for similarity with the screen to be adapted currently, and iteratively execute Step 1, Step 2, Step 3, and Step 4 until the target screen is determined.

[0142] Optionally, the size information includes size and aspect ratio; the preset similarity rule includes: the absolute value of the difference between the size of the screen to be adapted and the size of the preset screen is less than the first difference, and the absolute value of the difference between the aspect ratio of the screen to be adapted and the aspect ratio of the preset screen is less than the second difference.

[0143] Optionally, processing unit 901 is specifically used to: determine the configuration information of the layout of the component group in the grid layout of the target screen; the configuration information of the component group's layout includes attribute information, event information, and data interaction information of the component group; determine the configuration information of the grid layout of the screen to be adapted; the configuration information of the grid layout includes row and column information of the grid layout; based on the layout of the component group in the grid layout of the screen to be adapted, use the configuration information of the component group's layout and the configuration information of the grid layout to render the screen to be adapted.

[0144] Optionally, the processing unit 901 is specifically used to: set a grid layout for each preset screen in at least one preset screen; set a layout for a component group for a first preset screen in at least one preset screen; the first preset screen is any preset screen in at least one preset screen; and obtain a layout for component groups for other preset screens in at least one preset screen based on the layout of the component group for the first preset screen.

[0145] The embodiment of the present application further provides a computer-readable storage medium, which includes computer-executable instructions. When the computer-executable instructions are executed on a computer, the computer executes the screen adaptation method provided in the above embodiment.

[0146] The embodiment of the present application also provides a computer program, which can be directly loaded into a memory and contains software code. After being loaded and executed by a computer, the computer program can implement the screen adaptation method provided in the above embodiment.

[0147] Those skilled in the art will appreciate that in one or more of the above examples, the functions described in the present invention may be implemented in hardware, software, firmware, or any combination thereof. When implemented using software, the functions may be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer-readable storage media and communication media, wherein communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium may be any available medium that a general or special-purpose computer can access.

[0148] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0149] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The unit described as a separate component may or may not be physically separated, and the component displayed as a unit may be a physical unit or multiple physical units, that is, it may be located in one place, or it may be distributed in multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the scheme of this embodiment.

[0150] In addition, each functional unit in each embodiment of the present invention can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the usual technology or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk.

[0151] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A screen adaptation method, It is characterized in that include: respectively setting a grid layout for each preset screen in at least one preset screen, and setting a layout of the component groups in each grid layout; Acquire size information of the screen to be adapted and size information of each preset screen in at least one preset screen; Determine the grid layout of the screen to be adapted and the layout of the component groups in the grid layout of the screen to be adapted based on the size information of the screen to be adapted and the similarity of the size information of each preset screen in the at least one preset screen; The screen to be adapted is rendered based on the grid layout of the screen to be adapted and the layout of the component groups in the grid layout of the screen to be adapted.

2. The method according to claim 1, It is characterized in that The determining, based on the size information of the screen to be adapted and the similarity of the size information of each preset screen in the at least one preset screen, the grid layout of the screen to be adapted and the layout of the component groups in the grid layout of the screen to be adapted comprises: Calculate the similarity between the size information of each preset screen in the at least one preset screen and the size information of the screen to be adapted, and determine the preset screen that meets the similarity rule as the target screen; The grid layout of the target screen is determined as the grid layout of the screen to be adapted, and the layout of the component groups in the grid layout of the target screen is determined as the layout of the component groups in the grid layout of the screen to be adapted.

3. The method according to claim 2, It is characterized in that The calculating the similarity between the size information of each preset screen in the at least one preset screen and the size information of the screen to be adapted, and determining the preset screen that meets the similarity rule as the target screen, comprises: Step 1: Determine the size information of the first screen; the first screen is any screen among the preset screens that have not been currently similarity calculated with the screen to be adapted; Step 2: Determine the similarity between the size information of the screen to be adapted and the size information of the first screen; Step 3: When the similarity between the size information of the screen to be adapted and the first screen meets the preset similarity rule, the first screen is determined as the target screen; Step 4. When the similarity between the size information of the screen to be adapted and the first screen does not satisfy the preset similarity rule, reselect the first screen from the preset screens that have not currently performed similarity calculation with the screen to be adapted, and iterate the steps 1, 2, 3, and 4 until the target screen is determined.

4. The method according to claim 2 or 3, It is characterized in that The size information includes size and aspect ratio; the preset similarity rule includes: the absolute value of the difference between the size of the screen to be adapted and the size of the preset screen is less than the first difference, and the absolute value of the difference between the aspect ratio of the screen to be adapted and the aspect ratio of the preset screen is less than the second difference.

5. The method according to claim 2 or 3, It is characterized in that The rendering of the screen to be adapted based on the grid layout of the screen to be adapted and the layout of the component groups in the grid layout of the screen to be adapted includes: Determine the configuration information of the layout of the component group in the grid layout of the target screen; the configuration information of the layout of the component group includes attribute information, event information, and data interaction information of the component group; Determining configuration information of the grid layout of the screen to be adapted; the configuration information of the grid layout includes row and column information of the grid layout; Based on the layout of the component group in the grid layout of the screen to be adapted, the screen to be adapted is rendered using the configuration information of the layout of the component group and the configuration information of the grid layout.

6. The method according to claim 1, It is characterized in that The step of respectively setting a grid layout for each preset screen in at least one preset screen, and setting a layout of component groups in each grid layout, comprises: Setting a grid layout of each preset screen in the at least one preset screen; Setting a layout of a component group of a first preset screen in the at least one preset screen; the first preset screen is any preset screen in the at least one preset screen; Based on the layout of the component groups of the first preset screen, the layout of the component groups of other preset screens in the at least one preset screen is obtained.

7. A screen adaptation device, It is characterized in that include: a processing unit and a communication unit; The processing unit is used to set a grid layout for each preset screen in at least one preset screen, and set a layout of component groups in each grid layout; The communication unit is used to obtain the size information of the screen to be adapted and the size information of each preset screen in at least one preset screen; The processing unit is further used to determine the grid layout of the screen to be adapted and the layout of the component groups in the grid layout of the screen to be adapted based on the size information of the screen to be adapted and the similarity of the size information of each preset screen in the at least one preset screen; The processing unit is further used to render the screen to be adapted based on the grid layout of the screen to be adapted and the layout of the component groups in the grid layout of the screen to be adapted.

8. The device according to claim 7, It is characterized in that The processing unit is specifically used for: Calculate the similarity between the size information of each preset screen in the at least one preset screen and the size information of the screen to be adapted, and determine the preset screen that meets the similarity rule as the target screen; The grid layout of the target screen is determined as the grid layout of the screen to be adapted, and the layout of the component groups in the grid layout of the target screen is determined as the layout of the component groups in the grid layout of the screen to be adapted.

9. The device according to claim 8, It is characterized in that The processing unit is specifically used for: Step 1: Determine the size information of the first screen; the first screen is any screen among the preset screens that have not been currently similarity calculated with the screen to be adapted; Step 2: Determine the similarity between the size information of the screen to be adapted and the size information of the first screen; Step 3: When the similarity between the size information of the screen to be adapted and the first screen meets the preset similarity rule, the first screen is determined as the target screen; Step 4. When the similarity between the size information of the screen to be adapted and the first screen does not satisfy the preset similarity rule, reselect the first screen from the preset screens that have not currently performed similarity calculation with the screen to be adapted, and iterate the steps 1, 2, 3, and 4 until the target screen is determined.

10. The device according to claim 8 or 9, It is characterized in that The size information includes size and aspect ratio; the preset similarity rule includes: the absolute value of the difference between the size of the screen to be adapted and the size of the preset screen is less than the first difference, and the absolute value of the difference between the aspect ratio of the screen to be adapted and the aspect ratio of the preset screen is less than the second difference.

11. The device according to claim 8 or 9, It is characterized in that The processing unit is specifically used for: Determine the configuration information of the layout of the component group in the grid layout of the target screen; the configuration information of the layout of the component group includes attribute information, event information, and data interaction information of the component group; Determining configuration information of the grid layout of the screen to be adapted; the configuration information of the grid layout includes row and column information of the grid layout; Based on the layout of the component group in the grid layout of the screen to be adapted, the screen to be adapted is rendered using the configuration information of the layout of the component group and the configuration information of the grid layout.

12. The device according to claim 7, It is characterized in that The processing unit is specifically used for: Setting a grid layout of each preset screen in the at least one preset screen; Setting a layout of a component group of a first preset screen in the at least one preset screen; The first preset screen is any preset screen among the at least one preset screen; Based on the layout of the component groups of the first preset screen, the layout of the component groups of other preset screens in the at least one preset screen is obtained.

13. A screen adaptation device, It is characterized in that It includes a memory and a processor; the memory is used to store computer execution instructions, and the processor is connected to the memory through a bus; when the screen adaptation device is running, the processor executes the computer execution instructions stored in the memory, so that the screen adaptation device executes the video text information determination method as described in any one of claims 1-6.

14. A computer-readable storage medium, It is characterized in that The computer-readable storage medium includes computer-executable instructions. When the computer-executable instructions are executed on a computer, the computer is enabled to execute the screen adaptation method according to any one of claims 1 to 6.