Page layout file generation method and device, electronic equipment and readable storage medium
By generating target layout files using the first device, the problems of development difficulty and insufficient applicability in page display technology are solved, and efficient generation of page layout files on different devices is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2020-10-30
- Publication Date
- 2026-05-26
AI Technical Summary
Existing page display technologies cannot simultaneously address both the difficulty of page development and the applicability of page layout files, especially on devices with limited computing power, resulting in low applicability of page layout files.
The target parameters of the target device are obtained by the first device, the target layout file is generated, and the file is sent to the target device. This reduces the configuration work of developers, lowers the difficulty of page development, and eliminates the need for the target device to have page layout calculation capabilities.
It eliminates the need for manual configuration of display parameters on different devices, reducing the difficulty of page development, improving the applicability of the generated target layout file, and making it suitable for devices with limited computing power.
Smart Images

Figure CN114444000B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of data processing technology, and in particular relates to a method, apparatus, electronic device, and readable storage medium for generating page layout files. Background Technology
[0002] With the continuous development of electronic device technology, the number and types of electronic devices are constantly increasing. There are not only powerful electronic devices on the market, but also mobile devices that are becoming lighter and more portable. The display interface sizes of different types of electronic devices vary.
[0003] Existing page display technologies, in order to adapt to the different display interface sizes of various electronic devices, require configuring multiple different sizes for each page control on the same page to match the size of the page controls with the display interface size of the electronic device, which greatly increases the difficulty of page development. If the sizes of each page component in the generated page layout file are the default configuration, the page layout file must have layout calculation capabilities. However, for some devices with limited computing power, the task of layout calculation cannot be completed, resulting in low applicability of the page layout file. Therefore, existing page display technologies cannot simultaneously address both the difficulty of page development and the applicability of page layout files. Summary of the Invention
[0004] This application provides a method, apparatus, electronic device, and computer-readable storage medium for generating page layout files, which can solve the problem that existing page display technologies cannot simultaneously address both the difficulty of page development and the applicability of page layout files.
[0005] In a first aspect, embodiments of this application provide a method for generating a page layout file, applied to a first device, comprising:
[0006] The first device acquires the target parameters corresponding to the target device; the target parameters include the display parameters of each component within the target page;
[0007] The first device imports the target parameters into the original layout file associated with the target page to generate a target layout file corresponding to the target device; the display parameters of each component in the target page within the original layout file are in a state of pending configuration.
[0008] The first device sends the target layout file to the target device so that the target device displays the target page.
[0009] Implementing the embodiments of this application has the following beneficial effects: The first device obtains the target parameters corresponding to the target device from which the target page to be displayed is to perform page layout calculation operations on the target device, thereby determining the display parameters when the target page is displayed on the target device. The first device imports the target parameters into the original layout file associated with the target page, configures the display parameters of each component in the original layout file, and obtains a target layout file that matches the display module of the target device. Then, the first device can send the target layout file to the target device, and the target device can display the target page according to the received target layout file. Compared with existing page display technologies, this embodiment does not require developers to manually configure display parameters for different target devices and generate multiple page layout files. Instead, the first device can obtain the target parameters related to the target device, and the page layout calculation is handled by the first device, thereby reducing the configuration operations of developers and lowering the difficulty of page development. At the same time, the task of page layout calculation is not completed by the target device but by the first device. Therefore, the target device does not need to have page layout calculation capabilities; the target device can directly generate the target page based on the target layout file, thereby improving the applicability of the generated target layout file, reducing the demand for the target device's computing power, and simultaneously balancing both the difficulty of page development and the applicability of the page layout file.
[0010] In one possible implementation of the first aspect, the first device acquires the target parameters corresponding to the target device, including:
[0011] The first device initiates a device emulation program associated with the target device to run the same operating system on the first device as on the target device;
[0012] The first device calls the operating system to load the original layout file, so that the operating system can perform page layout calculations on each component in the original layout file and determine the display parameters of each component.
[0013] The first device generates the target parameters based on the display parameters of each of the components.
[0014] In one possible implementation of the first aspect, the first device acquires the target parameters corresponding to the target device, including:
[0015] In response to the compilation instructions of the target page, the first device runs a preset parameter measurement script to determine the device parameters corresponding to multiple preset device models; the multiple device models include the device model of the target device; the multiple device parameters include the target parameters corresponding to the target device.
[0016] Correspondingly, the first device imports the target parameters into the original layout file associated with the target page to generate a target layout file corresponding to the target device, including:
[0017] The first device imports each of the device parameters into the original layout file to generate multiple page layout files that match each of the device models; the multiple page layout files include the target layout file corresponding to the target device.
[0018] In one possible implementation of the first aspect, the first device is a server responding to application downloads, and the generation method further includes:
[0019] The first device receives the original layout file uploaded by the developer's second device;
[0020] Correspondingly, the first device acquires the target parameters corresponding to the target device; the target parameters include the display parameters of each component within the target page, including:
[0021] The first device runs a preset parameter measurement script to determine the target parameters corresponding to the target device.
[0022] In one possible implementation of the first aspect, the first device runs a preset parameter measurement script to determine the target parameters corresponding to the target device, including:
[0023] In response to the download request initiated by the target device, the first device runs the parameter measurement script to determine the target parameters corresponding to the target device.
[0024] In one possible implementation of the first aspect, the first device runs a preset parameter measurement script to determine the target parameters corresponding to the target device, including:
[0025] If the preset layout update time is reached, the first device runs the parameter measurement script and outputs device parameters corresponding to multiple layout files to be configured applicable to the target device; the multiple layout files to be configured include the original layout file; the multiple layout files to be configured are layout files uploaded between the previous layout update time and the current layout update time; the device parameters corresponding to the multiple layout files to be configured include target parameters.
[0026] Correspondingly, the first device sends the target layout file to the target device, including:
[0027] In response to the download request initiated by the target device, the first device sends the target layout file to the target device.
[0028] In one possible implementation of the first aspect, the first device is another device interconnected with the target device, and the first device acquires target parameters corresponding to the target device, including:
[0029] The first device responds to the measurement command initiated by the target device, runs a preset parameter measurement script, and determines the target parameters corresponding to the target device; the measurement command includes the original layout file.
[0030] Secondly, embodiments of this application provide a page layout file generation apparatus, comprising:
[0031] The target parameter acquisition unit is used to acquire the target parameters corresponding to the target device; the target parameters include the display parameters of each component within the target page;
[0032] The target layout file generation unit is used to import the target parameters into the original layout file associated with the target page to generate the target layout file corresponding to the target device; the display parameters of each component in the target page in the original layout file are in a state of pending configuration.
[0033] The target layout file sending unit is used to send the target layout file to the target device so that the target device displays the target page.
[0034] In one possible implementation of the second aspect, the target parameter acquisition unit includes:
[0035] An operating system setup unit is used to launch a device simulation program associated with the target device to run the same operating system on the first device as the target device.
[0036] The component measurement application running unit is used to call the operating system to load the original layout file, so as to perform page layout calculations on each component in the original layout file through the operating system and determine the display parameters of each component;
[0037] The display parameter encapsulation unit is used to generate the target parameters based on the display parameters of each of the components.
[0038] In one possible implementation of the second aspect, the target parameter acquisition unit includes:
[0039] A compilation instruction response unit is configured to, in response to a compilation instruction from the target page, execute a preset parameter measurement script to determine device parameters corresponding to multiple preset device models; the multiple device models include the device model of the target device; the multiple device parameters include the target parameters corresponding to the target device;
[0040] Correspondingly, the target layout file generation unit includes:
[0041] The compilation instruction execution unit is used to import each of the device parameters into the original layout file and generate multiple page layout files that match each of the device models; the multiple page layout files include the target layout file corresponding to the target device.
[0042] In one possible implementation of the second aspect, the page layout file generation device is a server responding to application downloads, and the page layout file generation device further includes:
[0043] The original layout file receiving unit is used to receive the original layout file uploaded by the developer's second device;
[0044] Correspondingly, the target parameter acquisition unit includes:
[0045] The parameter measurement script execution unit is used to run a preset parameter measurement script to determine the target parameters corresponding to the target device.
[0046] In one possible implementation of the second aspect, the parameter measurement script execution unit includes:
[0047] The download request response unit is used to respond to the download request initiated by the target device, run the parameter measurement script, and determine the target parameters corresponding to the target device.
[0048] Optionally, the parameter measurement script execution unit includes:
[0049] The layout update triggering unit is configured to, if a preset layout update time is reached, have the first device run the parameter measurement script and output device parameters corresponding to a plurality of layout files to be configured applicable to the target device; the plurality of layout files to be configured include the original layout file; the plurality of layout files to be configured are layout files uploaded between the previous layout update time and the current layout update time; the device parameters corresponding to the plurality of layout files to be configured include target parameters.
[0050] Correspondingly, the target layout file sending unit is specifically used to: in response to a download request initiated by the target device, send the target layout file to the target device.
[0051] In one possible implementation of the second aspect, the page layout file generation device is a device located on the same local area network as the target device, and the target parameter acquisition unit includes:
[0052] A measurement command response unit is used for the first device to respond to a measurement command initiated by the target device, run a preset parameter measurement script, and determine the target parameters corresponding to the target device; the measurement command includes the original layout file.
[0053] Thirdly, embodiments of this application provide a method for displaying a page, applied to a target device, including:
[0054] In response to a user-initiated display operation, if the layout file corresponding to the display operation is an original layout file, the target device generates a measurement instruction containing the original layout file and sends the measurement instruction to a first device interconnected with the target device; the display parameters of each component in the target page within the original layout file are in a state of pending configuration.
[0055] The target device receives a target layout file fed back by the first device based on the original layout file;
[0056] The target device displays the target page based on the target layout file.
[0057] Fourthly, embodiments of this application provide a page display device including:
[0058] The display operation response unit is used to respond to a display operation initiated by the user. If the layout file corresponding to the display operation is an original layout file, a measurement instruction containing the original layout file is generated and the measurement instruction is sent to a first device interconnected with the target device. The display parameters of each component in the target page within the original layout file are in a state of pending configuration.
[0059] A target layout file receiving unit is configured to receive a target layout file fed back by the first device based on the original layout file;
[0060] The target page display unit is used by the target device to display the target page based on the target layout file.
[0061] Fifthly, embodiments of this application provide an electronic device, a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, when the processor executes the computer program, it implements the page layout file generation method of any one of the first aspects or the page display method of any one of the third aspects.
[0062] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, characterized in that, when the computer program is executed by a processor, it implements the page layout file generation method described in any one of the first aspects or the page display method described in any one of the third aspects.
[0063] Fifthly, embodiments of this application provide a computer program product that, when run on an electronic device, causes the electronic device to execute the page layout file generation method described in any of the first aspects or the page display method described in any of the third aspects.
[0064] In a sixth aspect, embodiments of this application provide a chip system including a processor coupled to a memory, wherein the processor executes a computer program stored in the memory to implement a page layout file generation method as described in any of the first aspects or a page display method as described in any of the third aspects.
[0065] It is understood that the beneficial effects of the second to sixth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description
[0066] Figure 1 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application;
[0067] Figure 2 This is a software structure block diagram of an electronic device according to an embodiment of this application;
[0068] Figure 3 This is a schematic diagram illustrating the display of the same operation page by different electronic devices according to an embodiment of this application;
[0069] Figure 4 This is a schematic diagram illustrating the connection between a first device and a target device according to an embodiment of this application;
[0070] Figure 5 This is a flowchart illustrating the implementation of a page layout file generation method provided in an embodiment of this application;
[0071] Figure 6 This is a schematic diagram of a target page provided in an embodiment of this application;
[0072] Figure 7 This is a schematic diagram of the page development process provided in one embodiment of this application;
[0073] Figure 8 This is a flowchart illustrating the implementation of a page layout file generation method provided in another embodiment of this application;
[0074] Figure 9 This is a schematic diagram of a simulated operating system provided in one embodiment of this application;
[0075] Figure 10 This is a flowchart illustrating the implementation of a page layout file generation method provided in another embodiment of this application;
[0076] Figure 11 This is a schematic diagram of a first device responding to compilation instructions according to an embodiment of this application;
[0077] Figure 12 This is an interactive flowchart of a method for generating page layout files provided in another embodiment of this application;
[0078] Figure 13 This is an interactive flowchart of a page layout file generation method provided in an embodiment of this application;
[0079] Figure 14 This is a flowchart illustrating the implementation of a page display method on the target device side according to an embodiment of this application;
[0080] Figure 15 This is a structural block diagram of the page layout file generation device provided in the embodiments of this application;
[0081] Figure 16 This is a structural block diagram of the page display device provided in the embodiments of this application;
[0082] Figure 17 This is a structural block diagram of a page layout file generation device provided in an embodiment of this application. Detailed Implementation
[0083] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0084] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0085] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0086] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0087] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0088] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0089] The page layout file generation method provided in this application embodiment can be applied to electronic devices such as mobile phones, tablets, wearable devices, in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, and personal digital assistants (PDAs). This application embodiment does not impose any restrictions on the specific type of electronic device.
[0090] For example, the electronic device may be a station (STAION, ST) in a WLAN, a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA) device, a handheld device with wireless communication capabilities, a computing device or other processing device connected to a wireless modem, a computer, a laptop computer, a handheld communication device, a handheld computing device, and / or other devices for communicating over a wireless system, as well as next-generation communication systems, such as mobile terminals in 5G networks or mobile terminals in future evolved Public Land Mobile Network (PLMN) networks.
[0091] Figure 1 A schematic diagram of an electronic device 100 is shown.
[0092] Electronic device 100 may include processor 110, external memory interface 120, internal memory 121, universal serial bus (USB) interface 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0093] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0094] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.
[0095] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.
[0096] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0097] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0098] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C buses. The processor 110 can couple to the touch sensor 180K, charger, flash, camera 193, etc., through different I2C bus interfaces. For example, the processor 110 can couple to the touch sensor 180K through the I2C interface, enabling the processor 110 and the touch sensor 180K to communicate through the I2C bus interface, thereby realizing the touch function of the electronic device 100.
[0099] The I2S interface can be used for audio communication. In some embodiments, the processor 110 may include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface to enable the function of answering phone calls through a Bluetooth headset.
[0100] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via the PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering phone calls through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0101] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface to enable music playback through Bluetooth headphones.
[0102] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI) and a display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to enable the electronic device 100 to capture images. The processor 110 and the display screen 194 communicate via the DSI interface to enable the electronic device 100 to display images.
[0103] The GPIO interface can be configured via software. It can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to a camera 193, a display screen 194, a wireless communication module 160, an audio module 170, a sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0104] USB port 130 is a USB standard compliant interface, specifically a Mini USB port, Micro USB port, USB Type-C port, etc. USB port 130 can be used to connect a charger to charge electronic device 100, and can also be used for data transfer between electronic device 100 and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices, such as AR devices.
[0105] It is understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0106] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.
[0107] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.
[0108] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0109] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.
[0110] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.
[0111] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.
[0112] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0113] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).
[0114] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0115] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniature LED, a microLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1. Display screen 194 may include a touch panel and other input devices.
[0116] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0117] The ISP (Image Signal Processor) is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimization of image noise, brightness, and skin tone. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.
[0118] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.
[0119] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when electronic device 100 selects a frequency, the DSP can perform Fourier transforms on the frequency energy.
[0120] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. Thus, electronic device 100 can play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0121] An NPU (Neural Processing Unit) is a computational processor for neural networks (NNs). By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs can enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.
[0122] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.
[0123] Internal memory 121 can be used to store computer executable program code, which includes instructions. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Processor 110 executes various functional applications and data processing of electronic device 100 by running instructions stored in internal memory 121 and / or instructions stored in memory located in the processor.
[0124] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.
[0125] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.
[0126] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or make hands-free calls through the speaker 170A.
[0127] The receiver 170B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a telephone call or voice message, the receiver 170B can be brought close to the ear to listen to the voice.
[0128] Microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 170C, inputting the sound signal into microphone 170C. Electronic device 100 may have at least one microphone 170C. In some embodiments, electronic device 100 may have two microphones 170C, which, in addition to collecting sound signals, can also perform noise reduction. In other embodiments, electronic device 100 may also have three, four, or more microphones 170C, which can collect sound signals, reduce noise, identify the sound source, and perform directional recording, etc.
[0129] The 170D headphone jack is used to connect wired headphones. The 170D headphone jack can be a USB 130 interface or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, a CTIA (Cellular Telecommunications Industry Association of the USA) standard interface.
[0130] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be disposed on display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When force is applied to pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the intensity of the touch operation based on pressure sensor 180A. Electronic device 100 can also calculate the touch position based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation commands. For example, when a touch operation with an intensity less than a first pressure threshold is applied to the SMS application icon, a command to view an SMS is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to the SMS application icon, a command to create a new SMS is executed.
[0131] The gyroscope sensor 180B can be used to determine the motion attitude of the electronic device 100. In some embodiments, the gyroscope sensor 180B can determine the angular velocity of the electronic device 100 about three axes (i.e., the x, y, and z axes). The gyroscope sensor 180B can be used for image stabilization. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the shake of the electronic device 100, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to counteract the shake of the electronic device 100 by moving in the opposite direction, thus achieving image stabilization. The gyroscope sensor 180B can also be used in navigation and motion-sensing game scenarios.
[0132] The barometric pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates altitude using the air pressure value measured by the barometric pressure sensor 180C to assist in positioning and navigation.
[0133] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip cover. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover using the magnetic sensor 180D. Then, based on the detected opening and closing state of the cover or the flip cover, features such as automatic flip unlocking can be set.
[0134] The 180E accelerometer can detect the magnitude of acceleration of electronic device 100 in various directions (typically three axes). When electronic device 100 is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the posture of electronic devices and applied to applications such as screen orientation switching and pedometers.
[0135] A distance sensor 180F is used to measure distance. Electronic device 100 can measure distance via infrared or laser. In some embodiments, during a shooting scene, electronic device 100 can utilize the distance sensor 180F to measure distance for rapid focusing.
[0136] The proximity sensor 180G may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The LED may be an infrared LED. The electronic device 100 emits infrared light outward through the LED. The electronic device 100 uses the photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 may use the proximity sensor 180G to detect when a user holds the electronic device 100 close to their ear for a call, so as to automatically turn off the screen to save power. The proximity sensor 180G can also be used in holster mode and pocket mode for automatic unlocking and locking of the screen.
[0137] The ambient light sensor 180L is used to sense the brightness of ambient light. The electronic device 100 can adaptively adjust the brightness of the display screen 194 based on the sensed ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also work with the proximity sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
[0138] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can utilize the characteristics of the collected fingerprints to achieve fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering calls with fingerprints, etc.
[0139] Temperature sensor 180J is used to detect temperature. In some embodiments, electronic device 100 uses the temperature detected by temperature sensor 180J to execute a temperature handling strategy. For example, when the temperature reported by temperature sensor 180J exceeds a threshold, electronic device 100 performs thermal protection by reducing the performance of a processor located near temperature sensor 180J to reduce power consumption. In other embodiments, when the temperature is below another threshold, electronic device 100 heats battery 142 to prevent abnormal shutdown of electronic device 100 due to low temperature. In still other embodiments, when the temperature is below yet another threshold, electronic device 100 boosts the output voltage of battery 142 to prevent abnormal shutdown due to low temperature.
[0140] Touch sensor 180K, also known as a "touch device," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touchscreen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K may also be located on the surface of electronic device 100, in a different position than display screen 194.
[0141] The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire vibration signals from the vibrating bone segments of the human vocal cords. The bone conduction sensor 180M can also contact the human pulse to receive blood pressure signals. In some embodiments, the bone conduction sensor 180M can also be incorporated into headphones to form bone conduction headphones. The audio module 170 can parse the voice signals from the vibrating bone segments of the vocal cords acquired by the bone conduction sensor 180M to realize voice functionality. The application processor can parse heart rate information from the blood pressure signals acquired by the bone conduction sensor 180M to realize heart rate detection functionality.
[0142] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.
[0143] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. For example, different vibration feedback effects can correspond to touch operations performed on different applications (such as taking photos, playing audio, etc.). Motor 191 can also correspond to different vibration feedback effects for touch operations performed on different areas of the display screen 194. Different application scenarios (such as time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also be customized.
[0144] Indicator 192 can be an indicator light, used to indicate charging status, power changes, or to indicate messages, missed calls, notifications, etc.
[0145] The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to make contact with and separate from the electronic device 100. The electronic device 100 can support one or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 195 simultaneously. The multiple cards can be of the same or different types. The SIM card interface 195 is also compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to realize functions such as calls and data communication. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
[0146] The software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This embodiment of the invention uses the layered architecture Android system as an example to exemplify the software structure of electronic device 100.
[0147] Figure 2 This is a software structure block diagram of an electronic device according to an embodiment of this application.
[0148] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.
[0149] The application layer can include a series of application packages.
[0150] like Figure 2 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and SMS.
[0151] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0152] like Figure 2 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
[0153] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.
[0154] Content providers store and retrieve data, making that data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.
[0155] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.
[0156] A phone manager is used to provide communication functions for electronic devices. For example, it manages call status (including connection and disconnection).
[0157] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.
[0158] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of completed downloads or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.
[0159] The Android Runtime consists of core libraries and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.
[0160] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.
[0161] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0162] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.
[0163] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.
[0164] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.
[0165] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0166] A 2D graphics engine is a graphics engine for 2D drawing.
[0167] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.
[0168] The following example, using a scene of capturing a photograph, illustrates the workflow of the software and hardware of the electronic device 100.
[0169] When touch sensor 180K receives a touch operation, a corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into a raw input event (including touch coordinates, timestamp of the touch operation, etc.). The raw input event is stored in the kernel layer. The application framework layer retrieves the raw input event from the kernel layer and identifies the control corresponding to the input event. Taking a touch click as an example, where the corresponding control is the camera application icon, the camera application calls the application framework layer's interface to launch the camera application, and then calls the kernel layer to launch the camera driver, capturing still images or videos through camera 193.
[0170] Example 1:
[0171] Electronic devices can install various types of applications, each with its own corresponding user interface (UI) to provide services or respond to user actions. Therefore, when developers generate an application's installation package, this package must include page layout files for each user interface. These layout files are used to build any user interface within the application. Each user interface contains multiple operable components. A component can consist of multiple cascading controls (e.g., vertical or horizontal cascading), representing the cascading arrangement of different controls. Each control has corresponding spatial information when displayed. Therefore, during the development of user interfaces, it is necessary to determine the display position and size information of each component on the electronic device's display module. This is known as the User Interface (UI) layout file, or simply the page layout file.
[0172] With the continuous development of electronic devices, the models and quantities of electronic devices are constantly increasing, and the shape, size, and resolution of the display modules of different models of electronic devices vary. During the development of the user interface, the aforementioned page layout file needs to be adjusted for display modules of different shapes, sizes, and resolutions to ensure that the user interface displayed based on the page layout file matches the display module. For example, Figure 3 This illustration shows a schematic diagram of different electronic devices displaying the same operation page according to an embodiment of this application. See also... Figure 3 As shown in (a), the electronic device is a smartphone, and the display module displays an image preview page from an image browsing application; see also Figure 3 As shown in (b), the electronic device is a smartwatch, which also displays an image preview page. The number of previewable images, as well as the position and size of menu components, vary. However, the number of electronic device models is vast. If developers were required to manually configure corresponding page layout files for different models of the same operation page, it would significantly increase the development difficulty of the operation page. Furthermore, an application often contains multiple operation pages, increasing the difficulty and workload of application development, thereby reducing development efficiency and extending the development cycle.
[0173] To address the high development difficulty of the aforementioned operation pages, during development, only the cascading relationships and / or relative positions of components within the page need to be defined. The display position and size information of each component do not need to be specified. The task of page layout can be delegated to the electronic device displaying the operation page. That is, when the electronic device needs to display the operation interface, it can calculate the specific display position and size of each component within the operation page based on the size and resolution of the local display module, generating the final page layout file for the operation page. The operation page is then displayed based on this page layout file with added display information. Since the original page layout file released by developers often only contains the cascading relationships and / or relative positions of components within the page, the electronic device can calculate the specific positions and sizes of components through multiple loops and nested calculations based on these relationships. This calculation process for the UI framework is called UI layout calculation, or UI dynamic layout. To perform the aforementioned UI layout calculations, electronic devices are required to have sufficient computing power. For example, computing power, executable content, and hardware storage space need to exceed a certain preset value. However, for some lightweight electronic devices, in order to achieve lightweight design and greater portability, the size and weight of the device are smaller. Correspondingly, the performance of this type of electronic device is often lower (e.g., weaker computing power, less executable memory, and less hardware storage space). Such electronic devices cannot perform UI layout calculations, or the UI layout calculations take too long, reducing the display frame rate of the operation page and prolonging the rendering time, thereby reducing the user experience. If the aforementioned UI layout calculation tasks are required, more memory and hard drive expansion are needed, which greatly increases the difficulty of component placement for lightweight devices.
[0174] Therefore, it is evident that existing page layout file generation technologies significantly increase the difficulty of page development if corresponding page layout files are configured for different models of electronic devices, which is not user-friendly for developers. If the display position and size of the components in the page layout file are configured by default, the electronic device needs to have UI layout calculation capabilities, which is not suitable for some lightweight electronic devices, thus reducing the applicability of the page layout file. The existing page layout file generation methods cannot simultaneously take into account both the difficulty of page development and the applicability of the file.
[0175] Therefore, in order to overcome the shortcomings of existing page layout file generation technologies, this application provides a method for generating page layout files, which is detailed below: For example, Figure 4This illustration shows a connection diagram between a first device and a target device according to an embodiment of this application. See also: Figure 4 As shown, the execution subject of this page layout file generation method is an electronic device, specifically a first device with a certain computing capability. This first device can be a smartphone, tablet, computer, or server, or other electronic device with a certain computing capability. This first device is used to generate the aforementioned page layout file. A communication connection can be established between the first device and a target device, and through this communication connection, the generated page layout file can be sent to the target device. The target device can be a smartphone, tablet, computer, smartwatch, or other electronic device. The target device can be an electronic device with a certain computing capability or an electronic device with a weaker computing capability (such as a smartwatch or other wearable device). The target device can generate a target page based on the aforementioned page layout file. Figure 5 A flowchart illustrating the implementation of a page layout file generation method according to an embodiment of this application is shown. This page layout generation method is applied to a first electronic device, and is described in detail below:
[0176] In S501, the first device obtains the target parameters corresponding to the target device; the target parameters include the display parameters of each component in the target page.
[0177] In this embodiment, the first device can be a development device for developers, i.e., a device used to develop the target page, or a server providing download services to respond to the target device's download request for the page layout file of the target page. The first device can obtain module parameters related to the display module from the target device in various ways, so that the first device can perform page layout calculations based on the module parameters of the display module. Specifically, obtaining the module parameters of the display module can include the following methods:
[0178] Method 1: The first device can query the target device's model number and obtain the relevant device parameters, i.e., the target parameters mentioned above. Since these target parameters are specifically related to the target device's display module, such as aspect ratio, size, and resolution, they are hardware parameters that generally remain unchanged after the target device leaves the factory. Therefore, the first device can obtain the target device's model number and query the corresponding hardware parameters to extract the display module-related parameters, i.e., the module parameters mentioned above. For example, if the first device needs to generate an operation page suitable for the Mate30 device, it can obtain the Mate30's hardware parameters, which are: "RAM: 6GB, Hard Disk Capacity: 128GB, Screen Size: 6.62 inches, Screen Resolution: 2340*1080 pixels…". The first device can then extract the display module-related parameters from these hardware parameters, i.e., "Screen Size: 6.62 inches, Screen Resolution: 2340*1080 pixels", thus obtaining the module parameters.
[0179] Method 2: The target device can send a page retrieval request to the first device. This request may include the target device's device identifier, which could be the device model, unique identifier, etc. The first device can parse the page retrieval request, extract the device identifier, determine the target device's device model based on the device identifier, and obtain the parameters related to the target device's display module, i.e., the module parameters, based on the device model.
[0180] In one possible implementation, after obtaining the device model of the target device, the first device can determine the computing parameters of the target device, such as the target device's memory capacity, hard disk capacity, processor processing speed, and other computing capability-related parameters. If the first device detects that the computing parameters of the target device meet the preset layout execution conditions, it indicates that the target device has page layout capabilities. Instead of configuring a page layout file containing the size and position of each page component, the first device can send the original layout file with the default page component sizes and positions to the target device. Conversely, if the computing parameters do not meet the layout execution conditions, the first device obtains the module parameters of the target device and performs subsequent operations.
[0181] Method 3: The target device can send a page retrieval request to the first device, which may carry the target device's module parameters. In this case, the first device can directly extract the module parameters from the page retrieval request without needing to determine the target device's module parameters through the device model.
[0182] Method 4: The first device can establish communication connections with multiple test machines, including test machines of the same model as the target device. In this case, the first device can establish a communication connection with a test machine associated with the target device's model and send a parameter acquisition request to that test machine. After receiving the parameter acquisition request, the test machine can feed back parameters related to the display module to the first device, i.e., the aforementioned module parameters. The first device obtains the target device's module parameters through the parameters fed back by the test machine.
[0183] Method 5: The first device can run a device simulator related to the target device, that is, build a runtime environment associated with the target device on the first device, and obtain parameters related to the display module of the target device, i.e., module parameters, through the built runtime environment.
[0184] It should be noted that all other existing methods for obtaining parameters related to the display module of the target device are within the scope of protection of this application.
[0185] In one possible implementation, if the first device cannot obtain the module parameters of the target device, it can output parameter acquisition error information so that the developers of the target page can handle the situation where the module parameters cannot be obtained. For example, the module parameters can be entered manually, or the device model of another device associated with the target device can be entered. The other device associated with the target device can be a device of the same type or a device of the same series. For example, if the device model of the target device is Mate40, the device of the same series as the target device can be Mate40Pro or Mate30.
[0186] In this embodiment, after obtaining the module parameters associated with the target device, the first device can perform page layout calculations on the target page based on the module parameters, determine the display parameters of each component in the target page (the display parameters may include display position, display size, and operation mode, etc.), and obtain the target parameters associated with the target device based on the display parameters of all components in the target page. The page layout calculation process is transferred from the target device to the first device, which reduces the computing power requirements of the target device.
[0187] In this embodiment, the target page may contain multiple components, for example, Figure 6 A schematic diagram of a target page provided according to an embodiment of this application is shown. See also Figure 6As shown, the target page is specifically a short video editing page, which contains multiple components, including a return control 601, a video preview playback interface 602, a next editing control 603, and a video progress dragging component 604. Each component has a fixed display position and size on the target page. Some components also contain downstream controls, such as multiple options that pop up when the menu bar is opened. Therefore, the display parameters also include the visual state, cascading method, and operable state of each component when the target page is displayed. Each component is associated with corresponding display parameters. For example, the obtained display parameters can be:
[0188] “child”:[{
[0189] “x”:“55”,
[0190] “y”:“25”,
[0191] "width": "400",
[0192] “height”:“50”,
[0193] “id”:“testid”,
[0194] "visiable": "true",
[0195] "touchable": "true",
[0196] "draggable":"false";
[0197] Wherein, "child" indicates that the component is a child component of another component on the target page, meaning that the component has an upstream parent component; "testid" is the component name corresponding to the component on the target page; "x" and "y" are used to indicate the corresponding display position on the target device, i.e., the positioning point; "width" and "height" are used to indicate the display size of the component, namely the width and height; "id" is the device identifier of the target device associated with the component, such as the device model; and "visible" indicates whether the component is visible when the target page is displayed. The visible state is defined by the following parameters: "visible" (True) indicates that the component is visible, and "visible" (False) indicates that the component is invisible; "touchable" indicates that the component is operable, and "draggable" indicates that the component is draggable, and "draggable" indicates that the component is not draggable.
[0198] In one possible implementation, after determining the module parameters of the display module within the target device, the first device can import the module parameters into a layout calculation script related to the target page, thereby determining the display parameters of each component within the target page. For example, the display position of the component can be determined based on the aspect ratio of the display module, and the display size of the component can be determined based on the resolution of the display module. All components and their associated display parameters are then encapsulated to obtain the target parameters of the target page associated with the target device.
[0199] In this embodiment, the triggering method for the first device to acquire the target parameters of the target device can be automatic or passive. Specifically, the implementation method can be:
[0200] The scenario where automatic triggering of target parameter acquisition can be as follows: The first device can specifically be the development device for the application's operation page. In this case, the first device can receive a target device list preset by the developer, which contains multiple devices on which the application can be installed. The first device can store multiple original layout files for developed operation pages and configure a conversion flag for original layout files for which no page layout file has been generated, for example, configuring a conversion flag with a bit value of "0" for original layout files for which no page layout file has been generated. The first device can identify the original layout file for which page layout calculation needs to be performed by recognizing this conversion flag. If the first device detects that there are currently stored original layout files for which no page layout file has been generated, it can automatically execute the operation S501, for example, performing page layout calculation for the newly generated original layout file to obtain a page layout file with configurable component sizes. During the conversion of the original layout file into a page layout file, the device parameters (i.e., the aforementioned target parameters) of each device in the target device list can be obtained, and page layout files associated with each target device in the target device list can be generated respectively.
[0201] In one possible implementation, the first device may store a layout conversion progress table corresponding to the original layout file. This layout conversion progress table contains all target devices included in the target device list, and a conversion completion identifier for the page layout file associated with that target device. Table 1 shows a layout conversion progress table provided in one embodiment of this application. Referring to Table 1, the layout conversion progress table contains multiple target devices that require page layout calculations. The specific target devices in the layout conversion progress table can be determined based on a preset target device list. It should be noted that if the target device list is updated, such as adding new target devices or deleting some target devices, the layout conversion progress table can be updated synchronously, thereby maintaining consistency in the number and models of target devices included in the layout conversion progress table and the target device list. Within the layout progress list, each target device can be associated with a conversion completion identifier to determine whether the first device has generated a page layout file associated with the target device. If not generated, when the preset layout conversion conditions are met (for example, the first device can identify the unconverted target device in the layout conversion schedule according to the preset cycle), the operations of S501 to S502 will be executed automatically to generate the page layout file associated with the unconverted target device.
[0202]
[0203] Table 1
[0204] The passive triggering method for obtaining target parameters can be as follows: The first device can respond to a user-initiated conversion operation and generate a conversion instruction. This conversion instruction can carry the device identifier of the target device and the original layout file of the target page. The first device then executes the page layout file generation process based on the device identifier of the conversion instruction and the original layout file, i.e., performs operations S501 to S503. Alternatively, the first device can receive the original layout file uploaded by the page developer and, upon receiving the original layout file, trigger the page layout file generation process. In this case, the first device can store a list of target devices, and can configure multiple page layout files, each matching a different target device, for newly uploaded original layout files.
[0205] In S502, the first device imports the target parameters into the original layout file associated with the target page to generate a target layout file corresponding to the target device; the display parameters of each component in the target page within the original layout file are in a state of pending configuration.
[0206] In this embodiment, the first device may store the original layout file of the target page. This original layout file does not configure display parameters for each component; that is, the display parameters of each component are in a state of pending configuration. The original layout file may define the relative positional and cascading relationships between components, as well as the component's function, operation logic, and navigation path, but it does not specify the specific display position or size. Compared to the final generated target layout file, the target layout file specifies the specific display position of each component within the target page, as well as the final display size, such as "x":"55", "y":"25", "width":"400", "height":"50", all containing specific display values. In this case, the display parameters are in a configured state. The original layout file, however, only defines the relative position, such as at the top of the page or with an aspect ratio of 8:1, without specifying specific display values; that is, the display parameters are in a state of pending configuration. The original layout file cannot be used to directly generate the target page. The display parameters of the target page need to be configured before the target page can be generated. However, the target layout file can be used directly to generate the target page because the display parameters have already been configured.
[0207] In this embodiment, after the first device obtains the target parameters matched by the target device, it can import the target parameters into the original layout file corresponding to the target page, thereby generating a target layout file that can be directly displayed. The original layout file may contain a page identifier of the target page. Based on this page identifier, the first device can identify the original layout file associated with the target page from multiple original layout files and import the target parameters into the original layout file associated with the target page.
[0208] In one possible implementation, the target parameters include the component names of each component and the display parameters associated with those component names. The first device can locate the definition segment associated with the component name in the original layout file and assign the display parameters associated with that component name to the corresponding statement in the definition segment, thereby completing the configuration operation of the page components. The configured component is then identified as configured. Each component in the target page is configured in the same way, and the display parameters of all components are imported into the completed original layout file. In other words, the display parameters of each component are changed to match the configured state of the original layout file, which serves as the target layout file. The display parameters of each component in this target layout file match the target device, thus enabling the target page to be displayed on the target device.
[0209] In S503, the first device sends the target layout file to the target device so that the target device displays the target page.
[0210] In this embodiment, the first device can establish a communication connection with the target device and send the target layout file to the target device through the established communication connection. After receiving the target layout file, the target device can run the target layout file to display the target page on the target device.
[0211] In one possible implementation, the target page can be an operation page within an application. In this case, the first device can encapsulate the page layout files of each operation page within the application to generate an installation package corresponding to the application. The first device can send the installation package containing the target layout files of the target page to the target device. The target device runs the installation package to install the application locally. When the first device launches the application, it can call the target layout files associated with each operation page (i.e., the target page mentioned above) to display the corresponding operation page.
[0212] In this embodiment, the target device is specifically the device that displays the target page. Since the page layout calculation process is completed by the first device, the target device only needs to receive the target layout file that has completed the page layout calculation sent by the target device, and can directly display the target page without performing page layout calculation. This greatly reduces the requirements for the computing power of the target device and improves the applicability of the page layout file.
[0213] In this embodiment, the first device is specifically a device with page layout calculation capability; while the target device can be a device with page layout calculation capability or a device without page layout calculation capability. The calculation capability of the target device is not limited here, but can be any electronic device that can display operation pages.
[0214] For example, Figure 7 A schematic diagram of a page development process provided in an embodiment of this application is shown. See also Figure 7 As shown, the operation page, from development to final display, can involve the following three types of devices: the development terminal used by the page developer, the server providing downloads to users, and the user terminal that can display the operation page. The page development process can specifically include the following steps:
[0215] 1. The development terminal is used for developing the target page. The target user can be a developer. During development, the developer can generate a raw layout file for the target page, where the display parameters of each component are in a state of configuration. The development terminal can store this raw layout file and import it into the device parameters associated with the user terminal, thereby generating a page layout file that matches the user terminal (equivalent to the target layout file mentioned above). Alternatively, the development terminal can send the raw layout file to a server.
[0216] 2.1 If the development terminal generates a page layout file for the user terminal, the page layout file can be sent directly to the user terminal. After receiving the page layout file, the user terminal can generate the operation page locally without performing page layout calculations. Furthermore, developers do not need to configure the display parameters of the components. The development terminal can obtain the module parameters of the display modules of the user terminal to calculate the display parameters of each component in the page layout file, thereby generating the device parameters associated with the user terminal (i.e., the target parameters mentioned above). This reduces the configuration operations for developers and lowers the development difficulty.
[0217] 2.2 If the development terminal does not generate a page layout file associated with the user terminal, the original layout file can be sent to the server. The server can connect to multiple different user terminals and receive download tasks initiated by multiple different user terminals. The server can generate page layout files associated with each user terminal (i.e., the target layout files mentioned above) based on the original layout file uploaded by the development terminal.
[0218] 3. The server responds to the user terminal's download request and sends the corresponding page layout file to the user terminal, so that the user terminal can generate the corresponding operation page (i.e., the target page mentioned above) based on the page layout file. Similarly, by generating the page layout file through the server, developers do not need to manually configure the display parameters of each component within the page, reducing the configuration work for developers and lowering the development difficulty.
[0219] Therefore, the first device mentioned above can be a development terminal in the page development process, or a server for responding to page downloads.
[0220] As can be seen from the above, the page layout file generation method provided in this application embodiment can obtain the target parameters corresponding to the target device for displaying the target page through the first device, that is, perform the page layout calculation operation of the target device to determine the display parameters when the target page is displayed on the target device. The first device imports the target parameters into the original layout file associated with the target page, configures the display parameters of each component in the original layout file, and obtains a target layout file that matches the display module of the target device. Then, the first device can send the target layout file to the target device, and the target device can display the target page according to the received target layout file. Compared with existing page display technologies, this embodiment eliminates the need for developers to manually configure display parameters and generate multiple page layout files for different target devices. Instead, the target parameters related to the target device can be obtained through the first device, and the page layout calculation is handled by the first device. This reduces the configuration operations for developers and lowers the difficulty of page development. At the same time, the task of page layout calculation is not performed by the target device but by the first device. Therefore, the target device does not need to have the ability to perform page layout calculation. The target device can directly generate the target page based on the target layout file, thereby improving the applicability of the generated target layout file and reducing the demand on the computing power of the target device. This approach balances both the difficulty of page development and the applicability of the page layout file.
[0221] Example 2:
[0222] Figure 8A flowchart illustrating the implementation of a page layout file generation method according to another embodiment of this application is shown. Compared with the previous embodiment, in this embodiment, the first device can locally build a simulated operating system corresponding to the target device to obtain the target parameters corresponding to the target device. In this case, the above-mentioned page layout file generation method specifically includes:
[0223] In S801, the first device starts a device emulation program associated with the target device to run the same operating system on the first device as on the target device.
[0224] In this embodiment, the first device can be a development device for developers or a server that responds to the target device's download operation for the target page, such as a server of a cloud application store.
[0225] In this embodiment, the first device can run the same operating system as the target device through a device emulation program. For example, Figure 9 A schematic diagram of a simulated operating system provided in one embodiment of this application is shown. See also Figure 9 As shown, the first device is a computer, and the target device can be a smartwatch. The computer can use a device simulation program to build an operating system corresponding to a smartphone on the computer's original operating system, and the operating interface corresponding to the smartwatch, that is, to run a virtual smartphone on the computer.
[0226] In one possible implementation, the first device can store multiple device emulation programs, each associated with a corresponding device model. The first device can obtain the device model of the target device, select the device emulation program associated with the target device's device model from among the multiple emulation programs, and run the device emulation program associated with the target device's device model, thereby running the same operating system as the target device on the first device.
[0227] In S802, the first device calls the operating system to load the original layout file, so as to perform page layout calculations on each component in the original layout file through the operating system and determine the display parameters of each component.
[0228] In this embodiment, after the first device runs the device simulation program, it runs two operating systems: the local system that the first device was originally running, and an embedded system that relies on the local system to run the device simulation program, which is the same operating system as the target device.
[0229] In this embodiment, the first device can load the original layout file by controlling the same operating system as the target device, and then expand the component tree contained in the original layout file. Specifically, the component tree is composed of various components within the target page, defining the cascading relationships and relative positions between the components. The component tree can be displayed as a log, or in various other file formats, such as JavaScript object notation (JSON) or Extensible Markup Language (XML) files.
[0230] In this embodiment, when the first device expands the component tree contained in the original layout file, it performs page layout calculations to determine the specific display position and display size of each component within the component tree within the operating system, thereby determining the display parameters corresponding to each component when displayed on the target device. Optionally, when the original layout file is run on the aforementioned operating system, the target page can be displayed on the same operating system running on the first device as the target device. The first device can obtain the display parameters of each component through the displayed target page.
[0231] In this embodiment, the obtained display parameters are associated with the component identifier of the corresponding component. Therefore, when importing into the original layout file later, the definition segment associated with the component can be determined based on the component identifier, and the display parameters can be imported into the definition segment associated with that component, thus configuring the page parameters within the original layout file. For example, if a component is named "testid", and its display parameters obtained through the above method are: "x": "55", "y": "25", "width": "400", "height": "50", then during the import operation, the first device can locate the definition segment corresponding to "testid" in the original layout file and add the aforementioned display parameters to the definition segment corresponding to "testid", thus configuring the display parameters.
[0232] Since the same operating system as the target device runs on the first device, and the computing power of the operating system is not limited by the target device, the operating system running on the first device can perform page layout calculations through the computing power of the first device, thereby determining the display parameters of each component.
[0233] In S803, the first device generates the target parameters based on the display parameters of each of the components.
[0234] In this embodiment, after determining the display parameters of each component within the target page, the first device can encapsulate the display parameters of all components to obtain the aforementioned target parameters.
[0235] In S804, the first device imports the target parameters into the original layout file associated with the target page to generate the target layout file corresponding to the target device.
[0236] In this embodiment, when the first device imports the target parameters into the original layout file, it can mark the system identifier of the associated operating system. In this case, the first device can obtain the target parameters associated with the system identifier and import the target parameters into the original layout file to generate a target layout file corresponding to the target device.
[0237] In this embodiment, since the implementation of S805 is exactly the same as that of S503 in Embodiment 1, the specific description can be found in the relevant description of S503, and will not be repeated here.
[0238] In S805, the first device sends the target layout file to the target device so that the target device displays the target page.
[0239] In this embodiment, since the implementation of S805 is exactly the same as that of S503 in Embodiment 1, the specific description can be found in the relevant description of S503, and will not be repeated here.
[0240] It should be noted that the operation of obtaining target parameters in this embodiment can be applied to the development stage of the original layout file. That is, before generating and publishing the original layout file, a device simulation program can be run to obtain the target parameters, which are then imported into the original layout file to be published to generate the target layout file. This target layout file is then published, i.e., uploaded to a server providing download services. This embodiment can also be applied to a server providing download services. The server receives the original layout files uploaded by various development terminals and runs the aforementioned device simulation program on the server to obtain the target parameters and generate a target layout file corresponding to the target device. When a download request is received from the target device, the corresponding target layout file is sent to the target device.
[0241] In this embodiment of the application, by running a device simulation program on the first device to build an operating system identical to that of the target device, the operating system is not limited by the original computing power of the target device and can perform page layout calculations to obtain target parameters, thereby achieving the purpose of automatically generating page layout files associated with the target device, reducing configuration operations and page development difficulty.
[0242] Example 3:
[0243] Figure 10This document illustrates a flowchart of a page layout file generation method according to another embodiment of this application. Compared to Embodiment 1, in this embodiment, the acquisition of target parameters for the target device is performed by the first device in response to the compilation instructions of the original layout file; that is, the first device is specifically the terminal device used by the developer of the target page. In this case, the page layout file generation method specifically includes:
[0244] In S1001, the first device responds to the compilation instructions of the target page by running a preset parameter measurement script to determine the device parameters corresponding to a plurality of preset device models; the plurality of device models includes the device model of the target device; the plurality of device parameters includes the target parameters corresponding to the target device.
[0245] In this embodiment, the developer can develop the original layout file of the target page on the first device. When the developer is developing the original layout file, the display parameters of each component in the target page can be the default configuration, i.e., in a state of pending configuration. This original layout file can be applied to all electronic devices, as long as the electronic device can perform page layout calculations and configure the display parameters of each component, the target page can be generated. After the developer completes the development of the original layout file, a compilation operation can be performed. The first device responds to this compilation operation by generating corresponding compilation instructions and executing the compilation process. At this time, the first device has not received the target device specified by the developer, and the display parameters of each component in the original layout file are still in a state of pending configuration.
[0246] In this embodiment, the first device stores a preset target device list, which contains multiple different electronic device models. The target device list can specifically limit which electronic devices the target device can be displayed on, i.e., the electronic devices on which the target page can be displayed. The multiple device models include the device model of the target device, i.e., the target page can be displayed on the target device.
[0247] In this embodiment, the first device can obtain the device parameters corresponding to each different device model according to the target device list and through a preset parameter measurement script. The device parameters include the display parameters of each component when the target page is displayed on the electronic device of the corresponding device model.
[0248] In one possible implementation, obtaining device parameters corresponding to any device model through a parameter measurement script includes: the first device imports module parameters related to the display module of the electronic device corresponding to the aforementioned device model into the parameter measurement script. The parameter measurement script can perform page layout calculations on the target page based on the aforementioned module parameters, thereby determining the corresponding display parameters when each component is displayed on the display module of the electronic device corresponding to that device model. Of course, the method by which the first device obtains device parameters can be found in the implementation of S501 in Embodiment 1, and will not be repeated here.
[0249] In S1002, the first device imports each of the device parameters into the original layout file to generate multiple page layout files that match each of the device models; the multiple page layout files include the target layout file corresponding to the target device.
[0250] In this embodiment, when the first device responds to the compilation command, it not only determines the target parameters associated with the first device, but also obtains device parameters for multiple preset device models. That is, the compilation command is used to output page layout files corresponding to all device models that the original layout file can display, eliminating the need for developers to perform multiple page layout file generation operations. For example, Figure 11 A schematic diagram illustrating a first device responding to compilation instructions according to an embodiment of this application is shown. See also Figure 11 As shown, developers can generate an original layout file using the first device. After clicking the "Compile" button, the first device can generate compilation instructions. In response to the compilation instructions, the first device obtains device parameters for various preset device models and imports each device parameter into the original layout file to generate multiple page layout files. Each page layout file corresponds to an electronic device of a certain device model. The multiple page layout files contain the target layout file of the target device.
[0251] In S1003, the first device sends the target layout file to the target device so that the target device displays the target page.
[0252] In this embodiment, since the implementation of S1003 is exactly the same as that of S503 in Embodiment 1, the specific description can be found in the relevant description of S503, and will not be repeated here.
[0253] In this embodiment, during the compilation process, the first device simultaneously generates multiple preset page layout files for different device models, including target layout files suitable for the target device. Developers do not need to configure the display parameters of components within the target page for different device models, reducing the development difficulty of the target page. On the other hand, developers only need to perform a compilation operation once to generate multiple different page layout files simultaneously, thereby greatly improving the generation efficiency of page layout files. Developers only need to add the device models for which page layout files need to be generated as preset device models, such as adding them to the preset target device list, and the first device will generate the corresponding page layout files.
[0254] Example 4:
[0255] Figure 12 This document illustrates an interactive flowchart of a page layout file generation method according to another embodiment of this application. Compared to Embodiment 1, in this embodiment, the acquisition of target parameters of the target device is performed after the developer's second device uploads the original layout file of the target page to the first device. Specifically, the first device is a server responding to the download operation. The acquisition of the target device by the first device includes two methods: online acquisition and background acquisition. For online acquisition, the steps are S1201→S1202→S1203→S1204; while for background acquisition, the steps are S1201→S1205→S1206→S1207. In this case, the page layout file generation method specifically includes:
[0256] In S1201, the first device receives the original layout file uploaded by the second device of the development user.
[0257] In this embodiment, the first device is a server providing download services, and therefore can receive layout files uploaded by various development users through their development devices. The uploaded layout files include the original layout file of the target page. The second device specifically refers to the electronic device used by the development user. In the uploaded original layout file and other layout files corresponding to the page, the display parameters of each component are in a state of pending configuration; that is, the specific display position and display size of the components are not yet defined.
[0258] In S1202, the first device runs a preset parameter measurement script to determine the target parameters corresponding to the target device, including: the first device responds to the download request initiated by the target device, runs the parameter measurement script, and determines the target parameters corresponding to the target device.
[0259] In this embodiment, after receiving the original layout file uploaded by the developer user through the second device, the first device can store the original layout file in the memory and does not immediately configure the display parameters of the components in each original layout file. Instead, when a download request for the original layout file is received, the display parameter configuration process is executed. That is, S1202 to S1204 is a response method for obtaining target parameters online based on the download request.
[0260] In this embodiment, when the first device receives a download request initiated by the target device, it can identify the page identifier of the target page to be downloaded from the download request, retrieve the original layout file that matches the page identifier from the memory, determine the components contained in the original layout file, and import them into the parameter measurement script mentioned above according to the module parameters of the display module of the target device to calculate the display parameters of each component in the original layout file and generate target parameters.
[0261] In one possible implementation, upon receiving a download request from a target device, it can be determined whether a target layout file corresponding to the device model of the target device has been generated; if so, operation S1204 is executed; otherwise, if a target layout file corresponding to the target device has not been generated, the parameter measurement script is run to determine the target parameters corresponding to the target device. The method for determining the target parameters can be found in the relevant description of S501 in Embodiment 1, and will not be repeated here.
[0262] In S1203, the first device imports the target parameters into the original layout file associated with the target page to generate the target layout file corresponding to the target device.
[0263] In this embodiment, since the implementation of S1203 is exactly the same as that of S502 in Embodiment 1, the specific description can be found in the relevant description of S502, and will not be repeated here.
[0264] In S1204, the first device sends the target layout file to the target device so that the target device displays the target page.
[0265] In this embodiment, the first device responds to the download request initiated by the first device by sending the generated target layout file to the target device.
[0266] In this embodiment, since the implementation of S1204 is exactly the same as that of S503 in Embodiment 1, the specific description can be found in the relevant description of S503, and will not be repeated here.
[0267] In this embodiment of the application, when the first device receives a download request initiated by the target device, it obtains the target parameters of the target device, generates a target layout file corresponding to the target device, and sends the target layout file corresponding to the target device to the target device in response to the download request. Developers only need to upload the original layout file with the default configuration. The first device can generate the corresponding target layout file according to the target device to be downloaded. There is no need to perform page layout calculation on the target file, nor is it necessary for developers to configure the display parameters of the components during the development process.
[0268] In S1205, the first device runs a preset parameter measurement script to determine the target parameters corresponding to the target device, including: if a preset layout update time is reached, the first device runs the parameter measurement script to output device parameters corresponding to a plurality of layout files to be configured applicable to the target device; the plurality of layout files to be configured includes the original layout file; the plurality of layout files to be configured are layout files uploaded from the previous layout update time to the current layout update time; the device parameters corresponding to the plurality of layout files to be configured include the target parameters.
[0269] In this embodiment, in addition to online conversion, the first device can also perform background conversion on the original layout file. In this case, the first device can be configured with multiple preset layout update times, and when the layout update time is reached, the first device can configure the display parameters of the components contained in the layout file to be configured.
[0270] In one possible implementation, the aforementioned layout update time can be determined based on a preset update cycle, that is, the time interval between adjacent layout update times is the duration of the aforementioned update cycle. For example, if the update cycle is 1 day, then the time interval between the previous layout update time and the adjacent layout update time is 1 day.
[0271] In this embodiment, the first device receives layout files to be configured uploaded by various developers. The display parameters of each component within these layout files are in a state of pending configuration. At a preset layout update time, the first device performs parameter configuration operations on all received layout files to be configured. Since the first device performs parameter configuration operations on these layout files periodically, the layout files in a state of pending configuration are specifically those received between the previous layout update time and the current layout update time. For example, if the previous layout update time was 10:00 AM on January 12th, and the update cycle is one day, the first device will reach the next layout update time at 10:00 AM on January 13th. At this time, the first device will use the layout files uploaded between 10:00 AM on January 12th and 10:00 AM on January 13th as the layout files to be configured (since no update configuration operation was performed during this time period). The device will then perform page layout calculations applicable to the target device on each layout file to be configured to obtain device parameters associated with each layout file to be configured, applicable to the target device.
[0272] In one possible implementation, if the first device is configured with a list of target devices, when the first device determines the device parameters corresponding to each layout file to be configured applicable to the target devices, it also determines the device parameters corresponding to each target device in the target device list for the same layout file to be configured. For example, if the target device list contains N target devices, and the first device receives M layout files to be configured between two adjacent layout update times, then the first device needs to determine N*M device parameters, with each target device corresponding to the device parameters of the M layout files to be configured; and each layout file to be configured corresponds to the device parameters applicable to the N target devices respectively.
[0273] In S1206, the first device imports the target parameters into the original layout file associated with the target page to generate the target layout file corresponding to the target device.
[0274] In this embodiment, the first device can import the generated device parameters into the corresponding layout files to be configured, thereby obtaining the page layout files corresponding to each layout file to be configured. Since the generated device parameters contain the target parameters of the target page, the target parameters can be imported into the original layout file corresponding to the target page to generate the target layout file corresponding to the target device.
[0275] In this embodiment, the first device can store the generated target device in a database and associate each target layout file with a corresponding device identifier, which can be a device model applicable to the target device. At this time, the first device does not send the generated target layout file to the target device, but only sends the target device file to the target device when it receives a download request from the target device.
[0276] In S1207, the first device responds to the download request initiated by the target device by sending the target layout file to the target device.
[0277] In this embodiment, when the target device needs to download a target page, it can send a download request for the target page to the first device to obtain the target layout file associated with the target page. The first device can respond to the target device's download request and send the target layout file corresponding to the target page to the target device.
[0278] In one possible implementation, if the target page is an operation page within any application, the target device can send a download request for the application to the first device. The first device can identify the download request as a download request for the target page and send the data packet of the application containing the target layout file to the target device.
[0279] In this embodiment, after receiving the original layout file uploaded by the second device, the first device can store the original layout file and configure the display parameters of each component within the original layout file when a preset layout update time is reached. Then, when the first device receives a download request from the target device, it can directly send the already generated page layout file to the target device, improving the response efficiency of the download request. On the other hand, developers only need to upload the default configured original layout file. The first device can generate the corresponding target layout file according to the target device requiring download, without needing to perform page layout calculations on the target file or requiring developers to configure the display parameters of the components during development.
[0280] Example 5:
[0281] Figure 13This document illustrates an interactive flowchart of a page layout file generation method according to an embodiment of this application. Compared to Embodiment 1, in this embodiment, the target parameters of the target device are obtained by performing page layout calculations on a first device interconnected with the target device. The target device and the first device can be interconnected via a local area network or the Internet, and the connection method can include wired and wireless connections. The connection method between the first device and the target device is not limited here; it can be any connection method capable of data interaction. In this case, the page layout file generation method specifically includes:
[0282] In S1301, the target device responds to the display operation initiated by the user and determines whether the layout file corresponding to the display operation is the original layout file; the display parameters of each component in the target page within the original layout file are in a state of pending configuration.
[0283] In this embodiment, since the target device may be an electronic device with weak computing power, such as a smartwatch or smart glasses, which cannot perform page layout calculations, when a display operation initiated by the user is received, it is necessary to determine whether the layout file corresponding to the display operation is an original layout file without configured display parameters. If the layout file corresponding to the display operation is a target layout file with configured display parameters, then operation S1308 is executed; otherwise, if the layout file corresponding to the display operation is an original layout file with display parameters to be configured, then operation S1302 is executed.
[0284] In this embodiment, the layout file corresponding to the display operation can be downloaded by the target device from the server.
[0285] In S1302, if the layout file corresponding to the display operation is the original layout file, the target device determines whether to interconnect with the first device.
[0286] In this embodiment, if the target device detects that the layout file corresponding to the display operation is the original layout file, it means that the components in the original layout file are not configured with display parameters corresponding to the target device. In this case, the task of page layout calculation needs to be completed by other electronic devices. Therefore, it will determine whether there are other electronic devices interconnected with the target device, namely the first device mentioned above. The target device and the first device can be interconnected via a local area network (LAN) or the Internet. The connection method includes wired connection and wireless connection. If a LAN is used, the LAN can specifically be a wireless LAN, a wired LAN, or a LAN built based on Bluetooth, NFC, etc. If interconnected with the first device, the operation of S1303 is executed; otherwise, the operation of S1309 is executed.
[0287] In S1303, if the target device is interconnected with the first device, the target device generates a measurement instruction containing the original layout file and sends the measurement instruction to the first device.
[0288] In this embodiment, if the target device is interconnected with a first device that has page layout calculation capabilities, a measurement instruction can be generated, and the original layout file to be displayed can be encapsulated in the measurement instruction. The measurement instruction can then be sent to the first device via a local area network.
[0289] In S1304, the first device responds to the measurement command initiated by the target device, runs a preset parameter measurement script, and determines the target parameters corresponding to the target device; the measurement command includes the original layout file.
[0290] In this embodiment, after receiving the measurement command sent by the target device, the first device can extract the original layout file carried in the measurement command, and perform page layout calculations on each component in the original layout file through a preset parameter measurement script to obtain the target parameters corresponding to the target device. For details on how to obtain the target parameters, please refer to the relevant description in Embodiment 1, S501, which will not be repeated here.
[0291] In S1305, the first device imports the target parameters into the original layout file associated with the target page to generate the target layout file corresponding to the target device.
[0292] In this embodiment, since the implementation of S1305 is exactly the same as that of S502 in Embodiment 1, the specific description can be found in the relevant description of S502, and will not be repeated here.
[0293] In S1306, the first device sends the target layout file to the target device so that the target device displays the target page.
[0294] In this embodiment, since the implementation of S1306 is exactly the same as that of S503 in Embodiment 1, the specific description can be found in the relevant description of S503, and will not be repeated here.
[0295] In S1307, the target device displays the target page based on the target layout file.
[0296] In one possible implementation, the target device can replace the original layout file stored therein with the target layout file described above, and when it receives a display operation for the target page again, it can directly display it according to the target layout file.
[0297] In S1308, if the layout file corresponding to the display operation is a target layout file, the target device displays the target page based on the target layout file.
[0298] In this embodiment, since the layout file corresponding to the display operation is a target layout file with configured display parameters, the target device can directly display the target page.
[0299] In S1309, if the target device is not connected to the first device, an abnormal display message is generated.
[0300] In this embodiment, if there are no other electronic devices (i.e., the first device) in the local area network where the target device is located, an abnormal display message can be generated to prompt the user to connect to another first device capable of performing page layout calculations within the local area network.
[0301] In this embodiment, the target device can perform page layout calculations through other interconnected devices. For example, if the target device is a smartwatch with relatively weak computing power, and the smartwatch can generally connect to a smartphone through a wireless communication module (such as a Bluetooth module, a Wi-Fi module, etc.), the smartwatch can send the original layout file to be configured to the smartphone (i.e., the first device). After the smartphone performs page layout calculations, it feeds back the configured target layout file to the smartwatch so that the target page can be displayed on the smartwatch. This solves the problem that even target devices without computing power can display layout files with configurable display parameters, thus improving the applicability of page display technology.
[0302] Example 6:
[0303] Example 5 illustrates the implementation process of the page layout file generation method from the perspective of interaction between the first device and the target device, while Example 6 uses the target device as the execution subject of the process to illustrate the implementation process of the page layout file generation method. Figure 14 A flowchart illustrating the implementation of a page display method on a target device side according to an embodiment of this application is shown below:
[0304] In S1401, the target device responds to a display operation initiated by the user. If the layout file corresponding to the display operation is an original layout file, a measurement instruction containing the original layout file is generated, and the measurement instruction is sent to a first device interconnected with the target device. The display parameters of each component in the target page within the original layout file are in a state of pending configuration.
[0305] In S1402, the target device receives the target layout file fed back by the first device based on the original layout file;
[0306] In S1403, the target device displays the target page based on the target layout file.
[0307] Example 7:
[0308] Corresponding to the page layout file generation method described in the above embodiments, Figure 15 A structural block diagram of the page layout file generation apparatus provided in the embodiments of this application is shown. For ease of explanation, only the parts related to the embodiments of this application are shown.
[0309] Reference Figure 15 The apparatus for generating the page layout file includes:
[0310] The target parameter acquisition unit 151 is used to acquire the target parameters corresponding to the target device; the target parameters include the display parameters of each component in the target page;
[0311] The target layout file generation unit 152 is used to import the target parameters into the original layout file associated with the target page to generate the target layout file corresponding to the target device; the display parameters of each component in the target page in the original layout file are in a state of pending configuration.
[0312] The target layout file sending unit 153 is used to send the target layout file to the target device so that the target device displays the target page.
[0313] Optionally, the target parameter acquisition unit 151 includes:
[0314] An operating system setup unit is used to launch a device simulation program associated with the target device to run the same operating system on the first device as the target device.
[0315] The component measurement application running unit is used to call the operating system to load the original layout file, so as to perform page layout calculations on each component in the original layout file through the operating system and determine the display parameters of each component;
[0316] The display parameter encapsulation unit is used to generate the target parameters based on the display parameters of each of the components.
[0317] Optionally, the target parameter acquisition unit 151 includes:
[0318] A compilation instruction response unit is configured to, in response to a compilation instruction from the target page, execute a preset parameter measurement script to determine device parameters corresponding to multiple preset device models; the multiple device models include the device model of the target device; the multiple device parameters include the target parameters corresponding to the target device;
[0319] Correspondingly, the target layout file generation unit 152 includes:
[0320] The compilation instruction execution unit is used to import each of the device parameters into the original layout file and generate multiple page layout files that match each of the device models; the multiple page layout files include the target layout file corresponding to the target device.
[0321] Optionally, the page layout file generation device is a server responding to application downloads, and the page layout file generation device further includes:
[0322] The original layout file receiving unit is used to receive the original layout file uploaded by the developer's second device;
[0323] Correspondingly, the target parameter acquisition unit 151 includes:
[0324] The parameter measurement script execution unit is used to run a preset parameter measurement script to determine the target parameters corresponding to the target device.
[0325] Optionally, the parameter measurement script execution unit includes:
[0326] The download request response unit is used to respond to the download request initiated by the target device, run the parameter measurement script, and determine the target parameters corresponding to the target device.
[0327] Optionally, the parameter measurement script execution unit includes:
[0328] The layout update triggering unit is configured to, if a preset layout update time is reached, have the first device run the parameter measurement script and output device parameters corresponding to a plurality of layout files to be configured applicable to the target device; the plurality of layout files to be configured include the original layout file; the plurality of layout files to be configured are layout files uploaded between the previous layout update time and the current layout update time; the device parameters corresponding to the plurality of layout files to be configured include target parameters.
[0329] Correspondingly, the target layout file sending unit 153 is specifically used to: send the target layout file to the target device in response to a download request initiated by the target device.
[0330] Optionally, the page layout file generation device is a device interconnected with the target device, and the target parameter acquisition unit 151 includes:
[0331] A measurement command response unit is used for the first device to respond to a measurement command initiated by the target device, run a preset parameter measurement script, and determine the target parameters corresponding to the target device; the measurement command includes the original layout file.
[0332] Therefore, the page layout file generation device provided in this application embodiment can also obtain the target parameters corresponding to the target device for displaying the target page through the first device, that is, perform the page layout calculation operation of the target device to determine the display parameters when the target page is displayed on the target device. The first device imports the target parameters into the original layout file associated with the target page, configures the display parameters of each component in the original layout file, and obtains a target layout file that matches the display module of the target device. Then, the first device can send the target layout file to the target device, and the target device can display the target page according to the received target layout file. Compared with the existing page display technology, this embodiment does not require developers to manually configure display parameters for different target devices and generate multiple page layout files. Instead, the first device can obtain the target parameters related to the target device, and the page layout calculation is completed by the first device, thereby reducing the configuration operation of developers and reducing the difficulty of page development. At the same time, the task of page layout calculation is not completed by the target device, but is executed by the first device. Therefore, the target device does not need to have the ability to perform page layout calculation. The target device can directly generate the target page according to the target layout file, thereby improving the applicability of the generated target layout file, reducing the demand for the computing power of the target device, and taking into account both the difficulty of page development and the applicability of the page layout file.
[0333] Example 8:
[0334] Corresponding to the page display method described in the above embodiments, Figure 16 A structural block diagram of a page display device provided in an embodiment of this application is shown. For ease of explanation, only the parts related to the embodiments of this application are shown.
[0335] Reference Figure 16 The display device for this page includes:
[0336] Display operation response unit 161 is used to respond to a display operation initiated by a user. If the layout file corresponding to the display operation is an original layout file, a measurement instruction containing the original layout file is generated and the measurement instruction is sent to a first device interconnected with the target device. The display parameters of each component in the target page within the original layout file are in a state of pending configuration.
[0337] The target layout file receiving unit 162 is used to receive the target layout file fed back by the first device based on the original layout file;
[0338] The target page display unit 163 is used for the target device to display the target page based on the target layout file.
[0339] Figure 17 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 17 As shown, the electronic device 17 of this embodiment includes: at least one processor 170 ( Figure 17 (Only one is shown) a processor, a memory 171, and a computer program 172 stored in the memory 171 and executable on the at least one processor 170, wherein the processor 170 executes the computer program 172 to implement the steps in the embodiments of the methods for generating any of the page layout files described above.
[0340] The electronic device 17 can be a desktop computer, laptop, handheld computer, cloud server, or other computing device. This electronic device may include, but is not limited to, a processor 170 and a memory 171. Those skilled in the art will understand that... Figure 17 This is merely an example of electronic device 17 and does not constitute a limitation on electronic device 17. It may include more or fewer components than shown, or combine certain components, or different components, such as input / output devices, network access devices, etc.
[0341] The processor 170 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0342] In some embodiments, the memory 171 may be an internal storage unit of the electronic device 17, such as a hard disk or memory of the electronic device 17. In other embodiments, the memory 171 may be an external storage device of the electronic device 17, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device 17. Furthermore, the memory 171 may include both internal and external storage units of the electronic device 17. The memory 171 is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory 171 can also be used to temporarily store data that has been output or will be output.
[0343] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.
[0344] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0345] This application also provides an electronic device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor executes the computer program to implement the steps in any of the above method embodiments.
[0346] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.
[0347] This application provides a computer program product that, when run on a mobile terminal, enables the mobile terminal to implement the steps described in the above-described method embodiments.
[0348] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a photographic device / electronic device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.
[0349] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0350] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0351] In the embodiments provided in this application, it should be understood that the disclosed apparatus / network devices and methods can be implemented in other ways. For example, the apparatus / network device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0352] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0353] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for generating a page layout file, applied to a first device, characterized in that, The method includes: The first device acquires target parameters corresponding to the target device; the target parameters include display parameters of each component within the target page; the target parameters are obtained by page layout calculation based on the module parameters of the display module of the target device; the display parameters of each component include the display position and display size of each component; The first device imports the target parameters into the original layout file associated with the target page to generate the target layout file corresponding to the target device; the display parameters of each component in the target page within the original layout file are in a state of pending configuration. The first device sends the target layout file to the target device so that the target device displays the target page; The first device acquires the target parameters corresponding to the target device, including: In response to the compilation instructions of the target page, the first device runs a preset parameter measurement script to determine the device parameters corresponding to multiple preset device models; the multiple preset device models include the device model of the target device; the multiple device parameters include the target parameters corresponding to the target device; Correspondingly, the first device imports the target parameters into the original layout file associated with the target page to generate a target layout file corresponding to the target device, including: The first device imports each device parameter into the original layout file to generate multiple page layout files that match each device model; the multiple page layout files include the target layout file corresponding to the target device.
2. The generation method of claim 1, wherein, The first device acquires the target parameters corresponding to the target device, and further includes: The first device initiates a device emulation program associated with the target device to run the same operating system on the first device as on the target device; The first device calls the operating system to load the original layout file, so that the operating system can perform page layout calculations on each component in the original layout file and determine the display parameters of each component. The first device generates the target parameters based on the display parameters of each component.
3. The generation method according to claim 1, characterized in that, The first device is a server responding to application downloads, and the generation method further includes: The first device receives the original layout file uploaded by the developer's second device; Correspondingly, the first device acquires the target parameters corresponding to the target device; the target parameters include the display parameters of each component within the target page, and also include: The first device runs a preset parameter measurement script to determine the target parameters corresponding to the target device.
4. The generation method according to claim 3, characterized in that, The first device runs a preset parameter measurement script to determine the target parameters corresponding to the target device, including: In response to the download request initiated by the target device, the first device runs the parameter measurement script to determine the target parameters corresponding to the target device.
5. The generation method according to claim 3, characterized in that, The first device runs a preset parameter measurement script to determine the target parameters corresponding to the target device, including: If the preset layout update time is reached, the first device runs the parameter measurement script and outputs device parameters corresponding to multiple layout files to be configured applicable to the target device; the multiple layout files to be configured include the original layout file; the multiple layout files to be configured are layout files uploaded between the previous layout update time and the current layout update time; the device parameters corresponding to the multiple layout files to be configured include target parameters. Correspondingly, the first device sends the target layout file to the target device, including: In response to the download request initiated by the target device, the first device sends the target layout file to the target device.
6. The generation method according to claim 1, characterized in that, The first device is another device interconnected with the target device. The first device acquires the target parameters corresponding to the target device, and further includes: The first device responds to the measurement command initiated by the target device by running a preset parameter measurement script to determine the target parameters corresponding to the target device; the measurement command includes the original layout file.
7. A method for displaying a page, applied to a target device, characterized in that, include: In response to a user-initiated display operation, if the layout file corresponding to the display operation is an original layout file, the target device generates a measurement instruction containing the original layout file and sends the measurement instruction to a first device interconnected with the target device; the display parameters of each component in the target page within the original layout file are in a state of pending configuration. The target device receives a target layout file fed back by the first device based on the original layout file; The target layout file is generated by the first device by importing the target parameters into the original layout file; the target parameters include the display parameters of each component within the target page; The target parameters are calculated by the first device based on the module parameters of the target device's display module; the display parameters of each component include the display position and display size of each component. The target parameter is the device parameter corresponding to the target device among multiple preset device model device parameters; The multiple device parameters are the device parameters corresponding to multiple preset device models determined by the first device in response to the compilation instructions of the target page and running a preset parameter measurement script; the target layout file is the page layout file corresponding to the target device in multiple page layout files; the multiple page layout files are generated by the first device by importing each device parameter into the original layout file and matching each device model respectively; The target device displays the target page based on the target layout file.
8. A page layout file generation device, characterized in that, include: The target parameter acquisition unit is used to acquire the target parameters of the target device. The target parameters include the display parameters of each component within the target page; The target parameters are calculated based on the module parameters of the display module of the target device to determine the page layout; the display parameters of each component include the display position and display size of each component. The target layout file generation unit is used to import the target parameters into the original layout file associated with the target page and generate the target layout file corresponding to the target device; The display parameters of each component in the target page within the original layout file are in a state of pending configuration; A target layout file sending unit is configured to send the target layout file to the target device so that the target device displays the target page; The target parameter acquisition unit includes: A compilation instruction response unit is configured to, in response to a compilation instruction from the target page, execute a preset parameter measurement script to determine device parameters corresponding to multiple preset device models; the multiple device models include the device model of the target device; the multiple device parameters include the target parameters corresponding to the target device; The target layout file generation unit includes: The compilation instruction execution unit is used to import each of the device parameters into the original layout file and generate multiple page layout files that match each of the device models; the multiple page layout files include the target layout file corresponding to the target device.
9. A page display device, characterized in that, include: The display operation response unit is used to respond to a display operation initiated by the user. If the layout file corresponding to the display operation is an original layout file, a measurement instruction containing the original layout file is generated and the measurement instruction is sent to a first device interconnected with the target device. The display parameters of each component in the target page within the original layout file are in a state of pending configuration. A target layout file receiving unit is configured to receive a target layout file fed back by the first device based on the original layout file; The target layout file is generated by the first device by importing the target parameters into the original layout file; the target parameters include the display parameters of each component within the target page; The target parameters are calculated by the first device based on the module parameters of the target device's display module; the display parameters of each component include the display position and display size of each component. The target parameter is the device parameter corresponding to the target device among multiple preset device model device parameters; The multiple device parameters are the device parameters corresponding to multiple preset device models determined by the first device in response to the compilation instructions of the target page and running a preset parameter measurement script; the target layout file is the page layout file corresponding to the target device in multiple page layout files; the multiple page layout files are generated by the first device by importing each device parameter into the original layout file and matching each device model respectively; The target page display unit is used to display the target page based on the target layout file.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 6, or claim 7.
11. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 6, or as described in claim 7.