Page display method and device, medium, equipment and computer program product
By acquiring the device's physical pixel density and the size of the identification code, the logical resolution of the identification code is dynamically determined, solving the problem of decreased recognition efficiency and accuracy among elderly users due to magnified display, and achieving stable recognition results on different devices and display modes.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2026-03-31
AI Technical Summary
In existing technologies, the identification code suffers from reduced recognition efficiency or recognition errors when used by elderly users due to the enlarged display.
By acquiring the physical pixel density of the target device and the size information of the identification code, the logical resolution of the identification code is dynamically determined to maintain the consistency of the physical size of the identification code in different devices or display modes, thus avoiding the decrease in recognition efficiency and accuracy caused by changes in the display size of the identification code.
Maintaining the recognition efficiency and accuracy of identification codes across different devices and display modes enhances the user experience for elderly users.
Smart Images

Figure CN121764565A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and more specifically, to a page display method, apparatus, medium, device, and computer program product. Background Technology
[0002] With the development of computer technology, the elderly user group is gradually increasing, and the demand for age-friendly and accessible internet applications is also growing to improve the user experience for seniors. In related technologies, age-friendly solutions are typically developed by designers who enlarge and adapt existing basic designs, thereby magnifying the content displayed on the page for easier viewing by the user. Summary of the Invention
[0003] This summary section is provided to briefly introduce the concepts, which will be described in detail in the detailed description section below. This summary section is not intended to identify key or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0004] In a first aspect, this disclosure provides a page display method, the method comprising: In response to receiving a display request for a target page, the physical pixel density corresponding to the target device is obtained and the size information of the identification code in the target page is obtained, wherein the physical pixel density is used to represent the number of physical pixels per inch; Based on the physical pixel density and the size information, the logical resolution corresponding to the identification code is determined; Based on the logical resolution, the identification code corresponding to the target page is displayed in the identification code area of the target page.
[0005] Secondly, this disclosure provides a page display device, the device comprising: The first acquisition module is used to, in response to receiving a display request for a target page, acquire the physical pixel density corresponding to the target device and acquire the size information of the identification code in the target page, wherein the physical pixel density is used to represent the number of physical pixels per inch; The first determining module is used to determine the logical resolution corresponding to the identification code based on the physical pixel density and the size information; The first display module is used to display the identification code corresponding to the target page in the identification code area of the target page based on the logical resolution.
[0006] Thirdly, this disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the method described in the first aspect.
[0007] Fourthly, this disclosure provides an electronic device, comprising: A storage device on which computer programs are stored; A processing device for executing the computer program in the storage device to implement the steps of the method described in the first aspect.
[0008] Fifthly, this disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described in the first aspect.
[0009] Therefore, through the above technical solution, for elements such as identification codes that do not need to change based on changes in the size of page elements, the logical resolution corresponding to the identification code can be dynamically determined based on the physical pixel density of the display device and the size information of the identification code. This allows the same identification code to be displayed at the same physical size on different devices or in different display modes of the same device, thus avoiding the impact of device or display mode adjustments on the identification code recognition efficiency. At the same time, it avoids scenarios where the identification code cannot be recognized or is misrecognized due to changes in the display size of the identification code, ensuring the recognition efficiency and accuracy of the identification code on the target page.
[0010] Other features and advantages of this disclosure will be described in detail in the following detailed description section. Attached Figure Description
[0011] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale. In the drawings: Figure 1 This is a flowchart of a page display method provided according to one embodiment of the present disclosure.
[0012] Figure 2 This is a signaling interaction diagram between a client, a server, and a display configuration terminal, provided according to one embodiment of this disclosure.
[0013] Figure 3 This is a schematic diagram of a target page provided according to one embodiment of the present disclosure.
[0014] Figure 4 This is a block diagram of a page display device provided according to one embodiment of the present disclosure.
[0015] Figure 5 A schematic diagram of the structure of an electronic device 600 suitable for implementing embodiments of the present disclosure is shown. Detailed Implementation
[0016] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0017] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0018] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0019] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0020] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0021] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0022] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.
[0023] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.
[0024] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0025] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.
[0026] Meanwhile, it is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.
[0027] As shown in the background section, when implementing age-friendly design, elements on the page are typically enlarged according to a given UI design. The applicant's research has found that when identification codes, such as barcodes or QR codes, are present on the page, these codes are also enlarged. Since these codes are usually scanned by other devices, enlarging them may reduce recognition efficiency, or even cause some areas to fall outside the recognition detection area of the device, resulting in unrecognized or incorrectly recognized codes. Therefore, this disclosure provides the following embodiments to ensure the display size of the identification codes.
[0028] First, the terms used in this disclosure will be explained.
[0029] The page display process can generally be abstracted into two processes: rendering and output. This display process can be further abstracted into three layers: the logical layer, the rendering layer, and the physical layer. In application development, logical pixels are typically used for settings on the logical layer. The logical layer usually uses logical pixels as the unit of measurement; these are virtual pixel units used to provide consistent visual effects across devices of various resolutions and sizes. The rendering layer typically uses rendered pixels as the unit of measurement. Logical pixels are converted into corresponding rendered pixels using a rendering scaling factor, and each rendered pixel stores information about one pixel in the rendered bitmap. The physical layer typically uses physical pixels as the unit of measurement; these are the smallest units that the device screen can control for display. Each layer has its corresponding resolution: logical resolution represents the number of logical pixels (e.g., 375×667 points), rendering resolution represents the number of rendered pixels (e.g., 750×1334 pixels), and physical resolution represents the number of physical pixels (e.g., 750×1334 device pixels). During page display, the image from the logical layer is first rendered to the rendering layer, and then the image from the rendering layer is output to the physical layer, i.e., the device screen.
[0030] The specific embodiments of this disclosure will be described in detail below.
[0031] Figure 1 The diagram shown is a flowchart of a page display method according to an embodiment of the present disclosure. Figure 1 As shown, the method may include: In step 11, in response to receiving a display request for the target page, the physical pixel density corresponding to the target device is obtained and the size information of the identification code in the target page is obtained, wherein the physical pixel density is used to represent the number of physical pixels per inch.
[0032] As an example, the method provided in this disclosure can be applied to applications installed on terminal devices, such as applications in mobile phones, tablets, and other clients, or it can be used in mini-program applications. The physical pixel density can be represented by PPI (Pixels Per Inch), which indicates the number of physical pixels per inch. A higher PPI value means the display can show images at a higher density, and the higher the image density, the higher the realism.
[0033] In mobile devices, a corresponding interface can be configured in the system to obtain the PPI value. The size information of the identification code on the target page can be configured by pre-testing the installation location and detection range of the identification device. It can be configured based on different usage scenarios, and this disclosure does not limit it. The identification code can be a barcode, QR code, etc., such as a transit code used in a ride-hailing scenario.
[0034] In step 12, the logical resolution corresponding to the identification code is determined based on the physical pixel density and size information.
[0035] Based on the page rendering process described above, it can be determined that the conversion from logical resolution to display size information can be achieved through the following process:
[0036] Here, size(mm) is used to represent size information in millimeters (mm), size(pt) is used to represent logical resolution, and native scale is used to represent the conversion factor from logical resolution to physical resolution. It can be obtained through the parameter interface configured by the device, such as UIScreen.nativeScale in iOS devices.
[0037] Based on the above process, the process from size information to logical resolution can be represented as follows:
[0038] Therefore, the logical resolution can be derived from the size information, so that when the identification code is displayed based on the logical resolution, the size of the identification code is the size of the size information.
[0039] In step 13, based on the logical resolution, the identification code corresponding to the target page is displayed in the identification code area of the target page.
[0040] In this step, the rendering resolution can be determined based on the logical resolution, and then the corresponding physical resolution can be determined to render the identification code and display it in the identification code area of the target page. This rendering process can be determined based on common page rendering methods in this field, and this disclosure does not limit it in this way.
[0041] Therefore, through the above technical solution, for elements such as identification codes that do not need to change based on changes in the size of page elements, the logical resolution corresponding to the identification code can be dynamically determined based on the physical pixel density of the display device and the size information of the identification code. This allows the same identification code to be displayed at the same physical size on different devices or in different display modes of the same device, thus avoiding the impact of device or display mode adjustments on the identification code recognition efficiency. At the same time, it avoids scenarios where the identification code cannot be recognized or is misrecognized due to changes in the display size of the identification code, ensuring the recognition efficiency and accuracy of the identification code on the target page.
[0042] In one possible embodiment, obtaining the physical pixel density corresponding to the target device may include: If the target device does not store physical pixel density, a pixel density request message is sent to the display configuration terminal. The pixel density request message contains device information of the target device. The display configuration terminal contains multiple preset mapping relationships between device information and physical pixel density. The display configuration terminal is used to determine the physical pixel density corresponding to the target device based on the device information of the target device. In response to receiving a return message from the display configuration terminal, the physical pixel density is determined based on the return message.
[0043] like Figure 2 The diagram illustrates the signaling interaction between the client, server, and display configuration end. As an example, the physical pixel density of a device typically remains constant. Therefore, once the physical pixel density of each device is determined for the first time, it can be stored locally for direct application during subsequent rendering. Thus, in this embodiment, a query can be performed first from the target device's local storage. If the target device stores the physical pixel density, it can be directly used as the target device's physical pixel density.
[0044] As another example, if the target device does not store the physical pixel density, it can be dynamically obtained. For instance, if the target device can obtain the physical pixel density through a system-configured interface, the physical pixel density can be obtained based on that interface. If the system cannot obtain the physical pixel density through the interface, the device information of the target device can be obtained, such as the device model. Then, a pixel density request message is generated based on this device information and sent to the display configuration terminal. The display configuration terminal then determines the physical pixel density corresponding to the device.
[0045] The mapping relationship in this display configuration can be implemented using a script, such as a Python script. The physical pixel density corresponding to each device information in the mapping relationship can be configured based on the official data of the corresponding device to ensure the accuracy and effectiveness of the mapping relationship. The physical pixel density corresponding to the device information defined in the script is represented as follows: if device_model in[ "XX1", "XX2", "XX3", "XX4", "XX5", "XX6" ]: return 401 else if device_model in [ "XX7", "XX8", "XX9", "XX10" ]: return 476 else if device_model in [ “XX11”, “XX12” ]: return 458 else: return None When the display configuration terminal receives a pixel density request message, it can obtain device information from the request message and then execute the script based on that device information. If the device information is XX4, then the physical pixel density corresponding to that device information can be determined to be 401. The display configuration terminal can then return a message to the target terminal, which may contain the physical pixel density determined by the display configuration terminal.
[0046] As an example, if the return value in the returned message is not null, then the return value in the returned message can be used as the physical pixel density corresponding to the target device. For example, if the target terminal can obtain 401 from the received returned message, it can determine that the physical pixel density corresponding to the target device is 401.
[0047] Therefore, through the above technical solution, the target device can dynamically and in real time obtain the physical pixel density corresponding to the target device by interacting with the display configuration terminal. At the same time, when adding a new device, the physical pixel density of the device can be dynamically distributed by modifying the mapping relationship of the display configuration terminal, without relying on application client releases. This effectively broadens the scope of application of the disclosed method and improves the user experience.
[0048] In one possible embodiment, the method may further include: Receive a configuration message sent by the display configuration terminal, the configuration message containing the physical pixel density corresponding to the target device.
[0049] The physical pixel density information in the configuration message is stored in the target device.
[0050] The display configuration terminal can proactively send physical pixel density to the target device for direct application during subsequent rendering of the target page. For example, the trigger conditions for sending configuration information can be pre-configured, such as application cold start, application foreground / background switching, or push notifications at preset time intervals. For instance, the configuration information can be proactively sent during application cold start, allowing the physical pixel density of the target device to be determined before application interaction with the user, facilitating subsequent application processes. Similarly, when the application determines that the target device is switching from foreground to background or vice versa, configuration information can be sent to the target device to improve rendering efficiency of the target page. Preset time intervals can be configured based on actual application scenarios, allowing configuration messages to be sent to the target device according to these intervals. Therefore, by proactively sending configuration messages, the physical pixel density can be stored in the target device, allowing for direct retrieval of the data during subsequent applications, avoiding latency in physical pixel density acquisition and improving the efficiency and accuracy of target page display.
[0051] As another example, the method also includes: If the return value in the returned message is empty, then the rendering scaling factor of the target device is obtained.
[0052] If the target device's device information is XX13, then the return value after the display configuration terminal executes the above script is None, and the return value in this message is None, i.e., an empty value. At this time, the physical pixel density corresponding to this device information is not configured in the mapping relationship in the display configuration terminal. However, in different devices, to ensure that the rendering effect is basically consistent on similar devices, the operating system usually has a strong correlation between physical pixel density and the rendering scaling factor. Therefore, in this embodiment, the rendering scaling factor (scale) corresponding to the target device can be further obtained. As an example, it can be obtained through the corresponding interface of the device; for example, it can be obtained through UIScreen.scale on iOS devices and through DisplayMetrics.density on Android devices.
[0053] Based on the rendering scaling factor and density mapping relationship, the physical pixel density corresponding to the target device is determined. The density mapping relationship includes multiple mapping relationships between rendering scaling factors and physical pixel densities, and the density mapping relationship is a preset mapping relationship in the target device.
[0054] As an example, if the physical pixel density corresponding to a rendering scaling factor of 3× is determined to be 460, the physical pixel density corresponding to a rendering scaling factor of 2× is 326, and the physical pixel density corresponding to a rendering scaling factor of 1× is 163, then the density mapping relationship can be preset into the target device using the following code: if (scale == 3){ PPI = 460.f;} else{PPI =163.f × scale;} The ".f" indicates that the value is converted to the corresponding floating-point representation.
[0055] In this embodiment, the density mapping relationship can be predetermined and preset in the target device. If the physical pixel density cannot be determined by the interface acquisition method and the dynamic acquisition method of the display configuration terminal as described above, the physical pixel density can be determined by querying the density mapping relationship based on the rendering scaling factor. This can achieve a fallback acquisition of the physical pixel density, and at the same time, it can also ensure the accuracy and adaptability of the determined physical pixel density to a certain extent, thereby improving the effectiveness and recognition efficiency of the identification code display in the target page.
[0056] The density mapping relationship can be determined in the following way: For each of the rendering scaling factors, obtain the physical pixel density applied by multiple devices corresponding to that rendering scaling factor.
[0057] In this invention, the rendering scaling factor is generally discrete and enumerable. Therefore, statistics can be performed on each rendering scaling factor to determine the rendering scaling factor and physical pixel density of each device during the experiment, thereby statistically analyzing the physical pixel density applied by each device under each rendering scaling factor.
[0058] The physical pixel density with the highest number of corresponding devices is used as the physical pixel density corresponding to this rendering scaling factor.
[0059] As an example, taking a rendering scaling factor of 3×, there are A1 devices with a physical pixel density of 1 PPI, A2 devices with a physical pixel density of 2 PPI, and A3 devices with a physical pixel density of 3 PPI. Since A2 is greater than both A1 and A3, PPI 2 can be used as the physical pixel density corresponding to the rendering scaling factor 3×. The physical pixel densities corresponding to other rendering scaling factors can be determined in the same way to establish a density mapping relationship.
[0060] Following the example above, if the target device's device information is XX13, and the display configuration terminal returns None after executing the above script, then the rendering scaling factor corresponding to the target device can be further obtained, such as 3×. Based on this density mapping relationship, the physical pixel density corresponding to the target device can be determined to be 2 PPI.
[0061] Therefore, through the above technical solution, for each rendering scaling factor, the physical pixel density with the largest number of corresponding devices can be used as the physical pixel density corresponding to that rendering scaling factor, so as to improve the compatibility between the physical pixel density and the device to a certain extent, as well as the accuracy of the rendering resolution determined based on the physical pixel density.
[0062] In one possible embodiment, obtaining the size information of the identification code in the target page may include: The business information corresponding to the target page is determined. The recognition accuracy of the recognition devices may differ depending on the type of business information, and the required size of the identification codes may also vary. Therefore, this disclosure further obtains the business information corresponding to the target page. This business information can be determined based on the attributes configured on the target page. For example, the business information corresponding to page Y1 is a transit code service, and the business information corresponding to page Y2 is a payment code service.
[0063] As another example, different sub-business scenarios may lead to different requirements for identification code sizes. For example, in the ride code business, the ride codes in Beijing and Shanghai correspond to different size information. Therefore, the business information in this disclosure can also be represented by multi-level business information, such as ride code business / Beijing as one type of business information, and ride code business / Shanghai as another type of business information.
[0064] A business request is generated based on the business information and sent to the server so that the server can determine the size information of the identification code based on the business information.
[0065] As an example, operators can configure the size information of the identification code for different business scenarios in the business information configuration terminal. For example, the size information for the ride code business is C1, and the size information for the payment code business is C2. Multiple configurable business information images are displayed in the business information configuration terminal, allowing operators to input the corresponding size information based on actual needs, thereby achieving flexible configuration of the size information for different business scenarios.
[0066] As an example, the determined business information can be added to the request to generate a business request to be sent to the server. After receiving the business request, the server can query the size information (such as 35mm) configured for the corresponding business information from the business information configuration terminal and return it to the target device for the target device to dynamically adjust the display size of the identification code.
[0067] In response to receiving the return information from the server, the size information in the return information is used as the size information of the identification code.
[0068] If the returned information contains a value of 35mm, then 35mm can be used as the size information of the identification code.
[0069] Therefore, the above technical solution can support operators to configure different size information for different business scenarios, further improve the adaptability of the identification code display on the target page to actual application scenarios, and improve the identification efficiency and accuracy of the identification code.
[0070] In one possible embodiment, the method may further include: For the display elements on the target page other than the identification code, determine the display mode of the display elements.
[0071] Among them, such as Figure 3 The diagram shows a schematic of the target page. Area B1 is the identification code area, while B2-B4 are the display elements excluding the identification code. Designers can configure the corresponding display mode for each display element to achieve display control over different display elements.
[0072] If the display mode of the display element is dynamic size display mode, then obtain the logical resolution corresponding to the display element.
[0073] Taking B3 as an example, its corresponding display text is "XX Metro". To facilitate user viewing of this content on the page, the display mode of this element can be set to dynamic size display mode, meaning the display size of this element will change according to the user's settings. For example, in age-friendly scenarios, the display size of the B3 text will be enlarged accordingly.
[0074] Accordingly, when designers select the dynamic size display mode during configuration, a logical resolution input box can be displayed to determine the logical resolution corresponding to the display element during display, such as setting it to 30×30 pt. Then, during the rendering and display process of the target page, the display mode corresponding to the display element B3 can be determined to be the dynamic size display mode based on the page's configuration information, and its corresponding logical resolution is 30×30 pt.
[0075] If the display element is in a fixed-size display mode, then obtain the size information corresponding to the display element.
[0076] Based on the physical pixel density and the size information corresponding to the display element, the logical resolution corresponding to the display element is determined.
[0077] Taking B5 as an example, its corresponding displayed text is the subway card code. This code is usually a unique identifier and typically doesn't have a corresponding actual meaning. In one scenario, to avoid interfering with elderly users, this content doesn't need to be enlarged. In this scenario, the display mode of this element can be set to a fixed-size display mode, meaning the display size of this element will not change according to the user's settings. For example, in an age-friendly scenario, the display size of the B5 text will not change.
[0078] Accordingly, when the designer selects the fixed-size display mode during configuration, a physical size information input box can be displayed to determine the size information of the display element when it is displayed on the screen, such as setting it to 50mm × 10mm. Then, during the rendering and display process of the target page, the display mode corresponding to the display element B5 can be determined to be the fixed-size display mode based on the page's configuration information, and its corresponding size information is 50mm × 10mm. Subsequently, the logical resolution of the display element can be determined through the specific implementation method of step 12 above, which will not be elaborated further here.
[0079] Then, based on the logical resolution corresponding to the display element, the display element is displayed on the target page.
[0080] The rendering process of the displayed elements has been described in detail above and will not be repeated here.
[0081] Therefore, through the above technical solution, the target page can support the display size of some elements to be fixed while the display size of other elements varies with different display models. This ensures that the identification code can maintain the same physical size in various devices and scenarios, while also ensuring that other elements on the page can flexibly adapt to the large font size mode, thus providing a better user experience in age-friendly scenarios.
[0082] Based on the same inventive concept, this disclosure also provides a page display device, such as... Figure 4 As shown, the device 10 includes: The first acquisition module 100 is used to, in response to receiving a display request for a target page, acquire the physical pixel density corresponding to the target device and acquire the size information of the identification code in the target page, wherein the physical pixel density is used to represent the number of physical pixels per inch; The first determining module 200 is used to determine the logical resolution corresponding to the identification code based on the physical pixel density and the size information; The first display module 300 is used to display the identification code corresponding to the target page in the identification code area of the target page based on the logical resolution.
[0083] Optionally, the first acquisition module includes: The first sending submodule is used to send a pixel density request message to the display configuration terminal if the target device does not store physical pixel density. The pixel density request message contains device information of the target device, and the display configuration terminal contains multiple preset mapping relationships between device information and physical pixel density. The display configuration terminal is used to determine the physical pixel density corresponding to the target device based on the device information of the target device. The first processing submodule is used to determine the physical pixel density based on the return message received from the display configuration terminal.
[0084] Optionally, the device further includes: The second acquisition module is used to acquire the rendering scaling factor of the target device if the return value in the returned message is empty. The second determining module is used to determine the physical pixel density corresponding to the target device based on the rendering scaling factor and density mapping relationship, wherein the density mapping relationship includes multiple mapping relationships between rendering scaling factors and physical pixel densities, and the density mapping relationship is a preset mapping relationship in the target device.
[0085] Optionally, the density mapping relationship is determined in the following way: For each of the rendering scaling factors, obtain the physical pixel density applied by multiple devices corresponding to that rendering scaling factor; The physical pixel density with the highest number of corresponding devices is used as the physical pixel density corresponding to this rendering scaling factor.
[0086] Optionally, the device further includes: The receiving module is used to receive configuration messages sent by the display configuration terminal, wherein the configuration messages contain the physical pixel density corresponding to the target device; A storage module is used to store the physical pixel density information in the configuration message to the target device.
[0087] Optionally, the first acquisition module includes: The determination submodule is used to determine the business information corresponding to the target page; The second sending submodule is used to generate a service request based on the service information and send the service request to the server so that the server can determine the size information of the identification code based on the service information. The second processing submodule is used to respond to the returned information received from the server and use the size information in the returned information as the size information of the identification code.
[0088] Optionally, the device further includes: The third determining module is used to determine the display mode of the display elements other than the identification code in the target page. The third acquisition module is used to acquire the logical resolution corresponding to the display element if the display mode of the display element is a dynamic size display mode; The fourth acquisition module is used to acquire the size information corresponding to the display element if the display mode of the display element is a fixed size display mode; The fourth determining module is used to determine the logical resolution corresponding to the display element based on the physical pixel density and the size information corresponding to the display element; The second display module is used to display the display element on the target page based on the logical resolution corresponding to the display element.
[0089] The following is for reference. Figure 5 The diagram illustrates a structural schematic of an electronic device (e.g., a terminal device) 600 suitable for implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0090] like Figure 5 As shown, electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 601, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 602 or a program loaded from storage device 608 into random access memory (RAM) 603. RAM 603 also stores various programs and data required for the operation of electronic device 600. Processing device 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.
[0091] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5 An electronic device 600 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0092] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, it performs the functions defined in the methods of embodiments of this disclosure.
[0093] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0094] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0095] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0096] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: in response to receiving a display request for a target page, obtain the physical pixel density corresponding to the target device and obtain the size information of the identification code in the target page, wherein the physical pixel density is used to represent the number of physical pixels per inch; determine the logical resolution corresponding to the identification code based on the physical pixel density and the size information; and display the identification code corresponding to the target page in the identification code area of the target page based on the logical resolution.
[0097] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0098] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0099] The modules described in the embodiments of this disclosure can be implemented in software or hardware. The names of the modules are not necessarily limiting in certain circumstances; for example, the first acquisition module can also be described as "a module that, in response to receiving a display request for a target page, acquires the physical pixel density corresponding to the target device and acquires the size information of the identification code in the target page."
[0100] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.
[0101] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0102] According to one or more embodiments of this disclosure, Example 1 provides a page display method, wherein the method includes: In response to receiving a display request for a target page, the physical pixel density corresponding to the target device is obtained and the size information of the identification code in the target page is obtained, wherein the physical pixel density is used to represent the number of physical pixels per inch; Based on the physical pixel density and the size information, the logical resolution corresponding to the identification code is determined; Based on the logical resolution, the identification code corresponding to the target page is displayed in the identification code area of the target page.
[0103] According to one or more embodiments of this disclosure, Example 2 provides the method of Example 1, wherein obtaining the physical pixel density corresponding to the target device includes: If the target device does not store physical pixel density, a pixel density request message is sent to the display configuration terminal. The pixel density request message contains device information of the target device. The display configuration terminal contains multiple preset mapping relationships between device information and physical pixel density. The display configuration terminal is used to determine the physical pixel density corresponding to the target device based on the device information of the target device. In response to receiving a return message from the display configuration terminal, the physical pixel density is determined based on the return message.
[0104] According to one or more embodiments of this disclosure, Example 3 provides the method of Example 2, wherein the method further includes: If the return value in the returned message is empty, then obtain the rendering scaling factor of the target device; Based on the rendering scaling factor and density mapping relationship, the physical pixel density corresponding to the target device is determined. The density mapping relationship includes multiple mapping relationships between rendering scaling factors and physical pixel densities, and the density mapping relationship is a preset mapping relationship in the target device.
[0105] According to one or more embodiments of this disclosure, Example 4 provides the method of Example 3, wherein the density mapping relationship is determined in the following manner: For each of the rendering scaling factors, obtain the physical pixel density applied by multiple devices corresponding to that rendering scaling factor; The physical pixel density with the highest number of corresponding devices is used as the physical pixel density corresponding to this rendering scaling factor.
[0106] According to one or more embodiments of this disclosure, Example 5 provides the method of Example 1, wherein the method further includes: Receive a configuration message sent by the display configuration terminal, wherein the configuration message contains the physical pixel density corresponding to the target device; The physical pixel density information in the configuration message is stored in the target device.
[0107] According to one or more embodiments of this disclosure, Example 6 provides the method of Example 1, wherein obtaining the size information of the identification code in the target page includes: Determine the business information corresponding to the target page; A business request is generated based on the business information and sent to the server so that the server can determine the size information of the identification code based on the business information. In response to receiving the return information from the server, the size information in the return information is used as the size information of the identification code.
[0108] According to one or more embodiments of this disclosure, Example 7 provides the method of Example 1, wherein the method further includes: For the display elements on the target page other than the identification code, determine the display mode of the display elements; If the display mode of the display element is a dynamic size display mode, then obtain the logical resolution corresponding to the display element; If the display mode of the display element is a fixed-size display mode, then obtain the size information corresponding to the display element; Based on the physical pixel density and the size information corresponding to the display element, the logical resolution corresponding to the display element is determined; The display element is displayed on the target page based on the logical resolution corresponding to the display element.
[0109] According to one or more embodiments of this disclosure, Example 8 provides a page display device, the device comprising: The first acquisition module is used to, in response to receiving a display request for a target page, acquire the physical pixel density corresponding to the target device and acquire the size information of the identification code in the target page, wherein the physical pixel density is used to represent the number of physical pixels per inch; The first determining module is used to determine the logical resolution corresponding to the identification code based on the physical pixel density and the size information; The first display module is used to display the identification code corresponding to the target page in the identification code area of the target page based on the logical resolution.
[0110] According to one or more embodiments of the present disclosure, Example 9 provides a computer-readable medium having a computer program stored thereon that, when executed by a processing device, implements the steps of the method described in any one of Examples 1-7.
[0111] According to one or more embodiments of this disclosure, Example 10 provides an electronic device, including: A storage device on which computer programs are stored; A processing device for executing the computer program in the storage device to implement the steps of any one of the methods in Examples 1-7.
[0112] According to one or more embodiments of the present disclosure, Example 11 provides a computer program product including a computer program that, when executed by a processor, implements the steps of the method described in any one of Examples 1-7.
[0113] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0114] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0115] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative forms of implementing the claims. Regarding the apparatus in the above embodiments, the specific manner in which the various modules perform their operations has been described in detail in the embodiments relating to the method, and will not be elaborated upon here.
Claims
1. A page display method characterized by comprising: The method comprises: in response to receiving a display request of a target page, obtaining a physical pixel density corresponding to a target device and obtaining size information of an identification code in the target page, wherein the physical pixel density is used to represent the number of physical pixels corresponding to each inch; based on the physical pixel density and the size information, determining a logical resolution corresponding to the identification code; based on the logical resolution, displaying the identification code corresponding to the target page in the identification code area of the target page.
2. The method of claim 1, wherein, The method comprises: if the target device does not store the physical pixel density, sending a pixel density request message to a display configuration end, wherein the pixel density request message contains device information of the target device, the display configuration end contains a plurality of preset mapping relationships between device information and physical pixel densities, and the display configuration end is used to determine the physical pixel density corresponding to the target device based on the device information of the target device; in response to receiving a return message sent by the display configuration end, determining the physical pixel density based on the return message.
3. The method of claim 2, wherein, The method further comprises: if the return value in the return message is a null value, obtaining a rendering scaling factor of the target device; based on the rendering scaling factor and the density mapping relationship, determining the physical pixel density corresponding to the target device, wherein the density mapping relationship contains a plurality of mapping relationships between rendering scaling factors and physical pixel densities, and the density mapping relationship is a preset mapping relationship in the target device.
4. The method of claim 3, wherein, The density mapping relationship is determined by: for each rendering scaling factor, obtaining the physical pixel density applied by a plurality of devices corresponding to the rendering scaling factor; the physical pixel density with the largest number of corresponding devices is taken as the physical pixel density corresponding to the rendering scaling factor.
5. The method of claim 1, wherein, The method further comprises: receiving a configuration message sent by the display configuration end, wherein the configuration message contains the physical pixel density corresponding to the target device; storing the physical pixel density information in the configuration message to the target device.
6. The method of claim 1, wherein, The method further comprises: determining service information corresponding to the target page; generating a service request based on the service information and sending the service request to a service end, so that the service end determines the size information of the identification code based on the service information; in response to receiving return information from the service end, taking the size information in the return information as the size information of the identification code.
7. The method of claim 1, wherein, The method further comprises: for display elements in the target page other than the identification code, determining a display mode of the display element; if the display mode of the display element is a dynamic size display mode, obtaining a logical resolution corresponding to the display element; if the display mode of the display element is a fixed size display mode, obtaining size information corresponding to the display element; based on the physical pixel density and the size information corresponding to the display element, determining a logical resolution corresponding to the display element; Display the display element in the target page based on the logical resolution corresponding to the display element.
8. A page display device characterized by comprising: The apparatus comprises: A first obtaining module, configured to, in response to receiving a display request of a target page, obtain a physical pixel density corresponding to a target device and obtain size information of an identification code in the target page, wherein the physical pixel density is used to represent a number of physical pixels corresponding to each inch; A first determining module, configured to determine a logical resolution corresponding to the identification code based on the physical pixel density and the size information; A first display module, configured to display an identification code corresponding to the target page in an identification code area of the target page based on the logical resolution.
9. A computer readable medium having stored thereon a computer program, characterized in that, The computer program is executed by a processing apparatus to implement the steps of the method in any one of claims 1-7.
10. An electronic device, comprising: Comprise: A storage device having a computer program stored thereon; A processing apparatus configured to execute the computer program in the storage device to implement the steps of the method in any one of claims 1-7.
11. A computer program product comprising a computer program, characterized in that, The computer program is executed by a processor to implement the steps of the method in any one of claims 1-7.