Upgrading method for screen mirroring device and screen mirroring device
By using partition data identifiers in the screen transmission device to update the upgrade program data to the old version storage partition, the problem of poor upgrade compatibility of the screen transmission device is solved, and the normal operation of the device during the upgrade process and the improvement of user experience are achieved.
Patent Information
- Application Number
- PCT/CN2024/139453
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-04-12
- Filing Date
- 2024-12-16
- Publication Date
- 2025-10-16
AI Technical Summary
The screen transmission device has poor compatibility issues during the firmware upgrade process, resulting in it being unable to function normally when the upgrade fails, affecting the user experience.
Partition data identification is used to determine the storage partition in the screen transmission device that stores the newer version, and the upgrade program data is updated to the old version storage partition to ensure that the newer version of the program data can still be used for system startup and function operation during the upgrade process.
Improved the compatibility and reliability of screen mirroring device upgrades, ensuring that the device can still be used normally during the upgrade process or after a failure, improving the user experience.
Smart Images

Figure CN2024139453_16102025_PF_FP_ABST
Abstract
Description
An upgrading method of a screen transmission device and the screen transmission device
[0001] The present application claims priority to the Chinese Patent Application No. 202410440276.5, filed on April 12, 2024, and entitled "An upgrading method of a screen transmission device and the screen transmission device", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0002] Embodiments of the present application relate to the field of screen transmission technology, for example, to an upgrading method of a screen transmission device and the screen transmission device. BACKGROUND
[0003] With the development of Internet technology, electronic devices are various in types and have various uses. In some scenarios, users have an increasingly strong demand for convenient sharing of display content between multiple electronic devices, and screen transmission technology can meet this demand of users to a great extent.
[0004] Screen transmission technology is to realize communication connection and content sharing between electronic devices through a screen transmission device. In use, when there is a need for firmware upgrading, the screen transmission device needs to be inserted into a corresponding electronic device through a corresponding interface module to perform firmware upgrading, and subsequent pairing connection and content sharing can be performed based on the upgraded firmware.
[0005] In related technologies, after the screen transmission device is inserted into the corresponding electronic device, the electronic device transmits a replacement file to the screen transmission device through the interface module, and the screen transmission device performs replacement based on the replacement file. In this way, when there is an unexpected pause or upgrade failure during the upgrading, partial file replacement is performed based on the upgrading, which leads to the inability to roll back the version, and thus incompatibility occurs, resulting in the screen transmission device being unable to be normally used. Therefore, the upgrading method of the screen transmission device in related technologies has poor compatibility, resulting in poor user experience. SUMMARY
[0006] Embodiments of the present application provide an upgrading method of a screen transmission device and the screen transmission device, which can solve the problem of poor compatibility of the screen transmission device upgrading, improve the compatibility and reliability of the screen transmission device upgrading, and improve the user experience.
[0007] In a first aspect, embodiments of the present application provide an upgrading method of a screen transmission device, for a screen transmission device, the screen transmission device including a first memory, the first memory including a first storage partition and a second storage partition, a version of screen transmission program data stored in the first storage partition being different from a version of screen transmission program data stored in the second storage partition, the upgrading method of the screen transmission device including:
[0008] In a case where the screen transmission device is connected with the terminal device, a start trigger signal is received, and in response to the start trigger signal, a partition data identifier is read from the preset identifier bit, the partition data identifier being used to indicate a first target storage partition, the first target storage partition being a storage partition in the first memory that stores the screen transmission program data of the relatively new version;
[0009] The first target storage partition and a second target storage partition are determined from the first storage partition and the second storage partition according to the partition data identifier, the second target storage partition being a storage partition in the first memory that stores the screen transmission program data of the old version;
[0010] The system is started according to the screen transmission program data in the first target storage partition;
[0011] If an upgrade trigger signal is received, in response to the upgrade trigger signal, upgrade program data is received, the version of the upgrade program data being newer than the version of the screen transmission program data in the first target storage partition;
[0012] The upgrade program data is updated into the second target storage partition to upgrade the screen transmission program data of the old version in the second target storage partition;
[0013] After the update of the upgrade program data is completed, the partition data identifier is updated.
[0014] According to the above, the first target storage partition in the first memory that stores the screen transmission program data of the relatively new version is determined according to the partition data identifier, and the upgrade program data is updated into the second target storage partition, so that even in a case where the update process is paused or fails, the screen transmission device can still use the original screen transmission program data of the relatively new version in the first target storage partition to start the system and run the function, thereby avoiding the problem of poor compatibility of the screen transmission device upgrade, improving the compatibility and reliability of the screen transmission device upgrade, and ensuring that in a case where the screen transmission device normally operates, whether the update of the upgrade program data is successful or not does not affect the normal use of the screen transmission device at present and the normal operation of the next start, thereby improving the user experience.
[0015] In an embodiment, each storage partition includes a first sub-partition and a second sub-partition, the first sub-partition being used to store first-type program data of a basic screen projection function, and the second sub-partition being used to store second-type program data of a preset function;
[0016] The upgrade program data is updated into the second target storage partition to upgrade the screen transmission program data of the old version in the second target storage partition, including:
[0017] A type identifier in the upgrade program data is acquired;
[0018] According to the type identifier, a data type of the upgrade program data is determined, the data type including a first type and a second type;
[0019] When the data type is the first type, the upgrade program data is updated into the first sub-partition in the second target storage partition to upgrade the first type program data in the first sub-partition;
[0020] When the data type is the second type, the upgrade program data is updated into the second sub-partition in the second target storage partition to upgrade the second type program data in the second sub-partition.
[0021] The above, by updating the upgrade program data corresponding to the first type into the first sub-partition of the second target storage partition, the upgrade update of the screen transmission program data in the first sub-partition is realized, and the erasure update of the data block in the first sub-partition is realized. Or update the upgrade program data corresponding to the second type to the second sub-partition of the second target storage partition, to realize the upgrade update of the screen transmission program data in the second sub-partition, and realize the erasure update of the data block in the second sub-partition. Compared with the replacement update mode of the whole large file in the related art, the embodiment improves the orderliness of the upgrade work by updating and upgrading each sub-partition respectively, reduces the granularity of the upgrade, thereby helping to improve the work speed of the upgrade, and when a problem occurs in the upgrade process, the problem position can be found more accurately, thereby improving the work efficiency of the upgrade program data improvement.
[0022] In an embodiment, when the data type is the second type, the upgrade program data is updated into the second sub-partition in the second target storage partition to upgrade the second type program data in the second sub-partition, comprising:
[0023] When the data type is the second type, the second sub-partition is mounted into the system device list by the mounting tool;
[0024] The upgrade program data is updated into the second sub-partition mounted in the system device list by the update writing tool to upgrade the second type program data in the second sub-partition.
[0025] In an embodiment, the upgrade program data is updated into the second target storage partition to upgrade the old version of the screen transmission program data in the second target storage partition, comprising:
[0026] Each data block in the second target storage partition is processed one by one to erase the screen transmission program data originally stored in the data block, to obtain an empty data block without data;
[0027] The upgrade program data is written into the empty data block one by one until the writing is completed.
[0028] In an embodiment, updating the upgrade program data into the second target storage partition to upgrade the old version of the screen transmission program data in the second target storage partition comprises:
[0029] According to the sub-partition identifier, the upgrade program data is updated into the corresponding sub-partition in the second target storage partition to upgrade the old version of the screen transmission program data in the corresponding sub-partition.
[0030] In an embodiment, the screen transmission device further comprises a second memory;
[0031] In the case where the screen transmission device is connected with the terminal device, after receiving the start trigger signal, the method comprises:
[0032] In response to the start trigger signal, the initialization processing of the second memory is performed;
[0033] After completing the initialization processing of the second memory, the first boot program is started, and the first boot program is a two-level boot program;
[0034] According to the screen transmission program data in the first target storage partition, the system is started, which comprises:
[0035] According to the execution of the first boot program, the first type of program data in the first sub-partition in the first target storage partition is copied to the second memory;
[0036] According to the execution of the first boot program, the first type of program data is decompressed in the second memory to obtain first executable program data;
[0037] The first executable program data is read and executed to realize the basic screen transmission function start.
[0038] The above, through the two-level boot program based on the screen transmission program data stored in the first memory to guide the system start, based on the code amount of the two-level boot program is less than the first level boot program, therefore its corresponding boot system start needed time is less than the first level boot program, in order to avoid the problem of long time of screen transmission device start, shorten the start time, thereby improving the user experience.
[0039] In an embodiment, according to the execution of the first boot program, the first type of program data is decompressed in the second memory to obtain first executable program data, which comprises:
[0040] According to the execution of the first boot program, the first type of program data is decompressed in the second memory to obtain a kernel image and a root file system;
[0041] The first executable program data is read and executed to realize the basic screen transmission function start, which comprises:
[0042] read and execute the kernel image to start running of the kernel;
[0043] decompress the root file system according to the running of the kernel;
[0044] mount the decompressed root file system to implement start of the basic screen projection function.
[0045] According to the above, after starting the first boot program, according to the running of the first boot program, the first type of program data in the first sub-partition in the first target storage partition is copied to the second memory, and the processor (MCU or CPU) can implement start of the basic screen projection function according to the first type of program data in the second memory. After the start of the basic screen projection function is completed, the screen transmission device can run the application corresponding to the basic screen projection function, for example, the screen transmission application, that is, the technical effect of screen transmission can be achieved. For the user experience, at this time, the start has been completed, therefore, the priority start of the basic screen projection function in the embodiment is faster than the simultaneous start of all functions in the related art, so as to improve the user experience.
[0046] In an embodiment, after mounting the decompressed root file system to implement start of the basic screen projection function, the method comprises the following steps:
[0047] According to the running of the kernel, the second sub-partition in the first target storage partition is mounted to the system device list;
[0048] According to the running of the kernel, the second type of program data in the mounted second sub-partition is copied to the second memory;
[0049] According to the running of the kernel, the second type of program data in the second memory is read and executed to implement start of the preset function.
[0050] According to the above, by starting the preset function corresponding to the second sub-partition after starting the basic screen projection function, compared with the simultaneous start of the basic screen projection function and the preset function in the related art, the embodiment greatly shortens the start time, thereby improving the user experience.
[0051] In an embodiment, after completing the initialization processing of the second memory, starting the first boot program comprises the following steps:
[0052] According to the first boot program, a burning trigger signal is detected;
[0053] When the burning trigger signal is detected, the second boot program is started and the initial program data is received in response to the burning trigger signal;
[0054] The initial program data is burned into the storage partition corresponding to the first memory through the second boot program;
[0055] After the burning is completed, the initial program data in the first memory is copied to the second memory by the second boot program;
[0056] System startup is performed according to the second boot program and the initial program data in the second memory.
[0057] In a second aspect, the embodiments of the present application provide a screen transmission device, comprising an interface module, a first memory and a processor, the first memory comprising a first storage partition and a second storage partition, a version of screen transmission program data stored in the first storage partition being different from a version of screen transmission program data stored in the second storage partition,
[0058] The interface module is connected with the processor, and the processor is connected with the first memory;
[0059] The interface module is configured to be connected with a terminal device, and send a startup trigger signal to the processor based on the connection, and the interface module is further configured to receive an upgrade trigger signal sent by the terminal device and send the upgrade trigger signal to the processor;
[0060] The processor is configured to receive the startup trigger signal, read a partition data identifier from a preset identifier bit in response to the startup trigger signal, determine a first target storage partition and a second target storage partition from the first storage partition and the second storage partition according to the partition data identifier, and start the system according to screen transmission program data in the first target storage partition, the partition data identifier being configured to indicate the first target storage partition, the first target storage partition being a storage partition in the first memory that stores a relatively new version of screen transmission program data, and the second target storage partition being a storage partition in the first memory that stores an old version of screen transmission program data;
[0061] The processor is further configured to, if the upgrade trigger signal is received, receive upgrade program data in response to the upgrade trigger signal, and update the upgrade program data to the second target storage partition, so as to upgrade the old version of screen transmission program data in the second target storage partition, the version of the upgrade program data being newer than the version of the screen transmission program data in the first target storage partition;
[0062] The processor is further configured to update the partition data identifier after the update of the upgrade program data is completed.
[0063] The embodiment of the present application can determine the first target storage partition in the first memory storing the relatively new version of the screen transmission program data through the partition data identifier, and update the upgrade program data to the second target storage partition, so that even in the case of suspension or update failure during the update process, the original relatively new version of the screen transmission program data in the first target storage partition can still be used for system startup and function running, thereby avoiding the problem of poor compatibility of the screen transmission device upgrade, improving the compatibility and reliability of the screen transmission device upgrade, so that in the case of normal operation of the screen transmission device, whether the update of the upgrade program data is successful or not does not affect the current normal use of the screen transmission device and the normal operation of the next startup, thereby improving the user experience. BRIEF DESCRIPTION OF DRAWINGS
[0064] FIG. 1 is a flowchart of a screen transmission device upgrade method according to an embodiment of the present application;
[0065] FIG. 2 is a structural schematic diagram of a first memory according to an embodiment of the present application;
[0066] FIG. 3 is a sub-partition distribution schematic diagram according to an embodiment of the present application;
[0067] FIG. 4 is a flowchart of another screen transmission device upgrade method according to an embodiment of the present application;
[0068] FIG. 5 is a structural schematic diagram of a screen transmission device according to an embodiment of the present application. DETAILED DESCRIPTION
[0069] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application will be further described in detail below with reference to the drawings. It can be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application. In addition, it should be noted that, for the convenience of description, only the parts related to the present application are shown in the drawings, but not all the contents. Before discussing the example embodiments in more detail, it should be mentioned that some example embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the operations (or steps) as sequential processes, many of the operations can be implemented in parallel, concurrently or simultaneously. In addition, the order of the operations can be rearranged. The processes can be terminated when the operations are completed, but can also have additional steps not included in the drawings. The processes can correspond to methods, functions, procedures, subroutines, subprograms, etc.
[0070] The related technology generally inserts the screen transmission device into the corresponding terminal device, and the terminal device transmits the replacement file to the screen transmission device through the interface module, and the screen transmission device performs replacement processing based on the replacement file. In this way, when an unexpected pause or upgrade failure occurs during the upgrade process, partial file replacement is performed based on the upgrade, which results in the inability to roll back the version, and thus incompatibility occurs, thereby causing the screen transmission device to be unable to function normally. The upgrade method of the related technology requires re-burning of the firmware to start the device and use the function after an unexpected pause or upgrade failure occurs during the upgrade process, which seriously affects the user experience. In addition, when the firmware is upgraded in the related technology, the normal function of the screen transmission device needs to be paused, and after the screen transmission device is upgraded and restarted, the system starts and the function runs based on the new version of the firmware, which requires the user to waste time waiting for the upgrade to complete, which also seriously affects the user experience. Therefore, the upgrade method of the screen transmission device in the related technology has poor compatibility and reliability, resulting in poor user experience. Based on this, the embodiments of the present application provide an upgrade method of a screen transmission device and a screen transmission device, which aims to determine a first target storage partition in which the first memory stores the relatively new version of the screen program data through partition data identification during the upgrade, and update the upgrade program data to a second target storage partition. Even in the case of an unexpected pause or update failure during the update process, the system can still start and function using the original relatively new version of the screen program data in the first target storage partition, which can avoid the problem of poor compatibility of the screen transmission device upgrade. Compared with the way of replacing the entire file of the upgrade firmware file in the related technology, the method of the present embodiment can improve the compatibility and reliability of the screen transmission device upgrade. Whether the update of the upgrade program data is successful or not does not affect the normal use of the screen transmission device and the normal operation of the next start, and even in the case of an unexpected pause or update failure of the screen program data in the second target storage partition, the system can still start and function using the original relatively new version of the screen program data in the first target storage partition, thereby improving the user experience.
[0071] FIG. 1 shows a flowchart of an upgrade method of a screen transmission device according to an embodiment of the present application. The upgrade method of the screen transmission device provided in the present embodiment can be executed by a screen transmission device, which can be implemented by software and / or hardware. The screen transmission device can be composed of two or more physical entities, or one physical entity.
[0072] The following describes an example of a transmission screen device as the main body of an upgrade method for the transmission screen device. Referring to FIG. 1, the upgrade method for the transmission screen device is used for a transmission screen device, which includes a first memory including a first storage partition and a second storage partition, and the version of transmission screen program data stored in the first storage partition is different from the version of transmission screen program data stored in the second storage partition. The upgrade method for the transmission screen device includes the following steps.
[0073] S101, in the case where the transmission screen device is connected with a terminal device, a start trigger signal is received, and in response to the start trigger signal, a partition data identifier is read from a preset identifier bit, the partition data identifier is used to indicate a first target storage partition, and the first target storage partition is a storage partition in the first memory that stores transmission screen program data of a relatively new version.
[0074] The transmission screen device can be connected with a terminal device through a corresponding interface module to perform power-on and interaction. The start trigger signal can be understood as a power-on signal or a reset signal. The power-on signal can be a power-on signal transmitted by the terminal device and received by the transmission screen device after the transmission screen device is connected with the terminal device through the corresponding interface module. The reset signal can be a restart signal triggered by a corresponding virtual control or hardware button. When the transmission screen device receives the start trigger signal, the system is started in response to the start trigger signal. When starting the system, the first storage partition and the second storage partition exist in the first memory, so it is necessary to determine the transmission screen program data in which storage partition to start the system. The version of transmission screen program data stored in the first storage partition is different from the version of transmission screen program data stored in the second storage partition, so the first target storage partition can be indicated by the partition data identifier, and the first target storage partition is a storage partition in the first memory that stores transmission screen program data of a relatively new version. Therefore, when the transmission screen device receives the start trigger signal, the partition data identifier is read from the preset identifier bit in response to the start trigger signal to determine the current first target storage partition in the first memory. It should be noted that, in addition to the first target storage partition, another storage partition in the first memory that stores transmission screen program data of an old version is a second target storage partition.
[0075] S102, the first target storage partition and the second target storage partition are determined from the first storage partition and the second storage partition according to the partition data identifier, and the second target storage partition is a storage partition in the first memory that stores transmission screen program data of an old version.
[0076] When the screen transmission device receives the start trigger signal, the partition data identifier is read from the preset identifier bit in response to the start trigger signal, and the first target storage partition and the second target storage partition are determined from the first storage partition and the second storage partition according to the partition data identifier. The first target storage partition is a storage partition in the first storage that stores a screen transmission program data of a newer version, and the second target storage partition is a storage partition in the first storage that stores a screen transmission program data of an old version. The above, by storing different versions of screen transmission program data in two storage partitions in the first storage, when the screen transmission program data in any storage partition cannot be used, the screen transmission program data in the other storage partition can be used for system startup and function running, avoiding the influence of the user experience caused by the failure of the screen transmission device to run, thereby improving the operation reliability of the screen transmission device, and further improving the user experience.
[0077] S103, starting the system according to the screen transmission program data in the first target storage partition.
[0078] The screen transmission program data of the newer version in the first target storage partition is copied to the second storage, which is used to temporarily store the corresponding screen transmission program data during startup, and the screen transmission program data in the second storage is read and executed to start the system. It should be noted that starting the system can be one-key screen transmission, which automatically triggers screen transmission after starting the system; or based on manual triggering of screen transmission, screen transmission operation is performed after starting the system.
[0079] The above, when receiving the start trigger signal, the system is started based on the screen transmission program data of the newer version in the first target storage partition, so that the system is started based on the current screen transmission program data of the newer version in the first storage and subsequent function running, thereby improving the system operation performance of the screen transmission device.
[0080] S104, if the upgrade trigger signal is received, the upgrade program data is received in response to the upgrade trigger signal, and the version of the upgrade program data is newer than the version of the screen transmission program data in the first target storage partition.
[0081] The upgrade trigger signal can be understood as a signal triggered when there is an upgrade demand. The upgrade trigger signal can be triggered by the screen transmission device itself, or by the terminal device connected to the screen transmission device. The upgrade trigger signal can be triggered by a virtual control or a hardware key. After the system of the screen transmission device is started, when the upgrade trigger signal is received, the upgrade program data transmitted by the terminal device is received in response to the upgrade trigger signal. It should be noted that the version of the upgrade program data is newer than the version of the screen transmission program data in the first target storage partition.
[0082] S105, updating the upgrade program data into the second target storage partition to upgrade the old version of the screen transmission program data in the second target storage partition.
[0083] After the screen transmission device receives the upgrade program data, it is also necessary to determine which storage area in the first memory to update the upgrade program data. Based on the foregoing, at the system startup, the first target storage partition and the second target storage partition have been determined from the first storage partition and the second storage partition according to the partition data identification. Therefore, when the upgrade trigger signal is received, the upgrade program data is updated into the second target storage partition in response to the upgrade trigger signal to upgrade the old version of the screen transmission program data in the second target storage partition. It should be noted that the second target storage partition is another storage partition in the first memory except the first target storage partition.
[0084] The above, by updating the upgrade program data into the second target storage partition, even in the case of accidental pause or update failure during the update of the upgrade program data, the original relatively new version of the screen transmission program data in the first target storage partition can still be used for system startup and function running, which can avoid the problem of poor compatibility of the screen transmission device upgrade, improve the compatibility and reliability of the screen transmission device upgrade, and the normal use of the screen transmission device is not affected whether the update of the upgrade program data is successful or not, thereby improving the user experience.
[0085] S106, updating the partition data identification after the update of the upgrade program data is completed.
[0086] After the update of the upgrade program data is completed, it is proved that the storage partition storing the upgrade program data (i.e. the aforementioned second target storage partition) has been updated to the first target storage partition in the first memory which stores the relatively new version of the screen transmission program data. Therefore, the partition data identification is updated to indicate that the storage partition after the update becomes the storage partition in the first memory which stores the relatively new version of the program data, i.e. the second target storage partition after the update of the upgrade program data is completed becomes the first target storage partition. By updating the partition data identification after the update of the upgrade program data is completed, the storage partition in the first memory which currently stores the relatively new version of the screen transmission program data can be determined according to the partition data identification when the system is started subsequently, and the system startup and function running are performed based on the relatively new version of the screen transmission program data in the first memory, thereby improving the system running performance of the screen transmission device.
[0087] According to the above technical means, the first target storage partition in the first memory storing the program data of the relatively new version can be determined according to the partition data identifier, and the upgrade program data is updated to the second target storage partition storing the program data of the old version, even if the update process is accidentally paused or fails, the system can still be started and the function can be run using the original program data of the relatively new version in the first target storage partition, thereby avoiding the problem of poor compatibility of the screen transmission device upgrade, improving the compatibility and reliability of the screen transmission device upgrade, so that in the case of normal operation of the screen transmission device, whether the update of the upgrade program data is successful or not does not affect the current normal use of the screen transmission device and the normal operation of the next start, thereby improving the user experience.
[0088] In the foregoing S101 step, at the time of the upgrade trigger in the present embodiment, the upgrade update can be performed in the background on the basis of the normal start and normal operation of the screen transmission device, so that the current normal use of the user can not be affected. Before the upgrade trigger is performed, the start of the screen transmission device needs to be performed first, and after the screen transmission device is started, it can be determined whether the upgrade trigger needs to be performed according to actual needs. The screen transmission device further includes a second memory, wherein the first memory is used to store the screen transmission program data, and the second memory is used to temporarily store the corresponding screen transmission program data during the start or upgrade, for example, the second memory can be a memory. During the system start process, when the screen transmission device receives a start trigger signal, in response to the start trigger signal, the second memory is started and the initialization processing of the second memory is performed first. After the initialization processing of the second memory is completed, the first boot program is started to guide the system start through the first boot program.
[0089] The first boot program is a secondary boot program, for example, an SPL. The SPL (secondary program loader) can be loaded by the bootrom as a second-level boot image (bl2) in the startup chain, which is mainly used to complete the initialization of some basic modules and the DDR (i.e., the second memory), and load the next level of image. In the fast startup scenario of the embodiment, the system can be directly booted through the secondary boot program. The boot program data corresponding to the first boot program is stored in the first memory, which can be stored in any storage partition in the first memory, or can be stored in each storage partition in the first memory. When the screen transmission device receives a power-on signal or a reset signal, the first boot program (i.e., the secondary boot program) is loaded into the second memory through an automatic loading mechanism, for example, the boot program data is loaded (copied) to the second memory through the automatic loading mechanism. After the copying is completed, the processor (MCU or CPU) can read the boot program data from the second memory and execute the read boot program data to start the first boot program. As described above, after receiving the startup signal, the second memory is first started and initialized to provide a basic environment for subsequent system startup, facilitating the smooth progress of the subsequent process, thereby improving the overall work efficiency of the startup. After the initialization of the second memory is completed, the first boot program is started through the automatic loading mechanism, so that the system can be subsequently booted according to the first boot program, and the system is booted through the secondary boot program (i.e., the first boot program, for example, the SPL) with less code. Compared with the way of booting the system through the primary boot program (for example, uboot) with a large amount of code in the related art, the secondary boot program has less code, and its own startup time is relatively short, thereby shortening the overall time of system startup and improving the work efficiency of system startup.
[0090] When the first boot program guides the system to start, based on the two storage partitions in the first memory, different versions of the screen transmission program data are stored. In an embodiment, based on comparing the new version of the screen transmission program data, the system starts and the system runs. Therefore, after starting the first boot program, according to the running of the first boot program, the partition data identifier is read from the preset identifier bit, and the first target storage partition and the second target storage partition in the current first memory are determined according to the partition data identifier. FIG. 2 is a structural schematic diagram of a first memory provided in an embodiment of the present application. Referring to FIG. 2, the first memory 102 provided in the embodiment includes a first storage partition 1021 and a second storage partition 1022, and the first storage partition 1021 and the second storage partition 1022 are used to store different versions of the screen transmission program data. For example, the first storage partition 1021 stores the screen transmission program data of version 2.0, and the second storage partition 1022 stores the screen transmission program data of version 1.0. At this time, the first storage partition 1021 is the current first target storage partition, and the second storage partition 1022 is the current second target storage partition. It should be noted that if the version of the screen transmission program data is upgraded subsequently, and the screen transmission program data in the upgraded second storage partition 1022 is the relatively new version, then the second storage partition 1022 is the first target storage partition. The first target storage partition can be indicated by the partition data identifier. The partition data identifier can be read from the preset identifier bit. For example, when the value of the partition data identifier corresponding to the preset identifier bit boot_flag is 1, the first target storage partition is the first storage partition 1021; when the value of the partition data identifier corresponding to the preset identifier bit boot_flag is not 1, for example, boot_flag = 0, it is determined that the first target storage partition is not the first storage partition 1021, that is, it can be understood that the first target storage partition is the second storage partition 1022. As described above, the partition data identifier can be read from the preset identifier bit, and the current first target storage partition is determined to be which storage partition in the first memory according to the read partition data identifier, that is, it is determined that which storage partition in the current first memory stores the relatively new version of the screen transmission program data. Subsequently, according to the running of the first boot program, the screen transmission program data in the first target storage partition can be directly copied to the second memory, so as to guide the execution of the corresponding screen transmission program data in the first target storage partition, and the system starts and the function runs.
[0091] In step S101, after starting the first boot program, according to the running of the first boot program, the partition data identifier is read from the preset identifier bit, and the current first target storage partition is determined according to the partition data identifier. The first target storage partition is a storage partition in the current first memory that stores a program data of a newer version. For example, when the partition data identifier corresponding to the preset identifier bit boot_flag corresponds to a value of 1, the first target storage partition is the storage partition 1021. According to the first boot program, the screen transmission program data in the first target storage partition (i.e., the first storage partition 1021) is copied to the second memory, so as to start the system based on the screen transmission program data in the second memory. As described above, after the first boot program guides the screen transmission device to start the system, the screen transmission device can be normally used. In the case of normal use of the screen transmission device, corresponding upgrade processing is performed according to the upgrade requirement, for example, when an upgrade trigger signal is received, steps S104-S106 are executed.
[0092] In the foregoing step S101, each storage partition in the first memory includes a first sub-partition and a second sub-partition. The first sub-partition is used to store first type program data of a basic screen projection function, and the second sub-partition is used to store second type program data of a preset function. For the screen transmission device, the application corresponding to the basic screen projection function can be a screen projection application, and the application corresponding to the preset function can be a UI application and a USB driver application. For the basic screen projection function corresponding to the first type program data, it is necessary to be started quickly in priority, so as to maintain the basic screen projection function. The preset function corresponding to the second type program data can be started later, that is, the preset function can be started again on the basis of maintaining the basic screen projection function. Therefore, after starting the first boot program, according to the running of the first boot program, the first type program data in the first sub-partition in the first target storage partition is copied to the second memory. The processor (MCU or CPU) can read the first type program data from the second memory and execute the read first type program data, so as to realize the start of the basic screen projection function. After the basic screen projection function is started, the screen transmission device can run the application corresponding to the basic screen projection function, for example, a screen transmission application, that is, the technical effect of screen transmission can be realized. For the user experience, at this time, the start has been completed. Therefore, compared with the simultaneous start of all functions in the related art, the priority start of the basic screen projection function in this embodiment has a faster start speed, thereby improving the user experience.
[0093] After the first target storage partition is determined according to the above embodiments, the positions of the corresponding first sub-partition and second sub-partition in the first target storage partition can be determined according to the bit code of the sub-partition. FIG. 3 is a sub-partition distribution diagram provided by an embodiment of the present application. As shown in FIG. 3, for example, the first target storage partition includes a first sub-partition (Boot_1 partition) and a second sub-partition (Appfs_1 partition). The position of the first sub-partition (Boot_1 partition) in the first memory can be determined according to the bit code 0x00400000-0x03400000 of the first sub-partition. The position of the second sub-partition (Appfs_1 partition) in the first memory can be determined according to the bit code 0x06400000-0x012C0000 of the second sub-partition. When the first type program data in the corresponding first sub-partition in the first target storage partition is copied to the second memory, the first type program data can be acquired and copied according to the bit code 0x00400000-0x03400000 of the first sub-partition (Boot_1 partition) to the corresponding position in the first memory.
[0094] It should be noted that, as shown in FIG. 3, the storage partition includes other sub-partitions in addition to the first sub-partition and the second sub-partition, such as a Part+spl sub-partition, a vnvm sub-partition, a uboot sub-partition, and a reserver sub-partition. The Part+spl sub-partition is used to store partition parameters, boot program data of the first boot program, and is responsible for booting subsequent partitions. The vnvm sub-partition is used to store some non-volatile data, which can be read / written at each stage of system startup. The uboot sub-partition is used to store boot program data of the second boot program.
[0095] When the base projection function is started, the first program data can be compressed and stored, and thus, after the first program data is copied to the second memory, corresponding decompression processing needs to be performed, and then subsequent data reading can be performed. For example, the first program data is a FIT image. The FIT (Flattened Image Tree) image refers to an image file generated by compiling multiple images through the dts (Device Tree Source) syntax. For example, a device tree, a kernel image, and a root file system are compressed into a FIT image. Thus, after the first program data of the first sub-partition of the first target storage partition is copied to the second memory, the first program data is decompressed in the second memory according to the first boot program, and a corresponding kernel image and a root file system are obtained. The kernel image and the root file system can be understood as the first executable program data. The kernel image refers to a binary image file of an operating system kernel, which contains core code and data structures required for operating system running. Subsequently, the kernel of the operating system can be started and run according to the kernel image. The root file system is the first file system mounted (read-only mounted) after the computer operating system is started, which contains key files and directories required for system booting and enabling system running. The root file system contains most of the contents other than the operating system kernel, including various library files, device files, configuration files, application programs, and user data. The root file system provides a basic environment required for operating system running. When the system is started, the kernel is first loaded into the second memory and executed, and then the kernel mounts the root file system and reads necessary configurations and programs from the root file system to initialize the system.
[0096] Based on the second sub-partition in the first target storage partition for storing the second type of program data of the preset function, since the second type of program data is in the UBIFS format, the second sub-partition needs to be mounted to the system device list first, and the mounted second sub-partition can be queried by the processor (MCU or CPU). Therefore, after the aforementioned starting of the kernel and loading of the root file system, the second type of program data of the second sub-partition in the first target storage partition is mounted to the system device list according to the running of the kernel. Based on the processor being able to query the second sub-partition in the system device list, the second type of program data in the second sub-partition mounted in the system device list is copied to the second memory. According to the running of the kernel, the second type of program data in the kernel is read and executed to realize the starting of the preset function, such as starting the UI application and / or the USB drive application and other preset functions. For example, when the preset function is the USB drive application, after the starting is completed, the corresponding CD drive is popped up in the display screen of the terminal device in communication connection with the screen transmission device and the USB drive application is popped up. As described above, by starting the preset function corresponding to the second sub-partition after starting the basic screen projection function, compared with the way of starting the basic screen projection function and the preset function at the same time in the related art, the starting time is greatly shortened, thereby improving the user experience.
[0097] As described above, by the secondary boot program booting the system to start based on the screen transmission program data stored in the first memory, the code amount of the secondary boot program is less than that of the primary boot program, and therefore the time consumption required for booting the system to start based on the secondary boot program is also less than that of the primary boot program. In this way, the problem of long time consumption for starting the screen transmission device can be avoided, the starting time is shortened, and therefore the user experience is improved.
[0098] In the foregoing S104 step, after the foregoing screen transmission device is started by the first boot program, the screen transmission device and the terminal device communicate based on the use of the screen transmission function in the screen transmission process. The terminal device learns the version information of the current screen transmission program data in the screen transmission device through the use of the screen transmission function. The terminal device queries whether there is an updated version of the screen transmission program data (i.e., upgrade program data) through the corresponding browser according to the version information. When an updated version of the screen transmission program data is detected, for example, version 3.0 of the screen transmission program data is detected, the terminal device downloads the corresponding upgrade program data (i.e., version 3.0 of the screen transmission program data) from the browser and sends it to the screen transmission device. When an updated version of the screen transmission program data is detected, an upgrade trigger signal can be generated by the terminal device, or the terminal device can send an upgrade reminder information to the screen transmission device, and the screen transmission device generates an upgrade trigger signal based on the upgrade reminder information. When the screen transmission device receives the upgrade trigger signal, the upgrade program data is received in response to the upgrade trigger signal. By reading the partition data identifier when starting the system, it can be determined which storage partition corresponds to the current first target storage partition, for example, according to the partition data identifier, it is determined that the current first target storage partition is the first storage partition 1021, which is used to store version 2.0 of the screen transmission program data; the second target storage partition is the second storage partition 1022, which is used to store version 1.0 of the screen transmission program data. When the device is started, the screen transmission program data in the first target storage partition (i.e., the first storage partition 1021) is used for startup. If the screen transmission program data in the first target storage partition (i.e., the first storage partition 1021) is directly upgraded and updated at this time, it will affect the normal operation of the screen transmission device at the current time. Therefore, the screen transmission program data in the second target storage partition (i.e., the second storage partition 1022) can be upgraded and updated. The screen transmission program data currently running in the screen transmission device is irrelevant to the screen transmission program data in the second target storage partition (i.e., the second storage partition 1022). Therefore, by upgrading and updating the screen transmission program data in the second target storage partition (i.e., the second storage partition 1022), the upgrade can be realized without affecting the current system operation of the screen transmission device. The received upgrade program data (e.g., version 3.0 of the screen transmission program data) can be updated to the second target storage partition (i.e., the second storage partition 1022) so that the screen transmission program data in the second target storage partition (i.e., the second storage partition 1022) is upgraded and updated. It should be noted that the version of the received upgrade program data is newer than the version of the screen transmission program data stored in the first target storage partition (i.e., the first storage partition 1021), for example, the version of the screen transmission program data stored in the first target storage partition is 2.0, and the version of the upgrade program data is 3.0.Therefore, updating the received upgrade program data to the second target storage partition (i.e., the second storage partition 1022) can enable the screen transmission program data in the upgraded storage partition (i.e., the second storage partition 1022) to be upgraded to a relatively new version in the current first storage, i.e., the screen transmission program data stored in the updated second storage 1022 is version 3.0. As described above, by updating the upgrade program data to the second target storage partition (i.e., the second storage partition 1022), the old version of the screen transmission program data in the second target storage partition (i.e., the second storage partition 1022) is upgraded. Even if an unexpected pause or update failure occurs during the updating process, the screen transmission device can still perform system startup and function operation based on the original screen transmission program data in the first target storage partition (i.e., the first storage partition 1021). Compared with the file replacement method in the related art, the related art cannot be normally started and used when an unexpected pause or update failure occurs during the updating process. However, the method of the present embodiment can improve the compatibility and reliability of the screen transmission device upgrade. Whether the upgrade program data is successfully updated to the first storage or not, it does not affect the normal use of the screen transmission device. When an unexpected pause or update failure occurs in the updating of the screen transmission program data in the second target storage partition (i.e., the second storage partition 1022), the original screen transmission program data in the first target storage partition (i.e., the first storage partition 1021) can still be used to perform system startup and function operation, thereby improving the user experience.
[0099] In the foregoing S105, each storage partition in the first memory includes a first sub-partition and a second sub-partition. The first sub-partition is used to store first program data of a basic screen projection function, and the second sub-partition is used to store second program data of a preset function. For the screen transmission device, the application corresponding to the basic screen projection function can be a screen projection application, and the application corresponding to the preset function can be a UI application and a USB driver application. Therefore, when the program is upgraded, the upgrade program data can be divided into the first program data and the second program data, the first program data is updated to the first sub-partition in the second target storage partition, and the second program data is updated to the second sub-partition in the second target storage partition, so as to realize independent upgrade of different sub-partitions, avoid the problem of upgrade program data of part of functions affecting the upgrade of other functions, and improve the reliability of the upgrade. Therefore, the data type of the upgrade program data can include a first type and a second type, wherein the first type corresponds to the first program data of the basic screen projection function, and the second type corresponds to the second program data of the preset function. Therefore, when the version of the screen transmission program data in the second target storage partition is updated, it can be determined which sub-partition is upgraded according to the data type of the received upgrade program data. After receiving the upgrade program data, the type identifier in the upgrade program data is obtained, and it is determined whether the upgrade program data is of the first type or the second type. It should be noted that the received upgrade program data can include the first type and the second type, and therefore the upgrade program data can be divided into the upgrade program data of the first type and the upgrade program data of the second type according to the type identifier in the upgrade program data. Subsequently, the first sub-partition and the second sub-partition can be upgraded based on the upgrade program data of the corresponding type.
[0100] When the data type of the upgrade program data is the first type, the upgrade program data is updated to the first sub-partition in the second target storage partition to upgrade the first type program data in the first sub-partition. When updating, each data block in the first sub-partition can be processed by erasing each data block one by one to erase the original screen transmission program data stored in the data block, so as to obtain an empty data block without data. Then, the upgrade program data (of the first type) is written into the empty data block one by one until the writing is completed, that is, the update and upgrade of the first type program data in the first sub-partition can be realized. In the above, the upgrade program data corresponding to the first type is updated to the first sub-partition of the second target storage partition to realize the upgrade and update of the first type program data in the first sub-partition, and the erasure and update of the data block in the first sub-partition. Compared with the replacement and update mode of the whole large file in the related art, the embodiment improves the orderliness of the upgrade work, reduces the granularity of the upgrade, thereby helping to improve the work speed of the upgrade, and when a problem occurs in the upgrade process, the problem position can be found more accurately, and then the work efficiency of the upgrade program data improvement can be improved.
[0101] When the data type of the upgrade program data is the second type, the upgrade program data is updated to the second sub-partition in the second target storage partition to upgrade the second type program data in the second sub-partition. When updating, the second sub-partition is mounted into the system device list based on the second type program data corresponding to the second sub-partition being in the UBIFS format, so that the second sub-partition after being mounted can be queried by the processor (MCU or CPU) and can be written by the processor (MCU or CPU) to update the program data. Therefore, when it is confirmed that the upgrade program data is of the second type, the second sub-partition is mounted into the system device list by a mounting tool. For example, the mounting tool can be the ubiattach tool. Based on the processor being able to query the second sub-partition in the system device list, the upgrade program data is updated to the second sub-partition mounted in the system device list by an update writing tool to upgrade the second type program data in the second sub-partition. For example, the update writing tool can be the ubiupdatevol tool. When the upgrade program data is updated to the second sub-partition by the update writing tool, each data block in the second sub-partition can be erased one by one to erase the original screen transmission program data stored in the data block, so as to obtain an empty data block without data. Then, the upgrade program data (of the second type) is written into the empty data block by the update writing tool (such as the ubiupdatevol tool) in sequence until the writing is completed, that is, the update and upgrade of the second type program data in the second sub-partition can be realized. In the above, the upgrade program data corresponding to the second type is updated to the second sub-partition of the second target storage partition to realize the upgrade and update of the second type program data in the second sub-partition, and the data block in the second sub-partition is erased and updated. Compared with the replacement and update mode of the entire large file in the related art, the embodiment improves the orderliness of the upgrade work, reduces the granularity of the upgrade, and thus helps to improve the work speed of the upgrade, and when a problem occurs in the upgrade process, the problem position can be found more accurately, and thus the work efficiency of the upgrade program data improvement can be improved.
[0102] In the foregoing S105, the positions of the first and second sub-partitions in the second target storage partition can be determined according to the bit code of the sub-partition. As shown in FIG. 3, for example, the second target storage partition includes a first sub-partition (Boot_2 partition) and a second sub-partition (Appfs_2 partition), the position of the first sub-partition (Boot_2 partition) in the first memory can be determined according to its bit code 0x03400000-0x06400000, and the position of the second sub-partition (Appfs_2 partition) in the first memory can be determined according to its bit code 0x012C0000-0x1F400000. When updating the upgrade program data to the first sub-partition (Boot_2 partition) in the second target storage partition, the upgrade program data can be updated to the corresponding position in the first memory according to the bit code 0x03400000-0x06400000 of the first sub-partition (Boot_2 partition). When updating the upgrade program data to the second sub-partition (Appfs_2 partition) in the second target storage partition, the upgrade program data can be updated to the corresponding position in the first memory according to the bit code 0x012C0000-0x1F400000 of the second sub-partition (Appfs_2 partition).
[0103] In the foregoing S105, the sub-partition to which the upgrade program data is to be written can also be determined according to the sub-partition identification number in the upgrade program data. The upgrade program data includes a corresponding sub-partition identification number, for example, as shown in FIG. 3, assuming that the sub-partition identification number of the first sub-partition (Boot_2 partition) in the second target storage partition is mtd5, the first sub-partition (Boot_2 partition) in the first memory can be determined according to the sub-partition identification number mtd5, i.e., the fifth sub-partition in the first memory, which is the Boot_2 partition. It should be noted that in an embodiment, the sub-partition identification number (value) can be set according to actual conditions, and when the upgrade program data is generated, the corresponding upgrade program data can be generated according to the preset sub-partition identification number, and when upgrading later, the sub-partition identification number in the upgrade program data can be used to determine which sub-partition the upgrade program data is to be updated to. For example, the position of the corresponding sub-partition in the first memory can be determined according to the bit code of the sub-partition, as shown in FIG. 3, the bit code of the fifth sub-partition (Boot_2 partition) in the first memory is 0x03400000-0x06400000. After determining that the fifth sub-partition in the first memory corresponds to the sub-partition identification number mtd5, the upgrade program data can be updated to the corresponding position in the first memory according to the bit code 0x03400000-0x06400000 of the fifth sub-partition (Boot_2 partition) in the first memory.
[0104] The above, the position of the corresponding sub-partition in the first memory is determined by the bit code of the sub-partition, when the upgrade program data is written into the first sub-partition or the second sub-partition, the position of the data writing can be directly determined according to the bit code of the first sub-partition or the bit code of the second sub-partition, so as to improve the speed of data update writing, and further improve the overall work efficiency of the upgrade.
[0105] In the foregoing S106 step, when the first sub-partition and / or the second sub-partition in the second target storage partition is updated and written, the partition data identifier is updated. When the upgrade program data is only the upgrade program data of the basic screen projection function corresponding to the first sub-partition, the partition data identifier is updated after the first sub-partition in the second target storage partition is updated and written. When the upgrade program data is only the upgrade program data of the preset function corresponding to the second sub-partition, the partition data identifier is updated after the second sub-partition in the second target storage partition is updated and written. When the upgrade program data is the upgrade program data of the basic screen projection function and the preset function corresponding to the entire second target storage partition, that is, after the first sub-partition and the second sub-partition are both updated and written, the partition data identifier is updated. It should be noted that the partition data identifier is stored in the corresponding parameter record sub-partition, for example, the Part+spl sub-partition in FIG. 3.
[0106] It should be noted that after the screen transmission device is started, the screen transmission device does not actively read the partition data identifier, therefore, updating the partition data identifier after the upgrade does not affect the current screen transmission being performed.
[0107] On the basis of the foregoing embodiment, FIG. 4 is a flowchart of another screen transmission device upgrade method provided by the embodiment of the application, referring to FIG. 4, the screen transmission device upgrade method comprises:
[0108] S201, detecting a burning trigger signal according to the first boot program.
[0109] After the foregoing first boot program is started, the detection of the burning trigger signal needs to be performed. The burning trigger signal can be automatically triggered when used for the first time, or can be manually triggered based on the user after being used for the first time. It can be triggered by a corresponding burning trigger button (which can be a virtual button or a hardware button). When the burning trigger signal is detected, the subsequent S202-S205 are executed to perform the burning process and the system startup process. When the burning trigger signal is not detected, the foregoing S101-S106 are executed to perform the system startup process and the upgrade process.
[0110] S202, when the burning trigger signal is detected, the second boot program is started and the initial program data is received in response to the burning trigger signal, and the second boot program is a primary boot program.
[0111] When the burning trigger signal is detected, and there is no program data in the first memory in the screen transmission device or the program data in the first memory is unavailable, the initial program data needs to be burned before the system startup. The first boot program (secondary boot program) cannot directly perform the burning operation, and therefore the second boot program (primary boot program, for example, Uboot) needs to be started to guide the burning operation. Therefore, when the burning trigger signal is detected, the second boot program (i.e., the primary boot program, for example, Uboot) is started in response to the burning trigger signal. After the second boot program is started, the initial program data is received from the terminal device in communication connection with the screen transmission device according to the running of the second boot program, and the initial program data is subsequently burned into the first memory, and the corresponding system startup operation and system upgrade operation can be subsequently performed based on the initial program data.
[0112] S203, burn the initial program data into the corresponding storage partition of the first memory according to the second boot program.
[0113] According to the running of the second boot program, the initial program data is received and burned into the corresponding storage partition of the first memory, i.e., the first storage partition or the second storage partition. When neither of the two storage partitions in the first memory has the corresponding screen transmission program data burned therein, the initial program data can be burned into any storage partition, and after the burning is completed, the storage partition in which the initial program data is burned is the first target storage partition, which can be indicated by a partition data identifier.
[0114] S204, after the burning is completed, copy the initial program data in the first memory to the second memory according to the second boot program.
[0115] After the burning is completed, the corresponding initial program data exists in the first memory, and therefore the initial program data in the first memory can be copied to the second memory according to the running of the second boot program, so that the processor can perform the system startup according to the program data in the second memory. It should be noted that after the burning is completed, the storage partition in which the initial program data is burned is the current first target storage partition, i.e., the storage partition in which the initial program data is burned is the storage partition in which the more recent version of the screen transmission program data is stored in the current first memory, i.e., the initial program data is the more recent version of the screen transmission program data in the current first memory.
[0116] S205, perform the system startup processing according to the second boot program and the initial program data in the second memory.
[0117] After the initial program data is copied to the second memory, the initial program data in the second memory is read and executed according to the running of the second boot program, so as to implement the system startup.
[0118] The above, by detecting the burning trigger signal, only using the larger code amount of the first boot program (i.e. the second boot program) to burn the screen transmission program data and the subsequent system startup. In actual use, usually the first time needs to be burned, and the subsequent probability does not need to be burned again, so in actual use, except for the first time, the system startup of the screen transmission device is performed by the method of S101-S103.
[0119] The above, by detecting the burning trigger signal, only using the larger code amount of the first boot program (i.e. the second boot program) to burn the screen transmission program data and the subsequent system startup. In actual use, usually the first time needs to be burned, and the subsequent probability does not need to be burned again, so in actual use, except for the first time, the system startup of the screen transmission device is performed by the method of S101-S103.
[0120] On the basis of the above embodiments, FIG. 5 is a structural schematic diagram of a screen transmission device provided in the embodiments of the present application. With reference to FIG. 5, the screen transmission device 10 provided in the embodiments of the present application includes an interface module 101, a first memory 102, a second memory 103, and a processor 104. The first memory 102 includes a first storage partition 1021 and a second storage partition 1022. The version of the screen transmission program data stored in the first storage partition 1021 is different from the version of the screen transmission program data stored in the second storage partition 1022. The interface module 101 can be a USB interface or a Type-C interface. The screen transmission device 10 is connected with a corresponding terminal device through the interface module 101. For example, assuming that the terminal device is a smart tablet, the screen transmission device 10 is connected with the smart tablet through the interface module 101. Inside the screen transmission device 10, the interface module 101 is connected with the processor 104. The interface module 101 is used to connect with the terminal device and send a start trigger signal to the processor based on the connection. The interface module is also used to receive an upgrade trigger signal sent by the terminal device and send the upgrade trigger signal to the processor. When the screen transmission device 10 is connected with the corresponding terminal device through the interface module 101, the terminal device supplies power to the screen transmission device 10 through the interface module 101 and communicates and interacts with the screen transmission device 10 through the interface module 101, for example, the terminal device transmits an upgrade trigger signal and upgrade program data to the screen transmission device 10 through the interface module 101. The first memory 102 can be understood as a storage medium with a large storage capacity, for example, a Nand flash storage medium. The second memory 103 can be understood as a temporary memory with a small storage capacity and fast read-write speed, for example, a memory. The first memory 102 and the second memory 103 are both connected with the processor 104. The processor 104 is used to receive a start trigger signal, read a partition data identifier from a preset identifier bit in response to the start trigger signal, determine a first target storage partition and a second target storage partition from the first storage partition 1021 and the second storage partition 1022 according to the partition data identifier, and start a system according to the screen transmission program data in the first target storage partition. The partition data identifier is used to indicate the first target storage partition. The first target storage partition is a storage partition in the first memory that stores a relatively new version of the screen transmission program data. The second target storage partition is a storage partition in the first memory that stores an old version of the screen transmission program data. The processor is also used to, if an upgrade trigger signal is received, receive upgrade program data in response to the upgrade trigger signal, update the upgrade program data to the second target storage partition, and upgrade the old version of the screen transmission program data in the second target storage partition. The version of the upgrade program data is newer than the version of the screen transmission program data in the first target storage partition. The processor is also used to update the partition data identifier after the update of the upgrade program data is completed.The above, by dividing two storage partitions in the first memory 102, that is, the first storage partition 1021 and the second storage partition 1022, at the device startup, the system is started according to the comparison of the new version of the screen transmission program data currently stored in the first target storage partition, and when upgrading, the upgrade program data is updated to the second target storage partition to upgrade the old version of the screen transmission program data in the second target storage partition. Even in the case of suspension or update failure during the update process, the system can still be started and run using the original comparison of the new version of the screen transmission program data in the first target storage partition. In this way, the problem of poor compatibility of the screen transmission device 10 can be avoided, and the compatibility and reliability of the screen transmission device 10 upgrade can be improved. In the case of normal operation of the screen transmission device 10, whether the upgrade program data update is successful or not does not affect the current normal use of the screen transmission device 10 and the normal operation of the next start, thereby improving the user experience.
[0121] In an embodiment, the second memory 103 can be a DDR3 memory, and the memory capacity of the DDR3 memory can be 256M.
[0122] In an embodiment, as shown in FIG. 5, the screen transmission device 10 further includes a key 105, the key 105 is connected with the processor 104, and the key 105 is used for one-key screen transmission, that is, when the key 105 is triggered, a start trigger signal is generated and transmitted to the processor 104, and the processor 104 receives the start trigger signal and executes the foregoing S101-S106 steps.
[0123] In an embodiment, the key 105 is also used to generate a burning trigger signal, and when the key 105 is long-pressed, the burning trigger signal is generated and transmitted to the processor 104, and the processor 104 receives the burning trigger signal and executes the foregoing S201-S205 steps.
[0124] In an embodiment, the screen transmission device 10 further includes an interface conversion module 106, the interface conversion module 106 is connected with the interface module 101 and the processor 104, and the interface conversion module 106 is used for protocol conversion processing of audio and video data to output audio and video data meeting the preset requirements to the interface module 101 or the processor 104.
[0125] In an embodiment, the screen transmission device 10 further comprises an overvoltage protection circuit 107 and a power switch module 108, a first end of the overvoltage protection circuit 107 is connected with the interface module 101, a second end of the overvoltage protection circuit 107 is connected with an input end of the power switch module 108, and a first output end of the power switch module 108 is connected with the processor 104. The power switch module 108 is configured to convert an input voltage received by the input end into a first output voltage corresponding to a voltage value, and transmit the first output voltage to the processor 104 through the first output end, so that the processor 104 can maintain normal operation based on the first output voltage.
[0126] In an embodiment, the screen transmission device 10 further comprises a wireless communication module 109, the wireless communication module 109 is connected with the processor 104 and a second output end of the power switch module 108. The power switch module 108 is further configured to convert an input voltage received by the input end into a second output voltage corresponding to a voltage value, and transmit the second output voltage to the wireless communication module 109 through the second output end, so that the wireless communication module 109 can maintain normal operation based on the second output voltage. The processor 104 is further configured to send a preset phase value scan card signal to the wireless communication module 109 after starting the kernel, determine a communication type of the wireless communication module 109 according to a received response signal, and perform wireless communication initialization processing based on the communication type and subsequent wireless communication connection. The wireless communication module 109 is configured to feed back a corresponding response signal to the processor 104 when receiving a target phase value scan card signal. For example, the wireless communication module 109 provided in the embodiment is a WiFi card, and the preset WiFi card corresponds to a WiFi scan card signal, the phase value of the WiFi scan card signal is a target phase corresponding to the WiFi card. The processor 104 is configured to send a preset WiFi scan card signal to the WiFi card after starting the kernel, the WiFi card is configured to feed back a corresponding response signal to the processor 104 according to the received WiFi scan card signal, and the processor 104 is configured to determine that the communication type of the current wireless communication module 109 is a WiFi type according to the received response signal, and perform wireless communication initialization processing based on the WiFi type, provide a query entry and a network connection entry of the WiFi card on a terminal device in communication connection with the screen transmission device 10, and provide a basic environment for subsequent manual or automatic WiFi communication connection. In the embodiment, a fixed type of wireless communication module 109 is arranged in the screen transmission device 10, and the card type can be determined by one-time scanning of the scan card signal with the preset phase value. Compared with the related art, the speed optimization is greater than 300 ms, thereby improving the scanning speed and the overall speed of system startup.
[0127] In an embodiment, the screen transmission device 10 further comprises an indicator lamp 110 connected with the processor 104, which is used to indicate the current state of the screen transmission device 10 by different colors. For example, when the indicator lamp 110 displays green, it indicates that the screen transmission device 10 is currently in the starting state; when the indicator lamp 110 displays red, it indicates that the screen transmission device 10 is currently in the burning state. The indicator lamp 110 is exemplarily a LED lamp.
[0128] The screen transmission upgrading device provided by the embodiments of the present application can be used to execute the screen transmission device upgrading method provided by the above embodiments, and has the corresponding functions and beneficial effects.
[0129] The above are only some embodiments of the present application and the technical principles applied. The present application is not limited to the specific embodiments described herein, and various obvious changes, re-adjustments and replacements made by those skilled in the art will not deviate from the protection scope of the present application. Therefore, although the present application has been described in more detail through the above embodiments, the present application is not limited to the above embodiments, and can include more other equivalent embodiments without deviating from the concept of the present application, and the scope of the present application is determined by the scope of the claims.
Claims
1. A method for upgrading a screen transmission device, wherein: The screen transmission device includes a first memory, the first memory includes a first storage partition and a second storage partition, the version of the screen transmission program data stored in the first storage partition is different from the version of the screen transmission program data stored in the second storage partition, and the method includes: When the screen transmission device is connected to the terminal device, a start trigger signal is received, and in response to the start trigger signal, a partition data identifier is read from a preset identification bit, where the partition data identifier is used to indicate a first target storage partition, where the first target storage partition is a storage partition in the first memory that stores a relatively new version of the screen transmission program data; Determining a first target storage partition and a second target storage partition from the first storage partition and the second storage partition according to the partition data identifier, wherein the second target storage partition is a storage partition in the first memory storing an old version of the screen transmission program data; Start the system according to the screen transmission program data in the first target storage partition; If an upgrade trigger signal is received, receiving upgrade program data in response to the upgrade trigger signal, wherein the version of the upgrade program data is newer than the version of the screen transmission program data in the first target storage partition; Updating the upgrade program data into the second target storage partition to upgrade the old version of the screen transmission program data in the second target storage partition; After the upgrade program data is updated, the partition data identifier is updated.
2. The method according to claim 1, wherein Each storage partition includes a first sub-partition and a second sub-partition, the first sub-partition is used to store the first type of program data for the basic screen projection function, and the second sub-partition is used to store the second type of program data for the preset function; Updating the upgrade program data into the second target storage partition to upgrade the old version of the screen transmission program data in the second target storage partition includes: Obtaining a type identifier in the upgrade program data; determining a data type of the upgrade program data according to the type identifier, the data type including a first type and a second type; When the data type is the first type, updating the upgraded program data to the first sub-partition in the second target storage partition to upgrade the first type of program data in the first sub-partition; When the data type is the second type, the upgraded program data is updated to the second sub-partition in the second target storage partition to upgrade the second type of program data in the second sub-partition.
3. The method according to claim 2, wherein: When the data type is the second type, updating the upgraded program data to the second subpartition in the second target storage partition to upgrade the second type of program data in the second subpartition includes: When the data type is the second type, mounting the second sub-partition to a system device list by using a mounting tool; The upgrade program data is updated to the second sub-partition mounted in the system device list by using an update writing tool, so as to upgrade the second type of program data in the second sub-partition.
4. The method according to any one of claims 1 to 3, wherein: Updating the upgrade program data into the second target storage partition to upgrade the old version of the screen transmission program data in the second target storage partition includes: Erasing each data block in the second target storage partition one by one to erase the screen transmission program data originally stored in the data block to obtain an empty data block without data; The upgrade program data is written into the empty data blocks in sequence until the writing is completed.
5. The method according to any one of claims 1 to 3, wherein: Updating the upgrade program data into the second target storage partition to upgrade the old version of the screen transmission program data in the second target storage partition includes: The sub-partition identification number is obtained according to the upgrade program data, and the upgrade program data is updated to the corresponding sub-partition in the second target storage partition according to the sub-partition identification number to upgrade the old version of the screen transmission program data in the corresponding sub-partition.
6. The method according to any one of claims 1 to 3, wherein: The screen transmission device further includes a second memory; When the screen transmission device is connected to the terminal device, after receiving the start trigger signal, the method includes: In response to the start trigger signal, performing initialization processing of the second memory; After completing the initialization process of the second memory, starting the first boot program, where the first boot program is a secondary boot program; The starting the system according to the screen transmission program data in the first target storage partition includes: copying the first type of program data in the first sub-partition in the first target storage partition to the second memory according to the execution of the first boot program; decompressing the first type of program data in the second memory according to the execution of the first boot program to obtain first executable program data; Read and execute the first executable program data to start the basic screen transmission function.
7. The method according to claim 6, wherein: The decompressing the first type of program data in the second memory to obtain first executable program data according to the execution of the first boot program includes: According to the execution of the first boot program, the first type of program data is decompressed in the second memory to obtain a kernel image and a root file system; The reading and executing the first executable program data to start the basic screen transmission function includes: Read and execute the kernel image to start the kernel; Decompressing the root file system according to the operation of the kernel; Mount the decompressed root file system to start the basic screen projection function.
8. The method according to claim 7, wherein: After mounting the decompressed root file system to start the basic screen projection function, the following steps are performed: Mounting the second sub-partition in the first target storage partition to a system device list according to the operation of the kernel; copying the second type of program data in the mounted second sub-partition to the second memory according to the operation of the kernel; According to the operation of the kernel, the second type of program data in the second memory is read and executed to start the preset function.
9. The method according to claim 6, wherein: After completing the initialization process of the second memory and starting the first boot program, the method includes: Perform burn trigger signal detection according to the first boot program; When a programming trigger signal is detected, starting a second boot program and receiving initial program data in response to the programming trigger signal; Burning the initial program data into the storage partition corresponding to the first memory through the second boot program; After the burning is completed, the initial program data in the first memory is copied to the second memory through the second boot program; The system is started according to the second boot program and the initial program data in the second memory.
10. A screen transmission device, wherein: The system comprises an interface module, a first memory and a processor, wherein the first memory comprises a first storage partition and a second storage partition, and the version of the screen transmission program data stored in the first storage partition is different from the version of the screen transmission program data stored in the second storage partition; The interface module is connected to the processor, and the processor is connected to the first memory; The interface module is used to connect with the terminal device and send a start trigger signal to the processor based on the connection. The interface module is also used to receive an upgrade trigger signal sent by the terminal device and send the upgrade trigger signal to the processor; The processor is configured to receive a startup trigger signal, read a partition data identifier from a preset identification bit in response to the startup trigger signal, determine a first target storage partition and a second target storage partition from the first storage partition and the second storage partition according to the partition data identifier, and start the system according to the screen transmission program data in the first target storage partition, the partition data identifier being used to indicate the first target storage partition, the first target storage partition being a storage partition in the first memory storing a relatively new version of the screen transmission program data, and the second target storage partition being a storage partition in the first memory storing an old version of the screen transmission program data; The processor is further configured to, upon receiving an upgrade trigger signal, receive upgrade program data in response to the upgrade trigger signal, and update the upgrade program data into the second target storage partition to upgrade an old version of the screen transmission program data in the second target storage partition, wherein the version of the upgrade program data is newer than the version of the screen transmission program data in the first target storage partition; The processor is further configured to update the partition data identifier after the upgrade program data is updated.
Citation Information
Patent Citations
Network camera system online update method
CN106020884A
Method and system for remote upgrade supporting firmware automatic recovery function
CN107247603A
Software upgrading method and device of vehicle-mounted controller, equipment and storage medium
CN114895947A
System upgrading method, computing device and readable storage medium
CN115827013A
Terminal equipment and upgrading method thereof
CN117707565A