A material display method, device, electronic device and storage medium

By updating the cropping box data during the pre-display process, the problem of inconsistency between the cropping box data and the material size is solved, enabling flexible adaptation of the display container and material size, and improving the accuracy of the display results.

CN113655977BActive Publication Date: 2024-10-29BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110950855.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-18
Publication Date
2024-10-29
Estimated Expiration
2041-08-18

AI Technical Summary

Technical Problem

In the existing technology, the cropping frame data of the advertising space is inconsistent with the size of the material, resulting in inaccurate cropping judgment results and inability to effectively adapt to the size of the display container.

Method used

During the pre-display process of the target material, determine its pre-display size, calculate the redundancy based on the size of the display container and the pre-display size, update the preset trimming frame data, and obtain the target trimming frame data to adapt to the display container and material. size.

Benefits of technology

Through the updated cropping frame data, we can more accurately determine whether the material meets the requirements of the advertising space and improve the accuracy of the display results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113655977B_ABST
    Figure CN113655977B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a material display method, device, electronic device and storage medium, the method comprising: determining the pre-display size of the target material during the pre-display process of the target material; determining the size redundancy of the display container according to the size of the display container and the pre-display size of the target material; updating the preset trimming frame data according to the size redundancy of the display container to obtain the target trimming frame data; wherein the target trimming frame data is used to display the target material through the display container in the display area, and the preset trimming frame data is applied when the target material is displayed through the display container in the display area during the pre-display process. Applying the target trimming frame data can flexibly adapt to the size of the display container and the size of the target material; thus, when the application displays the target material through the container in the display area using the target trimming frame data, the display result is more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] In a conventional APP (application), an ad slot is presented in the form of a corresponding display area, and users can display specific materials in the display area to achieve advertising. The width and height of the ad slot or display area are fixed, and if a specific material needs to be placed in the ad slot, it is necessary to determine whether the current material size meets the requirements of the ad slot, and the determination process is implemented based on the cropping frame data corresponding to the ad slot.

[0003] In the related art, the APP generally determines the effectiveness of material size cropping in the background based on the width and height of the current material and the cropping frame data. However, there are usually the following problems: the material size obtained in the background is inconsistent with the original material size, which makes the cropping frame data unusable, that is, the cropping frame data is less compatible with the material size, and then the judgment result of using the current material size to determine whether the current material meets the ad position is inaccurate. Summary of the invention

[0004] The embodiments of the present application provide a material display method, device, electronic device and storage medium to improve the flexible adaptability of cropping frame data to the size of a display container and the size of a target material, thereby improving the accuracy of displaying the target material.

[0005] In a first aspect, an embodiment of the present application provides a material display method, including:

[0006] During the pre-display process of the target material, determining the pre-display size of the target material;

[0007] Determining a size redundancy of the display container according to a size of the display container and a pre-display size of the target material;

[0008] The preset cropping frame data is updated according to the size redundancy of the display container to obtain the target cropping frame data, wherein the target cropping frame data is used to display the target material in the display area through the display container, and the preset cropping frame data is applied when displaying the target material in the display area through the display container during a pre-display process.

[0009] In some exemplary embodiments, determining the size redundancy of the display container according to the size of the display container and the pre-display size of the target material includes:

[0010] Determining a display compression ratio according to a pre-display size of the target material and a size of the display container;

[0011] Determining a target display size of the target material according to the pre-display size of the target material and the display compression ratio;

[0012] The size redundancy of the display container is determined according to the size of the display container and the target display size of the target material.

[0013] In some exemplary embodiments, the target material is a rectangle;

[0014] Determining a display compression ratio according to the pre-display size of the target material and the size of the display container includes:

[0015] Determine a first compression ratio according to a width value in the pre-display size of the target material and a width value in the size of the display container; and determine a second compression ratio according to a height value in the pre-display size of the target material and a height value in the size of the display container;

[0016] A larger compression ratio between the first compression ratio and the second compression ratio is determined as a display compression ratio.

[0017] In some exemplary embodiments, before updating the preset cropping frame data according to the size redundancy of the display container, the method further includes:

[0018] Determining an adjustment ratio according to the original size of the target material and the target display size;

[0019] The updating of the preset clipping frame data according to the size redundancy of the display container includes:

[0020] Adjusting the preset cropping frame data according to the adjustment ratio;

[0021] Determine sub-data in the preset trimming frame data corresponding to the size redundancy of the display container;

[0022] The adjusted preset cropping frame data is updated according to the sub-data.

[0023] In some exemplary embodiments, updating the adjusted preset cropping frame data according to the sub-data includes:

[0024] If the sub-data is the width of the preset cropping frame, then the position of the preset cropping frame in the width direction is updated by applying the set ratio of the size redundancy of the display container; or

[0025] If the sub-data is the height of the preset cropping frame, the position of the preset cropping frame in the height direction is updated by applying the set ratio of the size redundancy of the display container.

[0026] In a second aspect, an embodiment of the present application provides a material display device, including:

[0027] A first size determining unit is configured to determine a pre-display size of the target material during the pre-display process of the target material;

[0028] A second size determining unit is configured to determine a size redundancy of the display container according to a size of the display container and a pre-display size of the target material;

[0029] The data determination unit is configured to update the preset cropping frame data according to the size redundancy of the display container to obtain target cropping frame data; wherein the target cropping frame data is used to display the target material in the display area through the display container, and the preset cropping frame data is applied when displaying the target material in the display area through the display container during a pre-display process.

[0030] In some exemplary embodiments, the second size determination unit is specifically configured to execute:

[0031] Determining a display compression ratio according to a pre-display size of the target material and a size of the display container;

[0032] Determining a target display size of the target material according to the pre-display size of the target material and the display compression ratio;

[0033] The size redundancy of the display container is determined according to the size of the display container and the target display size of the target material.

[0034] In some exemplary embodiments, the target material is a rectangle;

[0035] The second size determination unit is specifically configured to execute:

[0036] Determine a first compression ratio according to a width value in the pre-display size of the target material and a width value in the size of the display container; and determine a second compression ratio according to a height value in the pre-display size of the target material and a height value in the size of the display container;

[0037] A larger compression ratio between the first compression ratio and the second compression ratio is determined as a display compression ratio.

[0038] In some exemplary embodiments, an adjustment unit is further included. Before updating the preset trimming frame data according to the size redundancy of the display container, the adjustment unit is configured to execute:

[0039] Determining an adjustment ratio according to the original size of the target material and the target display size;

[0040] The data determination unit is configured to execute:

[0041] Adjusting the preset cropping frame data according to the adjustment ratio;

[0042] Determine sub-data in the preset trimming frame data corresponding to the size redundancy of the display container;

[0043] The adjusted preset cropping frame data is updated according to the sub-data.

[0044] In some exemplary embodiments, the data determination unit is configured to perform:

[0045] If the sub-data is the width of the preset cropping frame, then the position of the preset cropping frame in the width direction is updated by applying the set ratio of the size redundancy of the display container; or

[0046] If the sub-data is the height of the preset cropping frame, the position of the preset cropping frame in the height direction is updated by applying the set ratio of the size redundancy of the display container.

[0047] In a third aspect, an embodiment of the present application provides an electronic device, including:

[0048] processor;

[0049] a memory for storing instructions executable by the processor;

[0050] The processor is configured to execute the instructions to implement any one of the above-mentioned material display methods.

[0051] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can execute any one of the above-mentioned material display methods.

[0052] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program / instruction, which implements any one of the above-mentioned material display methods when executed by a processor.

[0053] The technical solution provided by the embodiments of the present application brings at least the following beneficial effects:

[0054] Since the target material is displayed through a display container, the size of the target material during the display process is inconsistent with the original size, so the preset cropping frame data no longer adapts to the original size of the target material. Therefore, the preset cropping frame data is first applied to pre-display the target material through the display container in the display area, and then the pre-display size of the target material in the pre-display process is determined. In order to flexibly adapt to the size of the display container, the size of the display container and the pre-display size of the target material are applied to determine the size redundancy of the display container, and then the preset cropping frame data is updated according to the size redundancy of the display container to obtain the target cropping frame data. The target cropping frame data can be applied to flexibly adapt to the size of the display container and the size of the target material. Therefore, when the target cropping frame data is applied to display the target material through the container in the display area, the display result is more accurate.

[0055] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. Obviously, the drawings introduced below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0057] Figure 1 A schematic diagram of an application scenario of a material display method provided in an embodiment of the present application;

[0058] Figure 2 An application scenario diagram of a material display method provided in one embodiment of the present application;

[0059] Figure 3 A flow chart of a material display method provided in one embodiment of the present application;

[0060] Figure 4 A schematic diagram showing the size comparison of a material and a container provided in one embodiment of the present application;

[0061] Figure 5 A schematic diagram of a cropping frame before and after updating provided by an embodiment of the present application;

[0062] Figure 6 A schematic diagram of the structure of a material display device provided in one embodiment of the present application;

[0063] Figure 7 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0064] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0065] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.

[0066] Below, some terms in the embodiments of the present application are explained to facilitate understanding by those skilled in the art.

[0067] (1) In the embodiments of the present application, the term "plurality" refers to two or more than two, and other quantifiers are similar.

[0068] (2) "and / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.

[0069] (3) Servers provide services for terminals. The services provided include providing resources to terminals and storing terminal data. Servers correspond to applications installed on terminals and work in conjunction with applications on terminals.

[0070] (4) Terminal device, which can refer to software APP (Application) or client. It has a visual display interface and can interact with users; it corresponds to the server and provides local services to customers. For software applications, except for some applications that only run locally, they are generally installed on ordinary client terminals and need to cooperate with the server to run. After the development of the Internet, more commonly used applications include email clients for sending and receiving emails, and instant messaging clients. For this type of application, there needs to be corresponding servers and service programs in the network to provide corresponding services, such as database services, configuration parameter services, etc. In this way, specific communication connections need to be established between the client terminal and the server to ensure the normal operation of the application.

[0071] (5) Application: refers to a computer program that is used to complete one or more specific tasks. It runs in user mode, can interact with the user, and has a visual user interface.

[0072] (6) Material: in a broad sense, refers to different types of materials; in the embodiments of the present application, it may refer to text, pictures, audio or video, etc., which are displayed in the application.

[0073] (7) Container: A container contains a complete runtime environment. In addition to the runtime application itself, all dependencies, class libraries, other binary files, configuration files, etc. required by the runtime application are uniformly packaged into a package called a container image. Container technology refers to the effective division of resources of a single operating system into isolated groups in order to better balance conflicting resource usage requirements between isolated groups. In the embodiment of the present application, the container may refer to a player, and the material in this case may be a cover image of a video.

[0074] In the specific practice, advertisers can display the things they want to promote in the application, so that users can see the things promoted by the advertisement when using the APP, which can play a role in promotion. In this process, the things to be promoted can be called materials. For example, the things to be promoted can be displayed in a picture, and the picture can be called material. The picture is, for example, the introduction of a certain product. In the process of displaying the picture in the APP, the width and height of the APP's advertising position or display position are fixed. If a specific material needs to be placed in the advertising position, it is necessary to determine whether the current material size meets the requirements of the advertising position.

[0075] In the related art, the APP generally determines the effectiveness of material size cropping in the background based on the width and height of the current material and the cropping frame data. However, there are usually the following problems: the material size obtained in the background is inconsistent with the original material size, which makes the cropping frame data unusable, and then the judgment result of using the current material size to determine whether the current material meets the ad position is inaccurate.

[0076] To this end, the present application embodiment provides a material display method, taking the display of the target material in the application as an example, see Figure 1In the pre-display process of the target material, the pre-display size of the target material is determined; the pre-display process of the target material is that the application applies the preset cropping frame data and performs it in the display area through the display container; the size redundancy of the display container is determined according to the size of the display container and the pre-display size of the target material; the preset cropping frame data is updated according to the size redundancy of the display container to obtain the target cropping frame data, so that the application applies the target cropping frame data in the display area and displays the target material through the display container. In this process, the size change of the target material caused by the display container is considered, and then the preset cropping frame data is updated to obtain the target cropping frame data. When the application displays the target material by applying the target cropping frame data, it can more accurately determine whether the size of the target material meets the requirements of the advertising position of the display area of ​​the application. For example, if the size of the target material meets the requirements of the advertising position of the display area of ​​the application, the advertiser can place advertisements in the display area according to the size of the target material at this time; if the size of the target material does not meet the requirements of the advertising position of the display area of ​​the application, the background can display the unsatisfactory results to the advertiser, so that the advertiser can adjust the size of the target material or replace the target material.

[0077] exist Figure 1 In the figure, 11 is the target material (in order to distinguish the display, it is displayed with a dotted border, and the dotted border is not displayed to the user), 12 is the display area corresponding to the ad slot, and the display container and the cropping frame are in Figure 1 Not shown.

[0078] After introducing the design ideas of the embodiments of the present application, the following briefly introduces the application scenarios to which the technical solutions of the embodiments of the present application can be applied. It should be noted that the application scenarios introduced below are only used to illustrate the embodiments of the present application and are not limited. In specific implementation, the technical solutions provided by the embodiments of the present application can be flexibly applied according to actual needs.

[0079] refer to Figure 2, which is an application scenario diagram of a material display method provided in an embodiment of the present application. The application scenario includes multiple terminal devices 201 (including terminal device 201-1, terminal device 201-2, ... terminal device 201-n), and a material display processing server 202. Among them, the terminal device 201 and the material display processing server 202 are connected via a wireless or wired network, and the terminal device 201 includes but is not limited to electronic devices such as desktop computers, mobile phones, mobile computers, tablet computers, media players, smart wearable devices, and smart TVs. The material display processing server 202 can be a server cluster or a cloud computing center composed of a server, a plurality of servers. The material display processing server 202 can be an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.

[0080] The terminal device 201-1 responds to the user's material display request, applies the preset cropping frame data through the application program, and displays the target material in the display area through the display container. In the pre-display process, the application program obtains the pre-display size of the target material and sends the display size to the background processing system; or the background processing system automatically obtains the pre-display size of the target material; wherein the background processing system can be a processing system in the terminal device, or a processing system integrated in other devices. The background processing system determines the size redundancy of the display container according to the size of the display container and the pre-display size of the target material, and then updates the preset cropping frame data according to the size redundancy of the display container to obtain the target cropping frame data, and sends the target cropping frame data to the application program, and the application program uses the target cropping frame data to display the target material in the display area through the display container, and presents the display result to the user through the terminal device 201-1.

[0081] Of course, the method provided in the embodiment of the present application is not limited to Figure 2 The application scenarios shown can also be used in other possible application scenarios, such as displaying materials in a set display area of ​​a billboard in a shopping mall, which is not limited in the embodiments of the present application. Figure 2 The functions that can be implemented by each device in the application scenario shown will be described in the subsequent method embodiments, and will not be described in detail here.

[0082] To further illustrate the technical solution provided by the embodiment of the present application, this is described in detail below in conjunction with the accompanying drawings and specific implementation methods. Although the embodiment of the present application provides the method operation steps shown in the following embodiments or drawings, more or fewer operation steps may be included in the method based on routine or no creative labor. In the steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided in the embodiment of the present application.

[0083] Combine the following Figure 1 and Figure 2 The application scenario shown takes application display materials as an example to illustrate the technical solution provided by the embodiment of the present application.

[0084] refer to Figure 3 , the present application embodiment provides a material display method, comprising the following steps:

[0085] S301. During the preview of the target material, determine the preview size of the target material.

[0086] S302: Determine a size redundancy of the display container according to the size of the display container and the pre-display size of the target material.

[0087] S303. Update the preset cropping frame data according to the size redundancy of the display container to obtain target cropping frame data; wherein the target cropping frame data is used to display the target material in the display area through the display container, and the preset cropping frame data is applied when displaying the target material in the display area through the display container during a pre-display process.

[0088] In the embodiment of the present application, since the target material is displayed through a display container, the size of the target material during the display process is inconsistent with the original size, so the preset cropping frame data no longer adapts to the original size of the target material. Therefore, the preset cropping frame data is first applied to pre-display the target material in the display area through the display container, and then the pre-display size of the target material in the pre-display process is determined. In order to flexibly adapt to the size of the display container, the size of the display container and the pre-display size of the target material are applied to determine the size redundancy of the display container, and then the preset cropping frame data is updated according to the size redundancy of the display container to obtain the target cropping frame data. The target cropping frame data can be applied to flexibly adapt to the size of the display container and the size of the target material. Therefore, when the target cropping frame data is applied to display the target material through the container in the display area, the display result is more accurate.

[0089] Regarding S301, in the application, the ad space is presented to the user through the display area, and the display area of ​​each application is usually fixed. In the process of displaying the material in the display area, a cropping frame is required. Only when the size of the material and the size of the cropping frame meet the adaptation conditions, the display result of the material in the display area will be more accurate and more meaningful for advertisers to refer to.

[0090] In actual application, the display process of some functions needs to be implemented through a display container. In this way, the size of the material will change during the display process, and the initial preset cropping data of the display area cannot be used at this time. That is, the display result obtained by applying the preset cropping frame to adapt to the material after the size change is inaccurate.

[0091] At this time, a pre-display process is proposed, in which the application applies preset cropping frame data and performs it through the display container in the display area to obtain the pre-display size of the target material.

[0092] In a specific example, Figure 4 The pixel representation of each size is shown. Assuming that the target material is a cover image of a video, 41 represents the original size of the target material, for example, it may be 500*500; 42 represents the pre-display size of the target material detected during the pre-display process, for example, it may be 200*200; 43 represents the size of the display container, for example, it may be 200*100, and the display container may be, for example, a player.

[0093] In S302, since the display container is used as a display medium, the size of the target material changes during the display process. In order to adapt the cropping frame data of the display area to the changed size of the target material, the preset cropping frame data needs to be updated. In the updating process, the size redundancy of the display container needs to be determined so as to apply the size redundancy to update the data of the preset cropping frame.

[0094] Exemplarily, the size redundancy of the display container is determined in the following manner:

[0095] First, the display compression ratio is determined according to the pre-display size of the target material and the size of the display container.

[0096] Specifically, in order to determine the target display size of the target material, it is necessary to first determine the display compression ratio, which can be determined based on the pre-display size of the target material and the size of the display container. The determination process, for example, determines the display compression ratio based on a portion of the pre-display size of the target material and a portion of the size of the display container. Alternatively, for example, a first pre-display area is determined based on the pre-display size of the target material, and a second pre-display area is determined based on the size of the display container, and then the display compression ratio is determined based on these two areas.

[0097] Exemplarily, under normal circumstances, the display area of ​​the ad slot in the application is a rectangle, and the target material is also a rectangle. At this time, the first compression ratio is determined based on the width value in the pre-display size of the target material and the width value in the size of the display container; and the second compression ratio is determined based on the height value in the pre-display size of the target material and the height value in the size of the display container; and the larger compression ratio between the first compression ratio and the second compression ratio is determined as the display compression ratio.

[0098] In a specific example, the width value in the pre-display size is 200, and the width value in the display container size is 200. The first compression ratio can be determined as a ratio of the two being 1; the height value in the pre-display size is 200, and the height value in the display container size is 100. The second compression ratio can be determined as a ratio of the two being 2, and the larger compression ratio 2 is used as the display compression ratio.

[0099] By respectively determining a first compression ratio of the pre-display size and the display container size in the width direction, and determining a second compression ratio of the pre-display size and the display container size in the height direction, the larger compression ratio is used as the display compression ratio, and the size redundancy of the determined display container is the redundancy in the width or the redundancy in the height, and there will be no redundancy in both the width and the height. When adjusting the preset cropping frame, it is only necessary to adjust the data in one direction.

[0100] Secondly, the target display size of the target material is determined according to the pre-display size and display compression ratio of the target material.

[0101] Specifically, since the pre-display size is detected during the pre-display process, in order to determine the target display size in the subsequent display process, the display size is adjusted by applying the display compression ratio to determine the target display size of the target material, which is the display size required when the target material is displayed in the display container.

[0102] In a specific example, still referring to Figure 4, the display compression ratio is 2, the pre-display size of the target material is 200*200, then the target display size is (200 / 2)*(200 / 2), 44 represents the target display size, for example, it can be 100*100.

[0103] Finally, the size redundancy of the display container is determined according to the size of the display container and the target display size of the target material.

[0104] Specifically, the target display size is the size required when the target material is displayed in the display container. In order to update the preset cropping frame data, it is necessary to determine the size redundancy of the display container. In a specific example, the size of the display container is 200*100, and the target display size of the target material is 100*100, then the size redundancy of the display container is 200-100=100, which is the redundancy in width.

[0105] The ideal display size of the target material when displayed in the container, that is, the target display size, is determined by determining the display compression ratio, and then the size redundancy of the display container is determined according to the target display size of the target material and the size of the display container, and then the size redundancy is applied to update the preset cropping frame, so that the updated cropping frame is more compatible with the size of the display container and the size of the target material.

[0106] In S303, the preset trimming frame data is updated according to the size redundancy of the display container to obtain the target trimming frame data. The target trimming frame data is used to display the target material in the display area through the display container. The preset trimming frame data is applied when the target material is displayed in the display area through the display container during the pre-display process.

[0107] Specifically, before updating the preset cropping frame data according to the size redundancy of the display container, the adjustment ratio is first determined according to the original size of the target material and the target display size. In this way, the updating process of the preset cropping frame data can be implemented in the following manner: adjusting the preset cropping frame data according to the adjustment ratio; determining the sub-data in the preset cropping frame data corresponding to the size redundancy of the display container; and updating the adjusted preset cropping frame data according to the sub-data.

[0108] For example, the original size of the target material is 500*500, and the target display size of the target material is 100*100, then the determined adjustment ratio is 500 / 100=5; the preset cropping frame data includes pixel coordinate data of the upper border, pixel coordinate data of the left border, pixel coordinate data of the lower border, pixel coordinate data of the right border, a preset width and a preset height, and the preset width is determined based on the left border pixel coordinate data and the right border pixel coordinate data, and the preset height is determined based on the upper border pixel coordinate data and the lower border pixel coordinate data. Therefore, for the sake of convenience of expression, the preset cropping frame data is described with the upper border pixel coordinate data, the left border pixel coordinate data, the preset width and the preset height.

[0109] In a specific example, the pixel vertical coordinate of the top border is 0, the pixel horizontal coordinate of the left border is 50, the preset width is 300, and the preset height is 300. After applying the adjustment ratio, the corresponding data are: the pixel vertical coordinate of the top border is 0, the pixel horizontal coordinate of the left border is 10, the preset width is 60, and the preset height is 60. Since the size redundancy of the display container in the above example is the width redundancy, the corresponding sub-data in the preset cropping frame data is the preset width. Figure 5 , shows a process of updating a cropping frame, 51 is a preset cropping frame, 52 is an updated cropping frame, wherein not only the size has changed (scaled according to the display ratio), but also the position has changed (translated by 50 pixels according to the width redundancy A).

[0110] First, the preset cropping frame data is proportionally adjusted using a determined adjustment ratio, and then the preset cropping frame data is adjusted using determined sub-data. Compared with the preset cropping frame, the resulting cropping frame is adjusted in position and size, thereby being more adaptable to the size of the display container and the size of the target material.

[0111] In actual application, the adjusted preset cropping frame data can be updated according to the sub-data in the following manner: if the sub-data is the width of the preset cropping frame, the position of the preset cropping frame in the width direction is updated by applying the set ratio of the size redundancy of the display container; or, if the sub-data is the height of the preset cropping frame, the position of the preset cropping frame in the height direction is updated by applying the set ratio of the size redundancy of the display container.

[0112] Taking the above sub-data as the preset width as an example, the set ratio can be 50%. In this way, the pixel horizontal coordinate of the left border of the adjusted cropping frame is the pixel horizontal coordinate of the left border of the preset cropping frame + the size redundancy of the display container * 50%. In the above example, the pixel horizontal coordinate of the left border of the adjusted cropping frame is 10 + 100 * 50% = 60. Similarly, if the sub-data is the height of the preset cropping frame, the calculation method is the same and will not be repeated here. The above-mentioned updating process of the preset cropping frame is the process of adjusting its position. In this way, the above-mentioned setting ratio takes 50% as an example, which can ensure that when the adjustment is applied and the updated preset cropping frame is used to display the target material, the target material is located in the center of the display area.

[0113] By judging the type of the sub-data, when the sub-data is the width or height of the preset cropping frame, the set ratio of the size redundancy of the display container is respectively applied to adjust the position of the preset cropping frame in the width direction or the height direction.

[0114] In addition, in the process of adjusting the preset cropping frame, it can be achieved through a single ratio adjustment. In this process, the determined adjustment ratio is one, and the adjustment ratio is determined by applying the original size of the target material and the target display size. In the actual application process, it can also be achieved through two ratio adjustments. For example, the first adjustment ratio is determined according to the original size of the target material and the pre-display size. Taking the above example as an example, the first adjustment ratio is 500 / 200=2.5. The first adjustment ratio is applied to the preset cropping frame data for the first time to obtain the middle cropping frame data with the pixel vertical coordinate of the upper frame being 0, the pixel horizontal coordinate of the left frame being 20, the preset width being 120, and the preset height being 120. The second adjustment ratio is the display compression ratio in the above embodiment, and the second adjustment ratio is applied to continue to adjust the middle cropping frame data. The adjusted cropping frame data is the pixel vertical coordinate of the upper frame being 0, the pixel horizontal coordinate of the left frame being 10, the preset width being 60, and the preset height being 60. In this way, the adjusted preset cropping frame data obtained is the same as the adjusted preset cropping frame data obtained in the method of the above embodiment. Compared with the above two methods, the first method only needs to calculate the adjustment ratio once, which improves the calculation speed and reduces the amount of calculation.

[0115] In addition, in the actual application process, if there is no display container, the original size of the target material is the display size, and there is no redundancy of the display container. The preset cropping frame data can be directly applied to display the target material in the display area.

[0116] like Figure 6 As shown, based on the same inventive concept as the above-mentioned material display method, the embodiment of the present application further provides a material display device, including a first size determination unit 61, a second size determination unit 62 and a data determination unit 63.

[0117] A first size determining unit 61 is configured to determine a pre-display size of a target material during a pre-display process of the target material;

[0118] The second size determination unit 62 is configured to determine the size redundancy of the display container according to the size of the display container and the pre-display size of the target material;

[0119] The data determination unit 63 is configured to update the preset cropping frame data according to the size redundancy of the display container to obtain the target cropping frame data; wherein the target cropping frame data is used to display the target material in the display area through the display container, and the preset cropping frame data is applied when displaying the target material in the display area through the display container during the pre-display process.

[0120] In some exemplary embodiments, the second size determination unit 62 is specifically configured to perform:

[0121] Determine the display compression ratio based on the pre-display size of the target material and the size of the display container;

[0122] Determine the target display size of the target material based on the pre-display size and display compression ratio of the target material;

[0123] The size redundancy of the display container is determined according to the size of the display container and the target display size of the target material.

[0124] In some exemplary embodiments, the target material is a rectangle;

[0125] The second size determination unit 62 is specifically configured to execute:

[0126] Determine a first compression ratio according to a width value in the pre-display size of the target material and a width value in the size of the display container; and determine a second compression ratio according to a height value in the pre-display size of the target material and a height value in the size of the display container;

[0127] A larger compression ratio between the first compression ratio and the second compression ratio is determined as the display compression ratio.

[0128] In some exemplary embodiments, an adjustment unit is further included. Before updating the preset trimming frame data according to the size redundancy of the display container, the adjustment unit is configured to execute:

[0129] Determine the adjustment ratio based on the original size of the target material and the target display size;

[0130] The data determination unit 63 is configured to perform:

[0131] Adjust the preset cropping frame data according to the adjustment ratio;

[0132] Determine sub-data in the preset trimming frame data corresponding to the size redundancy of the display container;

[0133] Update the adjusted preset cropping frame data according to the child data.

[0134] In some exemplary embodiments, the data determination unit 63 is configured to execute:

[0135] If the sub-data is the width of the preset cropping frame, then the position of the preset cropping frame in the width direction is updated according to the set ratio of the size redundancy of the display container; or

[0136] If the sub-data is the height of the preset cropping frame, the position of the preset cropping frame in the height direction is updated according to the set ratio of the size redundancy of the display container.

[0137] The material display device proposed in the embodiment of the present application adopts the same inventive concept as the above-mentioned material display method and can achieve the same beneficial effects, which will not be repeated here.

[0138] The implementation and beneficial effects of each operation in the device for generating a login interface can be found in the description of the method above, which will not be repeated here.

[0139] After introducing the method and device for generating a login interface according to an exemplary embodiment of the present application, next, an electronic device according to another exemplary embodiment of the present application is introduced.

[0140] Those skilled in the art will appreciate that various aspects of the present application may be implemented as a system, method or program product. Therefore, various aspects of the present application may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to as "circuit", "module" or "system" herein.

[0141] In some possible implementations, the electronic device according to the present application may include at least one processor and at least one memory. The memory stores program code, and when the program code is executed by the processor, the processor executes the steps in the method for generating a login interface according to various exemplary implementations of the present application described above in this specification. For example, the processor may execute the steps in the method for generating a login interface.

[0142] Refer to the following Figure 7 The electronic device 130 according to this embodiment of the present application is described. Figure 7 The electronic device 130 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0143] like Figure 7 As shown, the electronic device 130 is in the form of a general electronic device. The components of the electronic device 130 may include but are not limited to: the at least one processor 131, the at least one memory 132, and a bus 133 connecting different system components (including the memory 132 and the processor 131).

[0144] Bus 133 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a processor, or a local bus using any of a variety of bus architectures.

[0145] The memory 132 may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 1321 and / or a cache memory 1322 , and may further include a read-only memory (ROM) 1323 .

[0146] The memory 132 may also include a program / utility 1325 having a set (at least one) of program modules 1324, such program modules 1324 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0147] The electronic device 130 may also communicate with one or more external devices 134 (e.g., keyboards, pointing devices, etc.), one or more devices that enable a user to interact with the electronic device 130, and / or any device that enables the electronic device 130 to communicate with one or more other electronic devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 135. Furthermore, the electronic device 130 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 136. Figure 7 As shown, the network adapter 136 communicates with other modules for the electronic device 130 via the bus 133. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device 130, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0148] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 132 including instructions, and the instructions can be executed by a processor 131 of the device to perform the above method. Alternatively, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0149] In an exemplary embodiment, a computer program product is also provided, including a computer program / instruction, and when the computer program / instruction is executed by the processor 131, any method of generating a login interface as provided in the present application is implemented.

[0150] In an exemplary embodiment, various aspects of a method for generating a login interface provided by the present application can also be implemented in the form of a program product, which includes program code. When the program product is run on a computer device, the program code is used to enable the computer device to execute the steps of a method for generating a login interface according to various exemplary embodiments of the present application described above in this specification.

[0151] The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0152] The program product for image zooming of the embodiment of the present application can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on an electronic device. However, the program product of the present application is not limited to this. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0153] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, wherein readable program code is carried. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium other than a readable storage medium, which may transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0154] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0155] The program code for performing the operations of the present application can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and also conventional procedural programming languages ​​such as "C" language or similar programming languages. The program code can be executed entirely on the user electronic device, partially on the user device, as an independent software package, partially on the user electronic device and partially on the remote electronic device, or entirely on the remote electronic device or server. In the case of a remote electronic device, the remote electronic device can be connected to the user electronic device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external electronic device (for example, using an Internet service provider to connect through the Internet).

[0156] It should be noted that, although several units or subunits of the device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided into multiple units to be embodied.

[0157] In addition, although the operations of the method of the present application are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0158] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0159] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable image scaling device to produce a machine, so that the instructions executed by the processor of the computer or other programmable image scaling device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0160] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable image scaling device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, the instruction device being implemented in the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0161] These computer program instructions may also be loaded onto a computer or other programmable image scaling device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0162] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0163] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A material display method, characterized in that: include: Apply the preset cropping data and pre-display the target material in the display area through the display container; During the pre-display process of the target material, detecting the pre-display size of the target material; Determining a size redundancy of the display container according to the size of the display container and the pre-display size of the target material; wherein the size redundancy includes a size redundancy in the length direction of the display container and a size redundancy in the width direction of the display container; updating the preset trimming frame data according to the size redundancy of the display container to obtain the target trimming frame data; wherein the target trimming frame data is used to display the target material in the display area through the display container; The determining of the size redundancy of the display container according to the size of the display container and the pre-display size of the target material comprises: determining a display compression ratio according to the pre-display size of the target material and the size of the display container; determining a target display size of the target material according to the pre-display size of the target material and the display compression ratio; and determining the size redundancy of the display container according to the size of the display container and the target display size of the target material.

2. The method according to claim 1, characterized in that The target material is a rectangle; Determining a display compression ratio according to the pre-display size of the target material and the size of the display container includes: Determine a first compression ratio according to a width value in the pre-display size of the target material and a width value in the size of the display container; and determine a second compression ratio according to a height value in the pre-display size of the target material and a height value in the size of the display container; A larger compression ratio between the first compression ratio and the second compression ratio is determined as a display compression ratio.

3. The method according to claim 1, characterized in that: Before updating the preset trimming frame data according to the size redundancy of the display container, the method further includes: Determining an adjustment ratio according to the original size of the target material and the target display size; The updating of the preset clipping frame data according to the size redundancy of the display container includes: Adjusting the preset cropping frame data according to the adjustment ratio; Determine sub-data in the preset trimming frame data corresponding to the size redundancy of the display container; The adjusted preset cropping frame data is updated according to the sub-data.

4. The method according to claim 3, characterized in that The updating and adjusting of the preset cropping frame data according to the sub-data includes: If the sub-data is the width of the preset cropping frame, then the position of the preset cropping frame in the width direction is updated by applying the set ratio of the size redundancy of the display container; or If the sub-data is the height of the preset cropping frame, the position of the preset cropping frame in the height direction is updated by applying the set ratio of the size redundancy of the display container.

5. A material display device, characterized in that: include: A first size determination unit is configured to execute: applying preset cropping data, pre-displaying the target material in a display area through a display container, and determining a pre-display size of the target material during the pre-display of the target material; A second size determination unit is configured to determine a size redundancy of the display container according to a size of the display container and a pre-display size of the target material; wherein the size redundancy includes a size redundancy in a length direction of the display container and a size redundancy in a width direction of the display container; a data determination unit, configured to update preset trimming frame data according to the size redundancy of the display container to obtain target trimming frame data; wherein the target trimming frame data is used to display the target material in the display area through the display container, and the preset trimming frame data is applied when displaying the target material in the display area through the display container during a pre-display process; The second size determination unit is specifically configured to execute: Determining a display compression ratio according to a pre-display size of the target material and a size of the display container; Determining a target display size of the target material according to the pre-display size of the target material and the display compression ratio; The size redundancy of the display container is determined according to the size of the display container and the target display size of the target material.

6. The device according to claim 5, characterized in that The target material is a rectangle; The second size determination unit is specifically configured to execute: Determine a first compression ratio according to a width value in the pre-display size of the target material and a width value in the size of the display container; and determine a second compression ratio according to a height value in the pre-display size of the target material and a height value in the size of the display container; A larger compression ratio between the first compression ratio and the second compression ratio is determined as a display compression ratio.

7. The device according to claim 5, characterized in that The method further includes an adjusting unit, which is configured to execute: Determining an adjustment ratio according to the original size of the target material and the target display size; The data determination unit is configured to execute: Adjusting the preset cropping frame data according to the adjustment ratio; Determine sub-data in the preset trimming frame data corresponding to the size redundancy of the display container; The adjusted preset cropping frame data is updated according to the sub-data.

8. The device according to claim 7, characterized in that The data determination unit is configured to execute: If the sub-data is the width of the preset cropping frame, then the position of the preset cropping frame in the width direction is updated by applying the set ratio of the size redundancy of the display container; or If the sub-data is the height of the preset cropping frame, the position of the preset cropping frame in the height direction is updated by applying the set ratio of the size redundancy of the display container.

9. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the material display method as described in any one of claims 1 to 4.

10. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the material display method as described in any one of claims 1 to 4.

11. A computer program product, characterized in that It includes a computer program / instruction, which, when executed by a processor, implements the material display method described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Instant messaging (IM) message display method and device

    CN102487362A

  • Activity page generation method and device and electronic equipment

    CN112528207A