A file display method and related apparatus
By synchronously loading and adjusting the same file in multi-screen scenarios, the problem of synchronous display across multiple screens is solved, enabling synchronous display, scaling, and panning of high-resolution files, thus improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING CO WHEELS TECH CO LTD
- Filing Date
- 2025-01-21
- Publication Date
- 2026-07-21
AI Technical Summary
In multi-screen scenarios, existing technologies cannot achieve synchronized display and adjustment of the same file, resulting in a poor user experience. This is especially true in dual-screen scenarios, where the synchronization and integrity between screens are difficult to guarantee, easily leading to stuttering and OutOfMemory errors.
By synchronously loading the same file on multiple screens and controlling the target screen and candidate screens to synchronously perform corresponding display adjustment operations when a target operation is detected, the synchronous display and scaling/panning of high-resolution large files can be achieved by utilizing file layering and regional loading technology.
It enables synchronized display and adjustment of the same file across multiple screens, improving user experience, ensuring synchronization and integrity between screens, and avoiding stuttering and OOM issues.
Smart Images

Figure CN122431626A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of document processing technology, and in particular to a document display method and related apparatus. Background Technology
[0002] Most vehicles are now equipped with screens, allowing users to perform operations such as displaying documents, like showing a specific file. To improve the user experience, some vehicles are equipped with multiple screens. Taking images as an example, when different parts of the image are displayed on multiple screens simultaneously, it creates a display effect similar to displaying a large image on a single screen.
[0003] In this situation, the content displayed on multiple screens cannot be adjusted synchronously, resulting in a poor user experience. Summary of the Invention
[0004] In view of the above problems, this application provides a document display method and related apparatus to achieve the purpose of synchronous display and adjustment of the same document across multiple screens. The specific solution is as follows:
[0005] A method for displaying documents, including:
[0006] Obtain the target file and display the target file on multiple screens; each screen displays a portion of the target file's content.
[0007] If a target operation is detected on the target file on the target screen, the target screen and the candidate screen are controlled to synchronously perform the display adjustment operation corresponding to the target operation.
[0008] Optionally, the target screen is at least one of the plurality of screens, and the candidate screen is one of the plurality of screens that needs to be operated synchronously with the target screen.
[0009] Optionally, the target file may be displayed on multiple screens, including:
[0010] Determine the target display method of the target file on each of the multiple screens;
[0011] The target file is displayed on the corresponding screen according to the target display method.
[0012] Optionally, the process of determining the candidate screen includes:
[0013] Based on the synchronization and linkage relationship between screens, the candidate screens corresponding to the target screen are determined.
[0014] Alternatively, based on the synchronous action relationship indicated by the target operation, a candidate screen corresponding to the target screen can be determined.
[0015] Optionally, controlling the target screen and candidate screens to synchronously execute display adjustment operations corresponding to the target operation includes:
[0016] The first component is used to adjust the display of the target screen according to the file display adjustment information corresponding to the target operation.
[0017] The file display adjustment information is synchronized to the second component, so that the second component synchronously performs the display adjustment operation of the candidate screen according to the file display adjustment information.
[0018] Optionally, the display adjustment operation of the target screen is performed using the first component according to the file display adjustment information corresponding to the target operation, including:
[0019] Determine the target layer corresponding to the file display adjustment information;
[0020] The first component is used to render multiple sub-files corresponding to the target layer on the target screen.
[0021] Optionally, the first component is used to render multiple sub-files corresponding to the target layer on the target screen, including:
[0022] If the multiple sub-files corresponding to the target layer are not stored, the sub-files that are not stored in the multiple sub-files corresponding to the target layer are extracted from the initial file;
[0023] The first component is used to render the multiple sub-files on the target screen.
[0024] Optionally, the process of generating multiple sub-files corresponding to the target layer includes:
[0025] Generate reference files for different file layers corresponding to the initial file;
[0026] The reference document is divided using dividing lines to obtain multiple regions;
[0027] Using the attribute information of the regions, extract the file content corresponding to each region from the initial file;
[0028] The file content is scaled according to the file layer to obtain multiple sub-files corresponding to each file layer; the target layer is one of the file layers.
[0029] Optionally, reference files for different file layers corresponding to the initial file are generated, including:
[0030] Get the scaling values of different file layers;
[0031] Each of the aforementioned scaling values is used to scale the same initial file to obtain a reference file for the corresponding file layer.
[0032] Optionally, after displaying the target file on multiple screens, the method further includes:
[0033] Only the target screen is controlled to perform the display adjustment operation corresponding to the target operation, while the display state of the target file on other screens among the multiple screens remains unchanged.
[0034] A document display device, comprising:
[0035] The file display module is used to acquire a target file and display the target file on multiple screens; each screen displays a portion of the content of the target file.
[0036] The display adjustment module is used to control the target screen and the candidate screen to synchronously perform the display adjustment operation corresponding to the target operation when a target operation is detected to be performed on the target file on the target screen.
[0037] An electronic device includes at least one processor and a memory connected to the processor, wherein:
[0038] The memory is used to store computer programs;
[0039] The processor is used to execute the computer program so that the electronic device can implement the above-described file display method.
[0040] A document display system includes the aforementioned electronic device and multiple screens.
[0041] A computer storage medium carrying one or more computer programs, which, when executed by an electronic device, enable the electronic device to perform the file display method described above.
[0042] As can be seen from the above technical solutions, this application provides a file display method and related apparatus. In this application, in a multi-screen scenario, a target file is acquired and displayed on multiple screens. Each screen displays a portion of the content of the target file. When a target operation is detected on the target file on the target screen, the target screen and candidate screens are controlled to synchronously execute the display adjustment operation corresponding to the target operation. This achieves synchronous display and adjustment of the same file on multiple screens, based on displaying a portion of the target file on each screen, thereby improving the intelligence of displaying the same file on multiple screens and enhancing the user experience. Attached Figure Description
[0043] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0044] Figure 1 A schematic diagram of a system architecture is provided for this application;
[0045] Figure 2 A schematic diagram of an optional hardware structure for a terminal 100 provided in this application;
[0046] Figure 3 This application provides a schematic diagram of the structure of a vehicle controller 200.
[0047] Figure 4 A flowchart illustrating a document display method provided in an embodiment of this application;
[0048] Figure 5 This application provides a schematic diagram of a dual-screen file display as an embodiment.
[0049] Figure 6 This application provides a schematic diagram of a three-screen document display as an embodiment.
[0050] Figure 7 A schematic diagram of a file layer provided in an embodiment of this application;
[0051] Figure 8 A schematic diagram illustrating a file display method provided in an embodiment of this application;
[0052] Figure 9 This application provides a schematic diagram of a file rendering process.
[0053] Figure 10 A schematic diagram illustrating another document display method provided in an embodiment of this application;
[0054] Figure 11 This is a schematic diagram of the structure of a document display device provided in an embodiment of this application;
[0055] Figure 12 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0056] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is for explaining specific embodiments only and is not intended to limit the scope of this application.
[0057] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.
[0058] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.
[0059] To enable those skilled in the art to better understand the present invention, the technical terms used in the present invention are explained below.
[0060] Activity: A page or unit of an application in the Android system;
[0061] ImageView: A component in the Android system that can be used for image rendering;
[0062] OOM (Out Of Memory): Memory overflow;
[0063] scale: Image scaling value;
[0064] center: the center point of the image;
[0065] Rect object: A class used in Android development to represent a rectangle, containing four properties: left boundary, top boundary, right boundary, and bottom boundary.
[0066] Most vehicles are now equipped with screens, allowing users to perform operations such as document display. To improve the user experience, some vehicles are equipped with multiple screens; for example, a dual-screen vehicle has two screens with a gap between them.
[0067] Therefore, how to achieve synchronized display of the same file, such as an image, in a multi-screen scenario is a technical problem that urgently needs to be solved by those skilled in the art.
[0068] In related technologies, taking dual-screen image display as an example, in a dual-screen scenario, the size (in pixels) of a single screen is 2880×1620, and there is a 136-pixel physical gap between the two screens of a car. In an embodiment where the image size is (2880×2+136)×1620, the image material of size (2880×2+136)×1620 is first cropped into two 2880×1620 images. Then, an Activity is launched on each of the driver and passenger screens, and a new ImageView is created in each Activity. The driver and passenger ImageViews each execute their initialization process, loading their respective image resources. Once both ImageViews are ready, they render their respective screens.
[0069] The following technical problems exist with this existing technology:
[0070] 1. Two ImageViews belong to two different Activities. When one ImageView is scaled and panned on one screen, the other screen cannot synchronize with it.
[0071] 2. Because the image displayed on each screen is a cropped portion of a larger image, zooming and panning on one screen can only display half of the screen content, and one screen cannot display the complete content of the dual-screen setup.
[0072] 3. When loading high-resolution large images on a single screen, stuttering or even OutOfMemoryError (OOM) may occur, causing the program to crash.
[0073] Therefore, in this embodiment, taking a dual-screen setup as an example, in a dual-screen scenario, the driver and passenger screens each load the same file, and the left and right portions of the file are played on both screens. The combined effect of the two screens' displays is as if a single file is loaded on the same screen, with complete synchronization between the two screens. Furthermore, the ImageViews on both screens mutually monitor the file's scale and center values, ensuring real-time synchronization during scaling and translation. Similar principles apply to multi-screen scenarios with two or more screens.
[0074] In addition, it uses layered and regional file loading, which enables the loading of high-resolution large files, and the images remain clear and sharp even after magnification.
[0075] See Figure 1 , Figure 1 A schematic diagram of a system architecture is shown. The system may include a terminal 100 and a vehicle controller 200. The vehicle controller 200 may include one or more servers (…). Figure 1 (Taking a server as an example for illustration), the vehicle controller 200 can provide the methods provided in the embodiments of this application to one or more terminals.
[0076] The terminal 100 may have a third-party system application installed on it. The application and webpage can provide an interface. The terminal 100 can receive files selected by the user, such as files, and send the files to the vehicle controller 200. The vehicle controller 200 can display the files.
[0077] It should be understood that in some optional implementations, the terminal 100 can also complete the action of obtaining the processing result based on the received parameters on its own, without the need for the server to cooperate. This application embodiment is not limited to this.
[0078] The following description Figure 1 The product form of the mid-terminal 100;
[0079] The terminal 100 in this application embodiment can be a mobile phone, tablet computer, wearable device, vehicle device, augmented reality (AR) / virtual reality (VR) device, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), etc., and this application embodiment does not impose any restrictions on it.
[0080] Figure 2 A schematic diagram of an optional hardware structure for terminal 100 is shown.
[0081] refer to Figure 2 As shown, the terminal 100 may include a radio frequency unit 110, a memory 120, an input unit 130, a display unit 140, a camera 150 (optional), an audio circuit 160 (optional), a speaker 161 (optional), a microphone 162 (optional), a headphone jack 163 (optional), a processor 170, an external interface 180, a power supply 190, and other components. Those skilled in the art will understand that... Figure 2 These are merely examples of terminals or multi-functional devices and do not constitute a limitation on terminals or multi-functional devices. They may include more or fewer components than shown in the illustration, or combine certain components, or use different components.
[0082] The input unit 130 can be used to receive input numerical or character information, and to generate key signal inputs related to user settings and function control of the portable multi-functional device. Specifically, the input unit 130 may include a touchscreen 131 (optional) and / or other input devices 132. The touchscreen 131 can collect touch operations performed by the user on or near it (such as operations performed by the user using fingers, knuckles, styluses, or any suitable object on or near the touchscreen), and drive the corresponding connection devices according to a pre-set program. The touchscreen can detect the user's touch actions, convert the touch actions into touch signals and send them to the processor 170, and can receive and execute commands sent by the processor 170; the touch signal includes at least touch point coordinate information. The touchscreen 131 can provide an input interface and an output interface between the terminal 100 and the user. In addition, various types of touchscreens, such as resistive, capacitive, infrared, and surface acoustic wave, can be used to implement the touchscreen. Besides the touchscreen 131, the input unit 130 may also include other input devices. Specifically, other input devices 132 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc.
[0083] Among them, the input device 132 can receive input data, etc.
[0084] The display unit 140 can be used to display information input by the user or information provided to the user, various menus of the terminal 100, interactive interfaces, file display, and / or playback of any multimedia file.
[0085] The memory 120 can be used to store instructions and data. The memory 120 may primarily include an instruction storage area and a data storage area. The data storage area can store various types of data, such as multimedia files and text. The instruction storage area can store software units such as operating systems, applications, and instructions required for at least one function, or subsets or extended sets thereof. It may also include non-volatile random access memory. It provides the processor 170 with hardware, software, and data resources for managing the computing device, supporting control software and applications. It is also used for storing multimedia files, as well as storing running programs and applications.
[0086] The processor 170 is the control center of the terminal 100. It connects various parts of the terminal 100 via various interfaces and lines. By running or executing instructions stored in the memory 120 and calling data stored in the memory 120, it performs various functions and processes data of the terminal 100, thereby controlling the terminal device as a whole. Optionally, the processor 170 may include one or more processing units; preferably, the processor 170 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 170. In some embodiments, the processor and memory can be implemented on a single chip; in some embodiments, they can also be implemented separately on independent chips. The processor 170 can also be used to generate corresponding operation control signals, send them to the corresponding components of the computing processing device, read and process data in the software, especially read and process data and programs in the memory 120, so that the various functional modules therein perform corresponding functions, thereby controlling the corresponding components to act according to the instructions.
[0087] The memory 120 can be used to store software code related to the image uploading method, and the processor 170 can execute the steps of the image uploading method, and can also schedule other units (such as the above-mentioned input unit 130 and display unit 140) to achieve the corresponding functions.
[0088] The radio frequency unit 110 (optional) can be used for receiving and transmitting signals during information transmission or calls. For example, it can receive downlink information from the base station and process it for the processor 170; additionally, it can transmit uplink data to the base station. Typically, the RF circuit includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier (LNA), a duplexer, etc. Furthermore, the radio frequency unit 110 can also communicate wirelessly with network devices and other devices. This wireless communication can use any communication standard or protocol, including but not limited to Global System for Mobile Communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.
[0089] In this embodiment of the application, the radio frequency unit 110 can send data to the vehicle controller 200 and receive the processing results sent by the vehicle controller 200.
[0090] It should be understood that the radio frequency unit 110 is optional and can be replaced with other communication interfaces, such as a network port.
[0091] The terminal 100 also includes a power supply 190 (such as a battery) that supplies power to various components. Preferably, the power supply can be logically connected to the processor 170 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system.
[0092] Terminal 100 also includes an external interface 180, which can be a standard Micro USB interface or a multi-pin connector, which can be used to connect terminal 100 to other devices for communication or to connect a charger to charge terminal 100.
[0093] Although not shown, terminal 100 may also include a flash, a Wireless Fidelity (WiFi) module, a Bluetooth module, sensors with various functions, etc., which will not be described in detail here. Some or all of the methods described below can be applied to, for example... Figure 2 In the terminal 100 shown.
[0094] The following description Figure 1 The product form of the vehicle controller 200;
[0095] Figure 3 A structural schematic diagram of a vehicle controller 200 is provided, such as... Figure 3 As shown, the vehicle controller 200 includes a bus 201, a processor 202, a communication interface 203, and a memory 204. The processor 202, the memory 204, and the communication interface 203 communicate with each other via the bus 201.
[0096] Bus 201 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 3 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0097] The processor 202 can be any one or more of the following processors: a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0098] Memory 204 may include volatile memory, such as random access memory (RAM). Memory 204 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).
[0099] The memory 204 can be used to store software code related to the file display method, and the processor 202 can execute the steps of the chip's file display method, and can also schedule other units to achieve the corresponding functions.
[0100] It should be understood that the aforementioned terminal 100 and vehicle controller 200 can be centralized or distributed devices. The processors (e.g., processor 170 and processor 202) in the aforementioned terminal 100 and vehicle controller 200 can be hardware circuits (such as application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), general-purpose processors, digital signal processors (DSPs), microprocessors or microcontrollers, etc.) or combinations of these hardware circuits. For example, the processor can be a hardware system with instruction execution capabilities, such as a CPU or DSP, or a hardware system without instruction execution capabilities, such as an ASIC or FPGA, or a combination of the aforementioned hardware systems without instruction execution capabilities and hardware systems with instruction execution capabilities.
[0101] This application provides a document display method, which can be applied to... Figure 1 Taking the computer device in the figure as an example, the computer device can specifically be the terminal 100 in the figure above, or a system composed of the terminal 100 and the vehicle controller 200. The document display method of the embodiment of this application will be described in detail below with reference to the accompanying drawings.
[0102] Reference Figure 4 , Figure 4 This is a flowchart illustrating a document display method provided in an embodiment of this application. The method includes:
[0103] Step S11: Obtain the target file and display the target file on multiple screens.
[0104] Each screen displays a portion of the target file, and the specific portion displayed can be configured according to requirements.
[0105] In real-world scenarios, the target file can be a statically displayed file such as an image, video, text, or webpage. Taking an image as an example, the image can be one uploaded by the user to the vehicle controller 200 via the aforementioned terminal 100, or it can be an image selected by the user in the vehicle's infotainment system. The specific image source and content are not limited and can be configured accordingly.
[0106] In real-world scenarios, vehicles are typically equipped with multiple screens. For example, a driver's screen can be placed in the driver's seat, and a passenger's screen can be placed in the passenger seat, creating a two-screen scenario. Furthermore, a screen can be placed between the driver's and passenger's screens, creating a three-screen scenario. Additionally, multiple screens can be placed between the driver's and passenger's screens, creating multi-screen scenarios with more than three screens. In multi-screen scenarios, the screens need to be arranged sequentially with a physical gap between them.
[0107] Similarly, multiple screens can be installed in other locations on the vehicle, such as the rear seats and windows, with no restrictions on the specific location and size of the screens.
[0108] In one embodiment, in a dual-screen scenario, the size (in pixels) of a single screen is 2880×1620, and there is a physical gap of 136 pixels wide between the two screens of the car. These two screens are referred to as the driver's screen and the passenger's screen, respectively.
[0109] When displaying target files, such as images, on multiple screens, there are no requirements regarding the image size. The image can be a size that matches the screen size or a size that does not match the screen size, such as an image that is larger or smaller than the screen size. If the image matches the screen size, no scaling operation is required, and it can be displayed directly. If the image does not match the screen size, it needs to be scaled to match the screen size before it is displayed.
[0110] In one embodiment, the image selected by the user to be displayed is an image with dimensions of (2880×2+136)×1620×10 (the specific multiplier can be set according to requirements). Due to the large size of this image, it first needs to be adjusted to a displayable target file, such as a target image, and then the target image is displayed on each screen in a multi-screen setup. In this embodiment, taking two screens as an example, the two screens are referred to as the first screen and the second screen, respectively. Generally, the first screen and the second screen are positioned side by side with a physical gap in the middle. In a real-world scenario, the first screen can be located in the driver's area, serving as the driver's screen, and the second screen can be located in the passenger area, serving as the passenger screen. The target image is then displayed on both the first screen and the second screen.
[0111] When the target image is displayed on the first screen and the second screen, it can be displayed simultaneously or sequentially. Simultaneous display ensures the target image appears on both screens at the same time. Sequential display, if the time difference between the two displays is short, will also give the user the visual perception that the target image appears on both screens simultaneously.
[0112] Furthermore, when two screens display the same target image, each screen shows a portion of the target file. For example, the first screen displays the left side of the image, and the second screen displays the right side. The specific portion of the image displayed on each screen is configured according to the actual scenario.
[0113] It should be noted that in this embodiment of the invention, the two screens can also display different target files simultaneously, and the content displayed on the two screens can be different.
[0114] Step S12: When a target operation is detected on the target file on the target screen, the target screen and the candidate screen are controlled to synchronously perform the display adjustment operation corresponding to the target operation.
[0115] In this embodiment, the target screen is the screen that the user operates on among multiple screens.
[0116] In one implementation, the target screen is at least one of the multiple screens. For example, in a dual-screen scenario, the target screen for user operation can be either the first screen or the second screen. In scenarios with more screens, such as three, four, or five screens, multiple screens can be operated simultaneously. For example, in a three-screen scenario, the three screens are referred to as the first screen, the second screen, and the third screen, respectively. If one user operates the first screen while another user simultaneously operates the second screen, then both the first screen and the second screen are referred to as the target screen.
[0117] The candidate screen is the screen among the plurality of screens that needs to be operated synchronously with the target screen. For example, if the first screen and the second screen need to be operated synchronously, and if the first screen is the target screen, then the second screen is a candidate screen.
[0118] For example, in a four-screen scenario, the first and second screens need to be operated synchronously, and the third and fourth screens need to be operated synchronously. If the first and third screens are the target screens, then the second screen is a candidate screen for the first screen, and the fourth screen is a candidate screen for the third screen.
[0119] For example, in a four-screen scenario, the first, second, third, and fourth screens need to be operated synchronously. If the first screen is the target screen, then the second, third, and fourth screens are all candidate screens for the first screen. That is, the number of candidate screens can be one or more.
[0120] In a particular implementation scenario, the number of candidate screens may be zero. For example, in a dual-screen scenario that includes a first screen and a second screen, if the first screen and the second screen do not need to be operated synchronously, then when the first screen is the target screen, the number of candidate screens is empty.
[0121] For the target screen, the user can perform target operations on the target screen, such as zooming, double-clicking to enlarge, dragging (also known as panning or swiping), etc. At this time, the candidate screen will perform the same target operation synchronously.
[0122] For example, in a dual-screen scenario, taking the target screen as the first screen, if the user zooms in on the target file on the first screen (e.g., using two fingers to zoom in on an image), it's interpreted as a zoom command being received, and the zoom operation is performed simultaneously on both the first and second screens. The same applies to zooming out and dragging.
[0123] Synchronous zoom-in refers to performing zoom-in operations simultaneously or sequentially. When zoom-in operations are performed sequentially, the time difference between the two zoom-in operations can be limited, such as being less than a set time difference. In other words, for a target operation, the target screen and candidate screens simultaneously or sequentially perform the display adjustment operations corresponding to the target operation.
[0124] In this embodiment, in a multi-screen scenario, a target file is acquired and displayed on multiple screens. Each screen displays a portion of the target file's content. When a target operation is detected on the target file on the target screen, the target screen and candidate screens are controlled to synchronously execute the display adjustment operation corresponding to the target operation. This achieves synchronous display and adjustment of the same file on multiple screens while displaying a portion of the target file's content on each screen, improving the intelligence of displaying the same file on multiple screens and enhancing the user experience.
[0125] Based on any of the above embodiments, another implementation of this application involves simultaneously displaying the target file on multiple screens, including:
[0126] Determine the target display method for the target file on each of the multiple screens, and display the target file on the corresponding screen according to the target display method.
[0127] Specifically, the relative positions of multiple screens are predetermined. For example, in a dual-screen scenario, the first screen is on the left and the second screen is on the right. In a triple-screen scenario, the first screen is on the left, the second screen is in the center, and the third screen is on the right. In a quad-screen scenario, the first screen is on the left, the second screen is in the left-center, the third screen is in the right-center, and the fourth screen is on the right. Other multi-screen scenarios are similar.
[0128] Once the relative positions of multiple screens are known, the target display method of the target file on each of the multiple screens can be determined based on these relative positions. The target display method refers to the displayed content, that is, which specific part of the target file is displayed on each screen. The content displayed on different screens can be the same or different.
[0129] The relative positions of the target file differ among the multiple screens, and the target file is displayed differently on each screen.
[0130] Taking a dual-screen setup as an example, if the first screen is located to the left of the second screen, the target file, such as the target image, will be displayed on the first screen with the container parent layout aligned to the left, and simultaneously, the target image will be displayed on the second screen with the container parent layout aligned to the right.
[0131] Specifically, taking a dual-screen setup with the first screen on the left and the second screen on the right as an example, the first screen is the driver's screen, and the second screen is the passenger's screen. For a target image, if it is to be fully displayed on both screens, the first screen should show the left side of the target image, and the second screen should show the right side.
[0132] Therefore, when displaying the target image, upon page startup, one Activity is launched on each of the driver and passenger screens. Each Activity creates an ImageView and loads and renders the image. The ImageView size for the driver screen is set to (2880×2+136)×1620, or 5986×1620, to ensure it can hold the entire target image and display the complete dual-screen content when the screen is zoomed or panned. For the driver screen, it is left-aligned with the parent layout of the container, using XML (Extensible Markup Language) statements for alignment.
[0133] At this time, for the target image, only the left part of the target image will be displayed on the driver's screen. The right part that extends beyond the screen cannot be displayed due to the physical limitations of the screen. However, when the image is dragged, the right part of the image can be displayed.
[0134] Similarly, for the passenger screen, its ImageView size is set to (2880×2+136)×1620 and right-aligned with the parent layout of the container. The alignment method is implemented using XML statements.
[0135] At this time, for the target image, only the right side of the image will be displayed on the passenger screen. The left side, which extends beyond the screen, cannot be displayed due to the physical limitations of the screen. However, when the image is dragged, the left side of the image can be displayed.
[0136] Reference Figure 5 For example, a diagram illustrating the target file, such as the target image, can be found here. Figure 5 As shown, the driver's screen (also known as the center console screen) displays the left side of the target image, while the passenger's screen displays the right side of the target image.
[0137] Similarly, if the first screen is located to the right of the second screen, the target image is displayed on the first screen with the container's parent layout right-aligned, and simultaneously, the target image is displayed on the second screen with the container's parent layout left-aligned. The implementation process is described above.
[0138] In a three-screen embodiment, such as Figure 6 As shown, one Activity is created for each of the three screens, and an ImageView is created for each of the three Activities, which then loads and renders the image. The size of the ImageView for each screen is set to (2880×3+136×2)×1620 to ensure that the entire target image can be stored.
[0139] The first screen is on the far left, the second screen is in the center, and the third screen is on the far right. In this case, the alignment of the first screen is to left-align the image, which can be done by left-aligning the container's parent layout; the alignment of the second screen is to center-align the image, which can be done by center-aligning the container's parent layout; and the alignment of the third screen is to right-align the image, which can be done by right-aligning the container's parent layout.
[0140] After determining the target display method of the target file on each screen, the target file is synchronously displayed on the corresponding screen using the corresponding ImageView according to the target display method. The specific display effect is as follows: Figure 5 and 6 As shown.
[0141] In this embodiment, a target display method is set for each screen and displayed accordingly. This enables the simultaneous display of a portion of the same file on multiple screens, achieving an effect similar to displaying a single file on one screen, thus improving the user experience.
[0142] Based on any of the above embodiments, when controlling the target screen and candidate screens to synchronously execute the display adjustment operation corresponding to the target operation, it is first necessary to determine the candidate screens. In one implementation, the process of determining the candidate screens includes:
[0143] Based on the synchronization and linkage relationship between screens, the candidate screens corresponding to the target screen are determined.
[0144] To elaborate, users can pre-configure synchronization relationships between different screens on devices such as in-vehicle systems via voice, buttons, etc. These synchronization relationships can be as follows:
[0145] The first screen can be linked with the second screen, and the third screen can be linked with the third screen.
[0146] Each screen may or may not have corresponding linked screens. For example, the first screen can be set to link with other screens, or it may not. When no linking relationship is set for this screen, other screens will not perform synchronized operations when the user operates on this screen.
[0147] When setting up a screen to be linked or not linked with other screens, the following settings can be used:
[0148] 1. Users can set the screens via voice commands. For example, if a user says "link the first and second screens," the vehicle's infotainment system can respond to the voice command and set the first and second screens to link.
[0149] 2. Users can set the linkage relationship of each screen through the linkage settings interface on the vehicle system. For example, when configuring the linkage relationship of the first screen, if the user needs to link the second screen with the first screen, the soft switch after the second screen can be turned on.
[0150] 3. Users can set up synchronization relationships on their mobile phones and other terminals, and then synchronize them to the vehicle's infotainment system.
[0151] 4. Users can set up synchronization relationships by specifying actions. For example, in the linkage settings interface, users can use their fingers to draw 1 and 2, and the vehicle system will respond to the action, setting up linkage between the first screen and the second screen.
[0152] In addition, the present invention can also use other methods to set the synchronous linkage relationship. The specific method used can be configured according to the actual scenario.
[0153] In another implementation, the process of determining the candidate screen may further include:
[0154] Based on the synchronous action relationship indicated by the target operation, the candidate screen corresponding to the target screen is determined.
[0155] Specifically, synchronous action relationships can be represented by target operations. In this case, a mapping between operations and synchronous action relationships needs to be pre-configured. For example, when using a finger to zoom in and out, if the user uses a specific finger or a specified number of fingers to zoom, this user operation is considered to have a corresponding synchronous action relationship. If the user uses three fingers to zoom, it is considered that all screens need to be synchronized; if the user uses four fingers to zoom, it is considered that no synchronized operation exists; if the user uses their thumb to zoom, it is considered that only the second screen needs to be synchronized. The mapping between operations and synchronous action relationships can be configured according to actual needs, and this embodiment of the invention does not impose limitations.
[0156] After the synchronization and linkage relationship between screens or the synchronization action relationship indicated by the target operation are pre-configured, after the user operates the target screen, the candidate screen corresponding to the target screen can be determined according to the synchronization and linkage relationship between screens or the synchronization action relationship indicated by the target operation.
[0157] In one embodiment, for a certain target screen, there may be a synchronous linkage relationship between screens and a synchronous action relationship indicated by the target operation. If the two are contradictory, the synchronous action relationship with higher priority can be selected for linkage according to the priority of the synchronous linkage relationship between screens and the synchronous action relationship indicated by the target operation.
[0158] In this embodiment, the synchronous linkage relationship between screens or the synchronous action relationship indicated by the target operation can be set according to user needs to select the candidate screen corresponding to the target screen and realize synchronous operation between any screens.
[0159] Based on any of the above embodiments, after the user selects the initial file to be displayed, such as an initial image, it needs to be processed in order to obtain the target file, such as the target image.
[0160] Specifically, the process of obtaining the target file may include:
[0161] 1) Obtain the initial file.
[0162] In this embodiment, the initial file is the file selected by the user to be displayed in this embodiment of the invention. The initial file can be a statically displayed file such as an initial image, initial video, initial text, or initial webpage. Taking an initial image as an example, the initial image selected by the user is an image with a resolution of (2880×2+136)×1620×10 (the specific multiplier can be set according to requirements). This image is a high-resolution image.
[0163] 2) Generate multiple sub-files corresponding to different file layers of the initial file.
[0164] Specifically, firstly, reference files corresponding to different file layers of the initial file are generated.
[0165] In one implementation, taking the initial image as an example, if the user selects a high-resolution initial image, and the ImageView size is (2880×2+136)×1620 (5986×1620), it cannot accommodate an image that is (2880×2+136)×1620×10 times larger. Therefore, the initial image needs to be scaled. In this embodiment, since the image size is large and the ImageView size is small, the image is shrunk. If the image size is small and the ImageView size is large, the image is enlarged. If the image matches the screen size, no scaling operation is needed.
[0166] At this point, since each screen has the same size, the image scaling value of the initial image can be calculated based on the screen size of any screen and the size (or resolution) of the initial image.
[0167] In this embodiment, taking the initial image as (2880×2+136)×1620×10 times and the first screen as (2880×2+136)×1620 as an example, the image is 10 times the screen size. Therefore, the image scaling value scale = screen size / image size = 0.1 times, that is, it should be reduced to 0.1 times at this time.
[0168] Then, the initial image is scaled down to 0.1 times to obtain the intermediate image, which is an image that matches the size of the ImageView.
[0169] In this embodiment, in order to achieve the effect of no lag, no crash, and no blur after magnification when loading high-definition large images, a file layering and regional loading scheme is used, which can achieve the effect of no lag, no crash, and no blur after magnification when loading high-resolution large files.
[0170] In one implementation, when loading files in layers and regions, the intermediate files need to be processed into layers first, and then the region splitting operation is performed. At this time, the scaling values of different file layers are obtained, and each scaling value is used to scale the same initial file to obtain the reference file for the corresponding file layer.
[0171] The scaling value can be configured according to the actual settings.
[0172] like Figure 7 As shown, taking the initial file as the initial image and the reference file as the reference image as an example, the number of layers to be displayed can be calculated in advance based on the aspect ratio of the initial image and the screen aspect ratio. Figure 7In the example of displaying 3 layers, the 3 layers to be displayed are the first layer, the second layer, and the third layer.
[0173] Each layer is called a file layer. Different file layers are set according to different scaling values. The scaling values of different file layers can be different. For example, the scaling value of the first layer is 0.1-0.5, the scaling value of the second layer is 0.5-1, and the scaling value of the third layer is 1-1.5. The specific scaling value can be configured according to the actual situation.
[0174] Subsequently, the intermediate file can be scaled according to the scaling values for different file levels to obtain the files corresponding to different file levels. These files can be called reference files. For example... Figure 7 It can be seen that the first-level reference documents, the second-level reference documents, and the third-level reference documents can be obtained.
[0175] Then, the reference document is divided using dividing lines to obtain multiple regions.
[0176] Specifically, different file level partition sizes can be configured according to the actual scenario, such as a partition size of 6000×6000 for a certain level. Then, the reference files of the corresponding level are partitioned using dividing lines according to the 6000×6000 size.
[0177] Multiple regions are obtained, each region being a small file. Each small file is then assigned a hierarchical-region number. For example, the small files are numbered as the first region of the first level, the third region of the second level, the fourth region of the third level, and so on. Each small file has a corresponding hierarchical-region number, and different small files have different hierarchical-region numbers to ensure that each small file has a unique number.
[0178] Finally, using the attribute information of the region, the file content corresponding to each region is extracted from the initial file, and the scaling operation corresponding to the file layer is performed on the file content to obtain multiple sub-files corresponding to each file layer.
[0179] In practical scenarios, a Rect is created for each small file. Based on the coordinate mapping relationship between the reference file and the initial file, the region coordinates of each small file are set. These region coordinates refer to the region coordinates of the small file on the initial file. These region coordinates include multiple coordinate points, such as the coordinates of the four vertices, and may also include the coordinates of other key points. Key points can be such as the center point, and may also include the coordinates of each pixel, depending on the actual configuration.
[0180] Then, based on the attribute information of the region where each small file is located, such as the region coordinate level and region number, the file content is directly extracted from the initial file using a region-based cropping method. For example, if the scaling value of the first layer is 0.1-0.5, then the cropped file is scaled by 0.1-0.5. Finally, the small files are written to the local disk according to the layer-coordinate naming convention. Subsequent reading of small files is more performance-efficient and faster than directly cropping regions from a large image, resulting in a smooth and crash-free experience. In addition, because the initial file has a higher resolution, screenshots taken from it will be clearer, resulting in a high-definition and blur-free effect even when enlarged.
[0181] In this embodiment, the small file in the screenshot can be called a sub-file. That is, through the cropping operation, multiple sub-files corresponding to each file layer can be obtained and stored. The sub-files have corresponding attribute information; the attribute information includes the file level, region, and region coordinates corresponding to the sub-file. Taking a certain sub-file as an example, its attribute information is the first region of the first layer, and the coordinates of the four vertices in the region coordinates are (x1, y1), (x2, y2), (x3, y3), and (x4, y4).
[0182] It should be noted that the execution order of the various steps in the embodiments of the present invention can be configured according to requirements and is not limited to the above-described execution order.
[0183] 3) Select multiple sub-files at the outermost level as the target file.
[0184] After obtaining the sub-files of each file layer, the target file in this embodiment of the invention consists of multiple sub-files at the outermost file layer.
[0185] The outermost file level refers to the first level mentioned above, with a scaling value of 0.1-0.5. The intermediate file refers to the file obtained by scaling down the initial file by a factor of 0.1. Since 0.1 is within the scaling value range of the first level, multiple sub-files of the first level can be directly used as target files.
[0186] It should be noted that at this point, all the sub-files in the first layer will be displayed in the ImageView. However, due to screen size limitations, only a portion of the file will be visible. Therefore, only the visible portion will be rendered. For example, the driver's screen will only render and display the left side of the file; the right side, which extends beyond the screen, cannot be displayed due to screen limitations. However, when the file is dragged, the right side of the file will be rendered and displayed. Similarly, the passenger's screen will only display the right side of the file; the left side, which extends beyond the screen, cannot be displayed due to screen limitations. However, when the file is dragged, the left side of the file will be displayed.
[0187] For example Figure 8 As shown, the width of the driver and passenger screens is 2880×1620, and the physical gap between the driver and passenger screens is 136. Assuming the image size is (2880×2+136)×1620×10, which is 58960×16200, then... Figure 8 As shown, the blue area on the screen is the physical screen, the gray area is the ImageView, the black area is the physical gap between the driver's screen (also known as the central control screen) and the passenger's screen, and the purple area is the initial image, which is the original image size, i.e., 58960×16200.
[0188] In a real-world scenario, the driver's ImageView has the same width and height as the screen and is rendered left-aligned, following the left alignment of its parent container. Similarly, the passenger's ImageView has the same width and height as the screen and is rendered right-aligned, following the right alignment of its parent container. The final display effect of the driver's and passenger's screens is shown below. Figure 8 The final combined image shows that the images displayed on both screens are continuous and uninterrupted, with the dual-screen setup appearing as a single image on the same screen.
[0189] In this embodiment, by generating multiple sub-files corresponding to different file layers of the initial file, the file is loaded layer by layer and region by region, resulting in a smooth, uninterrupted, and high-definition effect when zoomed in.
[0190] Based on any of the above embodiments, after dividing the file into layers and regions, controlling the target screen and candidate screens to synchronously execute the display adjustment operation corresponding to the target operation may include:
[0191] The first component performs a display adjustment operation on the target screen according to the file display adjustment information corresponding to the target operation, and synchronizes the file display adjustment information to the second component so that the second component synchronously performs a display adjustment operation on the candidate screen according to the file display adjustment information.
[0192] To elaborate, when a user interacts with the target screen, if there are candidate screens that are synchronized with the target screen, then the display of both the target screen and the candidate screens will be adjusted synchronously.
[0193] When performing synchronized display adjustments, it is necessary to adjust the file display information according to the target operation. The corresponding file display adjustment information will differ depending on the content of the target operation. In practical scenarios, the appropriate sub-files corresponding to the layer can be selected for display based on user actions such as zooming, double-clicking to enlarge, dragging (also known as panning or sliding). The file display adjustment operations using the corresponding display adjustment information will differ depending on the user's operation, and will be described separately below.
[0194] In one implementation, the target operation is a scaling operation.
[0195] When the target operation is a zoom operation, the sliding distance of the user's finger on the target screen is obtained, a first target zoom value and a first file center point corresponding to the sliding distance are determined, a first layer corresponding to the first target zoom value is determined, and multiple sub-files corresponding to the first layer are displayed based on the first file center point. The file display adjustment information includes the first target zoom value and the first file center point.
[0196] Specifically, in real-world scenarios, if a user feels the current file is too small and needs to zoom in, they can use two fingers to swipe across the screen. To zoom in, the two fingers move further apart; to zoom out, they move closer together.
[0197] If the user performs a zoom operation, the two ImageViews will listen for the gesture operation event. When it is determined that the user has a zoom requirement, the user's finger can be swiped on the target screen. This swiping distance can be the distance that the two fingers gradually move closer or further apart.
[0198] Then, the first target scaling value and the first file center point corresponding to the sliding distance are calculated. That is, the scale and center values of the file are calculated based on the sliding distance of the finger on the screen. The specific calculation process can be implemented using appropriate algorithms. At this time, the scale and center values of the file are the file display adjustment information in this embodiment of the invention.
[0199] The first component controlling the target screen, namely the ImageView of the target screen, performs file adjustment operations according to the file's scale and center values as described above. Simultaneously, the first component sends the file display adjustment information to the second component controlling the candidate screen, such as the corresponding ImageView. The ImageView also synchronously performs file adjustment operations on the candidate screen according to the file's scale and center values as described above.
[0200] In one implementation, the first component performs a display adjustment operation on the target screen according to the file display adjustment information corresponding to the target operation, including:
[0201] The target layer corresponding to the file display adjustment information is determined, and multiple sub-files corresponding to the target layer are rendered on the target screen using the first component.
[0202] The target layer refers to the layer used when performing the display adjustment operation corresponding to the target operation in this embodiment of the invention.
[0203] In one embodiment, the target layer is one of the file layers, and the multiple sub-files corresponding to the target layer are obtained by segmenting regions from the initial file according to the target layer. The generation process of the multiple sub-files corresponding to the target layer is the same as the generation process of the multiple sub-files corresponding to the file layer.
[0204] The process of generating multiple sub-files corresponding to the file layer includes:
[0205] Generate reference files for different file layers corresponding to the initial file;
[0206] The reference document is divided using dividing lines to obtain multiple regions;
[0207] Using the attribute information of the region, the file corresponding to each region is extracted from the initial file, and the extracted file is subjected to a scaling operation corresponding to the file layer to obtain multiple sub-files corresponding to each file layer.
[0208] It should be noted that the specific implementation of this embodiment is described in the corresponding description above.
[0209] In practice, since different file layers have set corresponding scaling value ranges, the scaling value range corresponding to the first target scaling value can be determined, and then the corresponding file layer can be determined. For example, the file layer corresponding to this scaling operation is the second layer, which is the target layer in this embodiment of the invention.
[0210] Subsequently, multiple sub-files corresponding to the second layer can be displayed based on the center point of the first file. Specifically, the first component can render multiple sub-files corresponding to the target layer on the target screen based on the center point of the first file. It should be noted that the first component can render all sub-files corresponding to the target layer, or it can only render the sub-files that are displayed on the screen, and then render and display the corresponding sub-files when the user drags the screen.
[0211] In one implementation, such as Figure 9As shown, upon obtaining the initial file, the number of layers to be displayed has been calculated based on the file's aspect ratio and the screen's aspect ratio. Each layer is then divided into smaller images, and the vertex coordinates of these smaller images are set. These coordinates are then used to extract regions from the larger image (i.e., the initial file) and write them to the local disk. Therefore, the local disk stores multiple sub-files corresponding to each file layer. The specific implementation process is detailed in the descriptions above.
[0212] Then, when it is necessary to display the target layer, such as multiple sub-files of the second layer, it is first determined whether the multiple sub-files corresponding to the target layer are stored on the disk.
[0213] In theory, based on the above-described operations of splitting and writing to the local disk, the disk should store multiple sub-files corresponding to the second layer. However, due to possible disk damage, program errors, or other reasons, the multiple sub-files corresponding to the second layer stored on the local disk may be missing, such as multiple sub-files being missing.
[0214] Therefore, in this embodiment, after creating an Activity and setting an ImageView, before loading the large image (i.e., the initial file), the ImageView first calculates the coordinates of the smaller images to be loaded, such as the area coordinates of multiple sub-files in the second layer. Then, it reads the coordinates from the local disk. If the disk contains multiple sub-files corresponding to the target layer, it retrieves these stored sub-files and uses the first component to render them on the target screen. Specifically, the first component reads the multiple sub-files corresponding to the target layer from the disk, determines the center point of each sub-file, sets it as the first file center point, and renders the smaller images (i.e., the sub-files) using file layering technology, thus displaying them on the screen.
[0215] In another implementation, if due to certain special reasons, such as disk damage or program errors, the local disk does not contain the corresponding sub-files for the second layer or the sub-files are partially missing, then in the absence of multiple sub-files corresponding to the target layer, the unstored sub-files in the multiple sub-files corresponding to the target layer will be extracted from the initial file, and the multiple sub-files will be rendered on the target screen using the first component.
[0216] Specifically, the sub-files corresponding to the target layer that are not stored in the file library are extracted from the large image, i.e., the initial file, and then displayed according to the center point of the first file. Additionally, the sub-files extracted from the initial file are stored on the disk for caching, saving extraction operations and improving efficiency when the user performs the same operation again. It should be noted that, besides being stored on the disk, they can also be stored in other storage components such as a database.
[0217] In this embodiment, the user zooms in or out of the file. For example, during a zoom-in operation, the zoomed-in effect is shown in the reference image. Figure 8 The leftmost image in the bottom-most file. At this point, the first and second components respectively control the zooming operation of the file on their respective screens.
[0218] In one implementation, the target operation is drag and drop.
[0219] When the target operation is dragging, the sliding distance of the user's finger on the target screen is obtained, the file translation value corresponding to the sliding distance is determined, and the target file is translated and displayed according to the file translation value. The file display adjustment information includes the file translation value.
[0220] Specifically, if a user wants to view other areas of the file, they can drag and drop the file. For example, a finger can drag the file up, down, left, or right. At this time, two ImageViews listen for gesture operation events. When they determine that the user has a dragging requirement, they can obtain the sliding distance of the user's finger on the target screen. Then, using the calculation relationship between the sliding distance and the file translation value, they can calculate the file translation value corresponding to the sliding distance and translate the target file according to the file translation value.
[0221] The effect of dragging to the left (or right) is shown in the image below. Figure 8 The corresponding rendering at the bottom layer.
[0222] In drag-and-drop scenarios, the drag-and-drop process is implemented in the same way as the zoom-in process described above, only the operation method is different.
[0223] In one implementation, the target operation is double-click to zoom in.
[0224] When the target operation is double-click zoom, a second target scaling value and a second file center point corresponding to the double-click zoom operation are determined. A target layer corresponding to the second target scaling value is then determined, and multiple sub-files corresponding to the target layer are displayed based on the second file center point. The file display adjustment information includes the second target scaling value and the second file center point.
[0225] In real-world scenarios, to facilitate quick zooming when a user needs to zoom in or out, this embodiment of the invention provides a double-tap zoom function. If a user double-tap on the screen, it is considered that the user needs to zoom in. Two ImageViews listen for gesture events, and when a double-tap zoom is detected, the file zoom operation can be performed.
[0226] In practical scenarios, compared to the finger zoom operation described above, the double-tap zoom operation allows for arbitrary zoom ratios, while double-tap zoom provides a fixed zoom ratio; the rest of the implementation process is the same. Therefore, when a user performs a double-tap zoom, the second target zoom value and the second file center point corresponding to the double-tap zoom operation are determined. The target layer corresponding to the second target zoom value is then determined, and multiple sub-files corresponding to the target layer are displayed based on the second file center point. The specific implementation process is described in the corresponding explanation above.
[0227] In this embodiment, users are supported to perform operations such as scaling and dragging files, so that users can perform corresponding operations on files according to their own needs.
[0228] When a user performs a target operation on the target screen, the candidate screens simultaneously perform a corresponding operation. Taking the target screen as the first screen as an example, if a file on the first screen is double-clicked to zoom in, the second screen will also simultaneously perform a double-click to zoom in. To achieve synchronization between the two screens, a monitoring operation can be pre-configured. When a change in file display adjustment information is detected, the display adjustment operation corresponding to the target operation is executed on the target file on the target screen. Simultaneously, if the file display adjustment information changes, the file display adjustment information is synchronized to the second component.
[0229] like Figure 10 As shown, when displaying files, for the driver's screen, an ImageView is initialized and its size is set to 5896×1620. The ImageView is left-aligned with its parent layout, so only the left side of the file is displayed on the driver's screen. The right side, which extends beyond the screen, cannot be displayed due to screen physical limitations. However, when the file is zoomed in and dragged, the right side of the file can be displayed. The same treatment is applied to the passenger's screen.
[0230] Then, the driver's ImageView is set to listen for gestures. If a change in file display adjustment information is detected, such as a callback to scale and center the driver's ImageView, this will be synchronized to the passenger's ImageView. The passenger's ImageView will perform the same processing. Furthermore, when dragging a file, the file's translation value can also be reflected through the center.
[0231] Subsequently, a listener is set up for scale and center changes in the passenger-side ImageView. Once the scale and center values of the passenger-side ImageView are received, they are synchronously set on the driver-side ImageView. The imageView can then be scaled or panned based on touch gestures. The same process is applied to the passenger-side screen.
[0232] Based on the above logic, when an operation is performed on a file on one screen (such as zooming, panning, double-clicking to enlarge, dragging, or swiping), the other screen executes the operation synchronously, without interruption, delay, or lag. When a swipe reaches the top, bottom, left, or right edge of a file on one screen, the other screen simultaneously swipes to the same position.
[0233] In this embodiment, the ImageViews on the two screens monitor each other's scale and center values of the file. When the ImageView detects a change in these two values, it synchronizes the changes with the ImageView on the other screen. Upon receiving the callback, the ImageView on the other screen sets the corresponding parameters to achieve synchronized file adjustment. The file adjustment process is the same for both ImageViews.
[0234] As can be seen from the above, through the control logic described above, the left and right parts of the file are loaded on both screens of the dual-screen setup, allowing the two parts of the image to be displayed synchronously on both screens, and to scale and pan synchronously with gestures. The final effect looks like a large image of size (2880×2+136)×1620 is loaded on the same screen. The dual-screen images are completely synchronized, and loading high-resolution files can be done without lag, crashes, or blurring when enlarged.
[0235] In the above embodiments, when candidate screens exist, the target screen and the candidate screens are controlled to synchronously perform display adjustment operations according to the file display adjustment information corresponding to the target operation. If no candidate screens exist, only the target screen is controlled to perform the display adjustment operation corresponding to the target operation, and the display state of the target file on the other screens among the plurality of screens remains unchanged.
[0236] Specifically, when multiple screens are configured on the vehicle and the screen operated by the user is not linked with other screens, only the ImageView controlling the target screen controls the target screen to perform the corresponding operation, while the other screens do not perform the corresponding linked operation, so as to satisfy the effect of the user viewing different file areas on different screens.
[0237] It should be noted that the specific implementation process of the multi-screen synchronous interaction strategy, such as component configuration, file splitting, screen settings, etc., is only one embodiment as explained in the manual, and there may be other implementation methods, which are not limited in any particular way.
[0238] Based on the embodiments of the above-described document display method, another embodiment of this application provides a document display device, referring to... Figure 11 It can include:
[0239] The file display module 11 is used to acquire a target file and display the target file on multiple screens; each screen displays a portion of the content of the target file.
[0240] The display adjustment module 12 is used to control the target screen and the candidate screen to synchronously perform the display adjustment operation corresponding to the target operation when a target operation is detected to be performed on the target file on the target screen.
[0241] In one implementation, the target screen is at least one of the plurality of screens, and the candidate screen is one of the plurality of screens that needs to be operated synchronously with the target screen.
[0242] In one implementation, the file display module 11 includes:
[0243] The display method determination submodule is used to determine the target display method of the target file on each of the multiple screens;
[0244] The display submodule is used to display the target file on the corresponding screen according to the target display method.
[0245] One implementation also includes a candidate screen determination module, which is specifically used for:
[0246] Based on the synchronization and linkage relationship between screens, the candidate screens corresponding to the target screen are determined.
[0247] Alternatively, based on the synchronous action relationship indicated by the target operation, a candidate screen corresponding to the target screen can be determined.
[0248] In one implementation, the display adjustment module 12 includes:
[0249] The first adjustment submodule is used to perform the display adjustment operation of the target screen by using the first component to display adjustment information according to the file corresponding to the target operation;
[0250] The second adjustment submodule is used to synchronize the file display adjustment information to the second component, so that the second component can synchronously perform the display adjustment operation of the candidate screen according to the file display adjustment information.
[0251] In one implementation, the first adjustment submodule includes:
[0252] The layer determination unit is used to determine the target layer corresponding to the file display adjustment information;
[0253] A rendering unit is used to render multiple sub-files corresponding to the target layer on the target screen using the first component.
[0254] In one implementation, the rendering unit includes:
[0255] The rendering subunit is used to extract the unstored subfiles from the multiple subfiles corresponding to the target layer from the initial file when the multiple subfiles corresponding to the target layer are not stored, and to render the multiple subfiles on the target screen using the first component.
[0256] One implementation also includes a file generation module, which includes:
[0257] The first file generation submodule is used to generate reference files for different file layers corresponding to the initial file;
[0258] The partitioning submodule is used to perform a partitioning operation on the reference file using dividing lines to obtain multiple regions;
[0259] The extraction submodule is used to extract the file content corresponding to each region from the initial file using the attribute information of the region;
[0260] The second file generation submodule is used to perform scaling operations on the file content corresponding to the file layer to obtain multiple sub-files corresponding to each file layer; the target layer is one of the file layers.
[0261] In one implementation, the first file generation submodule is specifically used for:
[0262] Multiple scaling values are obtained, and each scaling value is used to scale the initial file to obtain a reference file for the corresponding file layer.
[0263] In one implementation, the display adjustment module 12 is further used for:
[0264] Only the target screen is controlled to perform the display adjustment operation corresponding to the target operation, while the display state of the target file on other screens among the multiple screens remains unchanged.
[0265] In this embodiment, in a multi-screen scenario, a target file is acquired and displayed on multiple screens. Each screen displays a portion of the target file's content. When a target operation is detected on the target file on the target screen, the target screen and candidate screens are controlled to synchronously execute the display adjustment operation corresponding to the target operation. This achieves synchronous display and adjustment of the same file on multiple screens while displaying a portion of the target file's content on each screen, improving the intelligence of displaying the same file on multiple screens and enhancing the user experience.
[0266] It should be noted that the working process of each module, submodule and unit in this embodiment is described in the corresponding description in the above embodiment, and will not be repeated here.
[0267] This application embodiment also provides an electronic device, including at least one processor and a memory connected to the processor, wherein:
[0268] The memory is used to store computer programs;
[0269] The processor is used to execute the computer program so that the electronic device can implement the above-described file display method.
[0270] refer to Figure 12 The diagram illustrates a structural schematic suitable for implementing the electronic device in the embodiments of this application. The electronic device in the embodiments of this application may include, but is not limited to, fixed terminals such as vehicle controllers, mobile phones, laptops, PDAs (Personal Digital Assistants), PADs (Portable Application Devices), desktop computers, etc. Figure 12 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0271] like Figure 12 As shown, the electronic device may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in ROM 602 or a program loaded into RAM 603 from storage device 608. When the electronic device is powered on, RAM 603 also stores various programs and files required for the operation of the electronic device. The processing unit 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.
[0272] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, memory cards, hard drives, etc.; and communication devices 609. Communication device 609 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange files. Although Figure 12 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have instead.
[0273] This application also provides a file display system, including the aforementioned electronic device and multiple screens. Each screen uses a corresponding ImageView to adjust the file display. The specific implementation process is described in the above description.
[0274] This application also provides a computer program product including computer-readable instructions, which, when executed on an electronic device, cause the electronic device to implement any of the file display methods provided in this application.
[0275] This application also provides a computer-readable storage medium that carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any of the file display methods provided in this application.
[0276] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and 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 modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.
[0277] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0278] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.
[0279] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line, DSL) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs (Digital Versatile Discs)), or semiconductor media (e.g., solid-state drives (SSDs)).
Claims
1. A method for displaying documents, characterized in that, include: Obtain the target file and display the target file on multiple screens; Each screen displays a portion of the target file; If a target operation is detected on the target file on the target screen, the target screen and the candidate screen are controlled to synchronously perform the display adjustment operation corresponding to the target operation.
2. The document display method according to claim 1, characterized in that, The target screen is at least one of the plurality of screens, and the candidate screen is one of the plurality of screens that needs to be operated synchronously with the target screen.
3. The document display method according to any one of claims 1-2, characterized in that, Display the target file on multiple screens, including: Determine the target display method of the target file on each of the multiple screens; The target file is displayed on the corresponding screen according to the target display method.
4. The document display method according to any one of claims 1-3, characterized in that, The process of determining the candidate screen includes: Based on the synchronization and linkage relationship between screens, the candidate screens corresponding to the target screen are determined. Alternatively, based on the synchronous action relationship indicated by the target operation, a candidate screen corresponding to the target screen can be determined.
5. The document display method according to any one of claims 1-4, characterized in that, Controlling the target screen and candidate screens to synchronously execute display adjustment operations corresponding to the target operation includes: The first component is used to adjust the display of the target screen according to the file display adjustment information corresponding to the target operation. The file display adjustment information is synchronized to the second component, so that the second component synchronously performs the display adjustment operation of the candidate screen according to the file display adjustment information.
6. The document display method according to claim 5, characterized in that, Using the first component to adjust the file display information corresponding to the target operation, the display adjustment operation of the target screen is performed, including: Determine the target layer corresponding to the file display adjustment information; The first component is used to render multiple sub-files corresponding to the target layer on the target screen.
7. The document display method according to claim 6, characterized in that, The first component renders multiple sub-files corresponding to the target layer on the target screen, including: If the multiple sub-files corresponding to the target layer are not stored, the sub-files that are not stored in the multiple sub-files corresponding to the target layer are extracted from the initial file; The first component is used to render the multiple sub-files on the target screen.
8. The document display method according to any one of claims 6-7, characterized in that, The process of generating multiple sub-files corresponding to the target layer includes: Generate reference files for different file layers corresponding to the initial file; The reference document is divided using dividing lines to obtain multiple regions; Using the attribute information of the regions, extract the file content corresponding to each region from the initial file; The file content is scaled according to the file layer to obtain multiple sub-files corresponding to each file layer; the target layer is one of the file layers.
9. The document display method according to claim 8, characterized in that, Generate reference files for different file layers corresponding to the initial file, including: Get the scaling values of different file layers; Each of the aforementioned scaling values is used to scale the same initial file to obtain a reference file for the corresponding file layer.
10. The document display method according to any one of claims 1-9, characterized in that, After displaying the target file on multiple screens, the process also includes: Only the target screen is controlled to perform the display adjustment operation corresponding to the target operation, while the display state of the target file on other screens among the multiple screens remains unchanged.
11. A document display device, characterized in that, include: The file display module is used to acquire the target file and display the target file on multiple screens; Each screen displays a portion of the target file; The display adjustment module is used to control the target screen and the candidate screen to synchronously perform the display adjustment operation corresponding to the target operation when a target operation is detected to be performed on the target file on the target screen.
12. An electronic device, characterized in that, It includes at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program to enable the electronic device to implement the document display method as described in any one of claims 1 to 10.
13. A document display system, characterized in that, Includes the electronic device as described in claim 12 and multiple screens.
14. A computer storage medium, characterized in that, The storage medium carries one or more computer programs, which, when executed by an electronic device, enable the electronic device to implement the file display method as described in any one of claims 1 to 10.