System upgrading method and device, storage medium and electronic equipment
By introducing the C/S architecture of upgrading socket server and client in KaiOS system, the problem of KaiOS system not supporting dual-partition handover upgrade is solved, and the system update is realized in non-shutdown state is improved, and the upgrade efficiency and user experience are improved.
Patent Information
- Application Number
- CN202510616550.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-14
- Publication Date
- 2025-08-08
AI Technical Summary
KaiOS system does not support dual-partition switching upgrade (AB FOTA), which causes the upgrade process to shut down, which takes a long time and affects the user experience.
By starting the upgrade socket server in the collaborative drive system, creating an upgrade socket client in the system engine layer of the system to be upgraded, and establishing a connection with the server, using the C/S architecture to achieve dual-partition handover upgrade, supporting system updates of KaiOS systems.
It realizes system updates in a non-shutdown state, greatly reducing shutdown waiting time, improving system update and upgrade efficiency and user experience, and is convenient for cross-version migration and application to other systems.
Smart Images

Figure CN120447925A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of operating systems, and in particular to a system upgrade method, device, storage medium, and electronic device. Background Art
[0002] Some mobile operating systems, such as KaiOS, are widely used in devices such as feature phones and low-end smartphones. Among them, KaiOS (also known as KaiOS) is a lightweight operating system developed based on Firefox OS.
[0003] These mobile operating systems, such as KaiOS, do not support dual-partition switching upgrades (AB FOTA). When performing upgrades (FOTA), the device usually needs to be shut down and wait for the update to be installed. This process takes a lot of time and affects the user experience. Summary of the Invention
[0004] The embodiments of the present application provide a solution that can enable some systems to be upgraded, such as the KaiOS system, to support dual-partition switching upgrades (AB FOTA), thereby improving system update and upgrade efficiency and user experience.
[0005] The embodiments of this application provide the following technical solutions:
[0006] According to one embodiment of the present application, a system upgrade method includes: starting an upgrade socket server in a collaborative drive system, wherein the upgrade socket server is used to interact with the update function of the system update engine of the collaborative drive system; creating an upgrade socket client in the system engine layer of the system to be upgraded, and establishing a connection between the upgrade socket client and the upgrade socket server; sending an upgrade message to the upgrade socket server through the upgrade socket client; calling the update function according to the upgrade message through the upgrade socket server, so that the system to be upgraded performs a dual-partition switching upgrade through the update function.
[0007] In some embodiments of the present application, starting the upgrade socket server in the collaborative drive system includes: starting the upgrade socket server after the device is turned on and the system update engine is started and before the system update engine starts the engine client; creating a listener through the upgrade socket server to wait for the upgrade socket client to connect.
[0008] In some embodiments of the present application, sending the upgrade message to the upgrade socket server through the upgrade socket client includes: assembling the upgrade message into an upgrade message body through the upgrade socket client according to a predetermined communication protocol; and sending the upgrade message body to the upgrade socket server through the upgrade socket client using a connection handle.
[0009] In some embodiments of the present application, calling the update function according to the upgrade message through the upgrade socket server includes: parsing the upgrade message body according to the predetermined communication protocol through the upgrade socket server to obtain the upgrade message; and calling the update function according to the upgrade message through the upgrade socket server.
[0010] In some embodiments of the present application, after the update function is called according to the upgrade message by the upgrade socket server, the method further includes: assembling the feedback message into a feedback message body according to a predetermined communication protocol by the upgrade socket server; and sending the feedback message body to the upgrade socket client by the upgrade socket server.
[0011] In some embodiments of the present application, after the feedback message body is sent to the upgrade socket client through the upgrade socket server, the method further includes: parsing the feedback message body according to the predetermined communication protocol by the upgrade socket client to obtain the feedback message; and notifying the user interface layer of the system to be upgraded of the feedback message through the interactive interface of the system engine layer by the upgrade socket client.
[0012] In some embodiments of the present application, creating an upgrade socket client in the system engine layer of the system to be upgraded includes: sending an upgrade initiation instruction to the system engine layer through the user interface layer of the system to be upgraded; and creating an upgrade socket client according to the upgrade initiation instruction through the system engine layer.
[0013] According to one embodiment of the present application, a system upgrade device includes: a startup module, which is used to start an upgrade socket server in a collaborative drive system, and the upgrade socket server is used to interact with the update function of the system update engine of the collaborative drive system; a creation module, which is used to create an upgrade socket client in the system engine layer of the system to be upgraded, and establish a connection between the upgrade socket client and the upgrade socket server; a sending module, which is used to send an upgrade message to the upgrade socket server through the upgrade socket client; and a calling module, which is used to call the update function according to the upgrade message through the upgrade socket server, so that the system to be upgraded performs a dual-partition switching upgrade through the update function.
[0014] According to another embodiment of the present application, a storage medium stores a computer program thereon, and when the computer program is executed by a processor of a computer, the computer is caused to execute the method described in the embodiment of the present application.
[0015] According to another embodiment of the present application, an electronic device may include: a memory storing a computer program; and a processor reading the computer program stored in the memory to execute the method described in the embodiment of the present application.
[0016] According to another embodiment of the present application, a computer program product or computer program includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in various optional implementations described in the embodiments of the present application.
[0017] In an embodiment of the present application, an upgrade socket server in the collaborative drive system is started, and the upgrade socket server is used to interact with the update function of the system update engine of the collaborative drive system; an upgrade socket client is created in the system engine layer of the system to be upgraded, and a connection between the upgrade socket client and the upgrade socket server is established; an upgrade message is sent to the upgrade socket server through the upgrade socket client; and the update function is called according to the upgrade message through the upgrade socket server, so that the system to be upgraded performs a dual-partition switching upgrade through the update function.
[0018] In this way, by starting the upgrade socket server in the collaborative drive system, creating an upgrade socket client in the system engine layer of the system to be upgraded and establishing a connection with the upgrade socket server, the upgrade socket client interacts with the upgrade socket server, and the upgrade socket server interacts with the update function of the system update engine of the collaborative drive system, thereby supporting dual-partition switching upgrades (AB FOTA) for some systems to be upgraded, such as the KaiOS system, based on the C / S architecture (i.e., client / server (Client / Server) architecture), thereby improving system update efficiency and user experience. Moreover, based on the C / S architecture, the number of dependent modules will be reduced, which is more convenient and saves manpower in the case of cross-version porting or application to other systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0020] Figure 1 A flow chart of a system upgrade method according to an embodiment of the present application is shown.
[0021] Figure 2 A system upgrade process comparison diagram according to the present application is shown.
[0022] Figure 3 A system upgrade flow chart according to an embodiment of the present application in a scenario is shown.
[0023] Figure 4 A block diagram of a system upgrading device according to an embodiment of the present application is shown.
[0024] Figure 5 A block diagram of an electronic device according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0025] The present disclosure will be further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the examples provided herein are merely for explaining the present disclosure and are not intended to limit the present disclosure. In addition, the examples provided below are partial examples for implementing the present disclosure, rather than providing all examples for implementing the present disclosure. In the absence of conflict, the technical solutions described in the examples of the present disclosure may be implemented in any combination.
[0026] It should be noted that, in the embodiments of the present disclosure, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a method or apparatus comprising a series of elements includes not only the elements explicitly stated, but also other elements not explicitly listed, or also includes elements inherent to the implementation of the method or apparatus. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other related elements (such as steps in the method or units in the apparatus, for example, a unit may be part of a circuit, part of a processor, part of a program or software, etc.) in the method or apparatus comprising the element.
[0027] For example, the system upgrade method provided in the embodiment of the present disclosure includes a series of steps, but the system upgrade method provided in the embodiment of the present disclosure is not limited to the recorded steps. Similarly, the system upgrade device provided in the embodiment of the present disclosure includes a series of units, but the device provided in the embodiment of the present disclosure is not limited to including the units explicitly recorded, and may also include units that need to be set up to obtain relevant information or perform processing based on the information.
[0028] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present disclosure pertains. The terms used herein are for the purpose of describing specific embodiments only and are not intended to limit the present disclosure.
[0029] It is understandable that in the specific implementation of this application, relevant data is involved. When the embodiments in this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0030] Figure 1 The flowchart of a system upgrade method according to an embodiment of the present application is schematically shown. The execution subject of the system upgrade method can be a device with processing capabilities, such as a TV, computer, mobile phone, smart watch, and home appliance.
[0031] The device that executes the update can integrate the system to be upgraded (such as KaiOS) and the collaborative driving system (such as Android). The system to be upgraded (such as KaiOS) can be used for upper-layer display, and the collaborative driving system (such as Android) can be used as the underlying driver. The system update engine is located in the kernel layer of the collaborative driving system (such as Android).
[0032] like Figure 1 As shown, the system upgrade method may include steps S110 to S140.
[0033] Step S110: starting an upgrade socket server in the collaborative drive system, wherein the upgrade socket server is used to interact with an update function of a system update engine of the collaborative drive system;
[0034] Step S120: creating an upgrade socket client in the system engine layer of the system to be upgraded, and establishing a connection between the upgrade socket client and the upgrade socket server;
[0035] Step S130, sending an upgrade message to the upgrade socket server through the upgrade socket client;
[0036] Step S140: calling the update function according to the upgrade message through the upgrade socket server, so that the system to be upgraded performs dual-partition switching upgrade through the update function.
[0037] In the collaborative drive system, an upgrade socket server (fota_socket_server) can be created in advance. The upgrade socket server implements a method for interacting with the update function of the collaborative drive system's system update engine. Start the upgrade socket server in the collaborative drive system. The upgrade socket server can be used to interact with the update function of the collaborative drive system's system update engine. Among them, when the collaborative drive system is an Android system, the system update engine is update_engine. The system update engine is the component in the collaborative drive system used to handle system updates.
[0038] Furthermore, when an upgrade is initiated or a specific time is specified, an upgrade socket client (fota_socket_client) is created in the system engine layer of the system to be upgraded, and a connection is established between the upgrade socket client and the upgrade socket server. When the system to be upgraded is KaiOS, the system engine layer is the gecko layer.
[0039] Now that the connection between the upgrade socket client and the upgrade socket server has been established, the upgrade socket client can send an upgrade message to the upgrade socket server. The upgrade message is used to instruct the upgrade socket server to perform a system upgrade. The upgrade socket client and the upgrade socket server communicate via sockets. The upgrade socket client and the upgrade socket server are respectively the client and server of a client / server architecture.
[0040] After the upgrade socket server receives the upgrade message, it interacts with the update function of the system update engine through the method implemented therein, thereby calling the update function to perform the upgrade. Since the update function supports dual-partition switching upgrade (AB FOTA) for the system update engine of the collaborative driving system, the system to be upgraded can perform dual-partition switching upgrade through this update function.
[0041] See Figure 2 , because the dual partition switching upgrade (AB FOTA) can be performed in the non-shutdown state "install update" process, such as Figure 2 As shown in step 210, the "application update" process is only executed in the shutdown state; when dual partition switching upgrade (AB FOTA) is not supported, as shown in FIG. Figure 2Step 220 shows that the "Install Update and Apply Update" process needs to be executed in the shutdown state. Therefore, when the system to be upgraded can use this update function to switch between two partitions for upgrading, the time spent on shutdown waiting for the update to be installed can be greatly reduced (by about 99%), effectively improving the efficiency of system upgrades.
[0042] In this way, by starting the upgrade socket server in the collaborative drive system, creating an upgrade socket client in the system engine layer of the system to be upgraded and establishing a connection with the upgrade socket server, the upgrade socket client interacts with the upgrade socket server, and the upgrade socket server interacts with the update function of the system update engine of the collaborative drive system, thereby supporting dual-partition switching upgrades (AB FOTA) for some systems to be upgraded, such as the KaiOS system, based on the C / S architecture (i.e., client / server (Client / Server) architecture), thereby improving system update efficiency and user experience. Moreover, based on the C / S architecture, the number of dependent modules will be reduced, which is more convenient and saves manpower in the case of cross-version porting or application to other systems.
[0043] Described below Figure 1 When performing system upgrade under the embodiment, further optional specific embodiments are provided for each step performed.
[0044] In one embodiment, starting the upgrade socket server in the collaborative drive system may include: starting the upgrade socket server after the device is turned on and the system update engine is started and before the system update engine starts the engine client; creating a listener through the upgrade socket server to wait for the upgrade socket client to connect.
[0045] When the device boots up and starts the collaborative drive system, the system update engine is launched. Before the system update engine starts the engine client, the upgrade socket server is started and a connection is established to listen for the upgrade socket client. This prevents unexpected effects caused by the system update engine starting the engine client, further ensuring upgrade reliability. When the collaborative drive system is Android, the system update engine is called update_engine, and its engine client is called update_engine_client.
[0046] Optionally, in other embodiments, starting the upgrade socket server in the collaborative driving system may also be starting the upgrade socket server at other specified times and creating a listener to wait for the upgrade socket client to connect.
[0047] In one embodiment, creating an upgrade socket client in the system engine layer of the system to be upgraded may include: sending an upgrade initiation instruction to the system engine layer through the user interface layer of the system to be upgraded; and creating an upgrade socket client according to the upgrade initiation instruction through the system engine layer.
[0048] The system to be upgraded includes a user interface layer and a system engine layer. When the system to be upgraded is KaiOS, the system engine layer is the gecko layer and the user interface layer is the gaia layer. The user interface layer may include a system update application.
[0049] When an update is initiated through the system update application in the user interface layer, the user interface layer can further send an upgrade initiation instruction to the system engine layer, and the system engine layer will create an upgrade socket client based on the upgrade initiation instruction. In this way, the upgrade socket client can be created in time when the update is initiated.
[0050] Optionally, in other embodiments, the upgrade socket client is created in the system engine layer of the system to be upgraded, and the upgrade socket client may be created at other designated times.
[0051] In one embodiment, sending the upgrade message to the upgrade socket server through the upgrade socket client may include: assembling the upgrade message into an upgrade message body through the upgrade socket client according to a predetermined communication protocol; and sending the upgrade message body to the upgrade socket server through the upgrade socket client using a connection handle.
[0052] The upgrade socket client and upgrade socket server can further establish a predetermined communication protocol for message assembly and parsing, further enhancing the security of the upgrade process against third-party hacking. For upgrade messages, the upgrade socket client assembles the upgrade message into an upgrade message body according to the predetermined communication protocol. The upgrade socket client then securely sends the upgrade message body to the upgrade socket server using the connection handle.
[0053] The connection handle may be generated after the upgrade socket client establishes a connection with the upgrade socket server, and the connection handle may include information required for communication between the upgrade socket client and the upgrade socket server, such as a connection string, user name, password, etc.
[0054] In one embodiment, calling the update function according to the upgrade message through the upgrade socket server may include: parsing the upgrade message body according to the predetermined communication protocol through the upgrade socket server to obtain the upgrade message; and calling the update function according to the upgrade message through the upgrade socket server.
[0055] After receiving the upgrade message body, the upgrade socket server can parse the upgrade message body according to the predetermined communication protocol to securely obtain the upgrade message. Furthermore, the upgrade socket server can call the update function of the system update engine in the collaborative drive system based on the upgrade message through the method implemented in the upgrade socket server.
[0056] Furthermore, in one embodiment, after the update function is called according to the upgrade message through the upgrade socket server, the method may also include: assembling the feedback message into a feedback message body according to a predetermined communication protocol through the upgrade socket server; and sending the feedback message body to the upgrade socket client through the upgrade socket server.
[0057] After the upgrade socket server calls the update function according to the upgrade message, the upgrade socket server further obtains feedback messages such as the system update progress, whether the call is successful, etc., and assembles the feedback messages into a feedback message body according to a predetermined communication protocol. Then, the upgrade socket server sends the feedback message body to the upgrade socket client, so that the system to be upgraded can obtain relevant feedback messages in a timely manner.
[0058] Furthermore, in one embodiment, after the upgrade socket server sends the feedback message body to the upgrade socket client, the method may further include:
[0059] The feedback message is obtained by parsing the feedback message body through the upgrade socket client according to the predetermined communication protocol; and the feedback message is notified to the user interface layer of the system to be upgraded through the interactive interface of the system engine layer through the upgrade socket client.
[0060] The upgrade socket client parses the feedback message body according to a predetermined communication protocol to obtain a feedback message. The upgrade socket client notifies the user interface layer of the feedback message via the interactive interface of the system engine layer. The user interface layer can then update relevant information or status based on the feedback message, for example, updating relevant information or status on a UI interface. When the system to be upgraded is KaiOS, the system engine layer is the Gecko layer, the user interface layer is the Gaia layer, and the interactive interface of the system engine layer can be a Weidl interface.
[0061] In order to better implement the system upgrade method provided in the embodiment of the present application, the above embodiment is further described below in conjunction with the process of performing system upgrade in a scenario. Figure 3In this scenario, the system upgrade is performed by applying the aforementioned embodiment of the present application. The process of performing the system upgrade by applying the aforementioned embodiment of the present application in this scenario may include steps S310 to S3120.
[0062] In this scenario, the system to be upgraded is the KaiOS system. The system engine layer is the gecko layer, the user interface layer is the gaia layer, the interactive interface of the system engine layer is the weidl interface, and an upgrade socket client (fota_socket_client) is created in the gecko layer.
[0063] The collaborative driving system is the Android system. The system update engine is update_engine. update_engine is located in the kernel layer of the Android system. An upgrade socket server (fota_socket_server) is created in the Android system.
[0064] Step S310: Create a server and listen for connections. Specifically, after the device starts the update_engine and before the update_engine starts the engine client, start the fota_socket_server; and create a listener and wait for connections through the fota_socket_server.
[0065] Step S320: Start the upgrade. The upgrade is initiated through the system update application in the Gaia layer.
[0066] Step S330: Initiate upgrade and set callback: Send upgrade initiation instruction to gecko layer via gaia layer, create fota_socket_client according to upgrade initiation instruction via gecko layer, and set callback to fota_socket_client.
[0067] Step S340: Send a connection request message. The fota_socket_client assembles the upgrade message into an upgrade message body according to a predetermined communication protocol, and the fota_socket_client uses the connection handle to send the upgrade message body to the fota_socket_server.
[0068] Step S350: Invoke the engine, parse the upgrade message body through the fota_socket_server according to the predetermined communication protocol to obtain the upgrade message, and invoke the update function according to the upgrade message through the fota_socket_server.
[0069] Step S360: Feedback the call result: update_engine feeds back the result of whether the call to update_engine is successful to fota_socket_server.
[0070] Step S370: Send the call result. The fota_socket_server assembles the feedback message into a feedback message body according to a predetermined communication protocol, and sends the feedback message body to the fota_socket_client through the fota_socket_server. In this step, the feedback message carries the result of whether the call to update_engine is successful.
[0071] Step S380: Update the UI. The fota_socket_client parses the feedback message body according to the predetermined communication protocol to obtain a result of whether the update_engine call is successful. The fota_socket_client notifies the user interface layer of the KaiOS system of the result of whether the update_engine call is successful via the interactive interface of the system engine layer to update the UI.
[0072] Step S390: Installation begins. The update_engine's update function begins dual partition switching and upgrading (ABFOTA).
[0073] Step S3100: Installation progress feedback: update_engine feeds back the installation progress to fota_socket_server.
[0074] Step S3110: Send the installation progress. The fota_socket_server assembles the installation progress message into a feedback message body according to a predetermined communication protocol, and the fota_socket_server sends the feedback message body to the fota_socket_client. In this step, the feedback message carries the installation progress message.
[0075] Step S3120: Update the UI. The fota_socket_client parses the feedback message body according to the predetermined communication protocol to obtain the installation progress message; and the fota_socket_client notifies the user interface layer of the KaiOS system of the installation progress message via the interactive interface of the system engine layer to update the UI.
[0076] In this scenario, the system is upgraded by applying the aforementioned embodiments of this application. By starting the upgrade socket server in the Android system, creating an upgrade socket client in the system engine layer of the KaiOS system and establishing a connection with the upgrade socket server, the upgrade socket client interacts with the upgrade socket server, and the upgrade socket server interacts with the update function of the system update engine of the collaborative drive system, thereby realizing the support of the KaiOS system for dual partition switching upgrade (AB FOTA) based on the C / S architecture (i.e., client / server (Client / Server) architecture), improving the system update efficiency and user experience. Moreover, based on the C / S architecture, the number of dependent modules will be reduced, which is more convenient and saves manpower in the case of cross-version porting or application to other systems.
[0077] To facilitate better implementation of the system upgrade method provided in the embodiment of the present application, the embodiment of the present application also provides a system upgrade device based on the above system upgrade method. The meanings of the terms herein are the same as those in the above system upgrade method, and the specific implementation details can be referred to the description in the method embodiment. Figure 4 A block diagram of a system upgrading device according to an embodiment of the present application is shown.
[0078] like Figure 4 As shown, the system upgrade device 400 may include: a startup module 410 may be used to: start the upgrade socket server in the collaborative drive system, and the upgrade socket server is used to interact with the update function of the system update engine of the collaborative drive system; a creation module 420 may be used to: create an upgrade socket client in the system engine layer of the system to be upgraded, and establish a connection between the upgrade socket client and the upgrade socket server; a sending module 430 may be used to: send an upgrade message to the upgrade socket server through the upgrade socket client; a calling module 440 may be used to: call the update function according to the upgrade message through the upgrade socket server, so that the system to be upgraded performs a dual-partition switching upgrade through the update function.
[0079] In some embodiments of the present application, the startup module 410 can be used to: start the upgrade socket server after the device is turned on and the system update engine is started and before the system update engine starts the engine client; create a listener through the upgrade socket server to wait for the upgrade socket client to connect.
[0080] In some embodiments of the present application, the sending module 430 can be used to: assemble the upgrade message into an upgrade message body through the upgrade socket client according to a predetermined communication protocol; and send the upgrade message body to the upgrade socket server using a connection handle through the upgrade socket client.
[0081] In some embodiments of the present application, the calling module 440 can be used to: parse the upgrade message body through the upgrade socket server according to the predetermined communication protocol to obtain the upgrade message; and call the update function according to the upgrade message through the upgrade socket server.
[0082] In some embodiments of the present application, after the update function is called according to the upgrade message through the upgrade socket server, the device also includes a feedback module, which is used to: assemble the feedback message into a feedback message body through the upgrade socket server according to a predetermined communication protocol; and send the feedback message body to the upgrade socket client through the upgrade socket server.
[0083] In some embodiments of the present application, after the feedback message body is sent to the upgrade socket client through the upgrade socket server, the device also includes a notification module for: parsing the feedback message body according to the predetermined communication protocol through the upgrade socket client to obtain the feedback message; and notifying the user interface layer of the system to be upgraded of the feedback message through the interactive interface of the system engine layer through the upgrade socket client.
[0084] In some embodiments of the present application, the creation module 420 may be configured to: send an upgrade initiation instruction to the system engine layer through the user interface layer of the system to be upgraded; and create an upgrade socket client according to the upgrade initiation instruction through the system engine layer.
[0085] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiment of the application, the features and functions of two or more modules or units described above can be concretized in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.
[0086] In addition, the present invention also provides an electronic device, such as Figure 5 As shown, Figure 5 A block diagram of an electronic device according to an embodiment of the present application is shown, specifically:
[0087] The electronic device may include one or more processing core processors 501, one or more computer-readable storage media memories 502, a power supply 503, an input unit 504 and other components. Those skilled in the art will understand that Figure 5The electronic device structure shown in the figure does not constitute a limitation to the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0088] in:
[0089] Processor 501 is the control center of the electronic device. It utilizes various interfaces and circuits to connect the various components of the entire computer device. By running or executing software programs and / or modules stored in memory 502 and accessing data stored in memory 502, it performs various computer device functions and processes data, thereby providing overall monitoring of the electronic device. Optionally, processor 501 may include one or more processing cores; preferably, processor 501 may integrate an application processor and a modem processor, wherein the application processor primarily processes the operating system, user interfaces, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processor 501.
[0090] The memory 502 can be used to store software programs and modules. The processor 501 executes various functional applications and data processing by running the software programs and modules stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, at least one application required for a function (such as a sound playback function, an image playback function, etc.); the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 502 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. Accordingly, the memory 502 may also include a memory controller to provide the processor 501 with access to the memory 502.
[0091] The electronic device also includes a power supply 503 for supplying power to various components. Preferably, the power supply 503 can be logically connected to the processor 501 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The power supply 503 can also include one or more DC or AC power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components.
[0092] The electronic device may further include an input unit 504, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0093] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 501 in the electronic device will load the executable files corresponding to one or more computer program processes into the memory 502 according to the following instructions, and the processor 501 will run the computer program stored in the memory 502, thereby realizing the various functions of the aforementioned embodiments of the present application. For example, the processor 501 may perform the following steps:
[0094] Start the upgrade socket server in the collaborative drive system, and the upgrade socket server is used to interact with the update function of the system update engine of the collaborative drive system; create an upgrade socket client in the system engine layer of the system to be upgraded, and establish a connection between the upgrade socket client and the upgrade socket server; send an upgrade message to the upgrade socket server through the upgrade socket client; call the update function according to the upgrade message through the upgrade socket server, so that the system to be upgraded can perform dual-partition switching upgrade through the update function.
[0095] In some embodiments of the present application, starting the upgrade socket server in the collaborative drive system includes: starting the upgrade socket server after the device is turned on and the system update engine is started and before the system update engine starts the engine client; creating a listener through the upgrade socket server to wait for the upgrade socket client to connect.
[0096] In some embodiments of the present application, sending the upgrade message to the upgrade socket server through the upgrade socket client includes: assembling the upgrade message into an upgrade message body through the upgrade socket client according to a predetermined communication protocol; and sending the upgrade message body to the upgrade socket server through the upgrade socket client using a connection handle.
[0097] In some embodiments of the present application, calling the update function according to the upgrade message through the upgrade socket server includes: parsing the upgrade message body according to the predetermined communication protocol through the upgrade socket server to obtain the upgrade message; and calling the update function according to the upgrade message through the upgrade socket server.
[0098] In some embodiments of the present application, after the update function is called according to the upgrade message by the upgrade socket server, the method further includes: assembling the feedback message into a feedback message body according to a predetermined communication protocol by the upgrade socket server; and sending the feedback message body to the upgrade socket client by the upgrade socket server.
[0099] In some embodiments of the present application, after the feedback message body is sent to the upgrade socket client through the upgrade socket server, the method further includes: parsing the feedback message body according to the predetermined communication protocol by the upgrade socket client to obtain the feedback message; and notifying the user interface layer of the system to be upgraded of the feedback message through the interactive interface of the system engine layer by the upgrade socket client.
[0100] In some embodiments of the present application, creating an upgrade socket client in the system engine layer of the system to be upgraded includes: sending an upgrade initiation instruction to the system engine layer through the user interface layer of the system to be upgraded; and creating an upgrade socket client according to the upgrade initiation instruction through the system engine layer.
[0101] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be accomplished by a computer program, or by controlling related hardware through a computer program. The computer program may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0102] To this end, an embodiment of the present application further provides a storage medium storing a computer program, which can be loaded by a processor to execute the steps of any method provided in the embodiment of the present application.
[0103] The storage medium may be a computer-readable storage medium, and the storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0104] Since the computer program stored in the storage medium can execute the steps of any method provided in the embodiments of the present application, the beneficial effects that can be achieved by the method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0105] Those skilled in the art will readily conceive of other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of this application and include common knowledge or customary techniques in the art that are not disclosed herein.
[0106] It should be understood that the present application is not limited to the embodiments that have been described above and shown in the accompanying drawings, but various modifications and changes may be made without departing from the scope thereof.
Claims
1. A system upgrade method, characterized in that: The method comprises: Starting an upgrade socket server in the collaborative drive system, wherein the upgrade socket server is used to interact with an update function of a system update engine of the collaborative drive system; Creating an upgrade socket client in the system engine layer of the system to be upgraded, and establishing a connection between the upgrade socket client and the upgrade socket server; Sending an upgrade message to the upgrade socket server through the upgrade socket client; The upgrade socket server calls the update function according to the upgrade message, so that the system to be upgraded performs dual-partition switching upgrade through the update function.
2. The method according to claim 1, characterized in that The step of starting the upgrade socket server in the collaborative drive system includes: After the device is powered on and the system update engine is started, and before the system update engine starts the engine client, starting the upgrade socket server; The upgrade socket server creates a listener to wait for the upgrade socket client to connect.
3. The method according to claim 1, characterized in that The sending of the upgrade message to the upgrade socket server through the upgrade socket client includes: Assembling the upgrade message into an upgrade message body through the upgrade socket client according to a predetermined communication protocol; The upgrade socket client uses the connection handle to send the upgrade message body to the upgrade socket server.
4. The method according to claim 3, characterized in that The calling of the update function according to the upgrade message by the upgrade socket server includes: Parsing the upgrade message body according to the predetermined communication protocol by the upgrade socket server to obtain the upgrade message; The update function is called according to the upgrade message through the upgrade socket server.
5. The method according to claim 1, wherein After calling the update function according to the upgrade message through the upgrade socket server, the method further includes: Assembling the feedback message into a feedback message body through the upgrade socket server according to a predetermined communication protocol; The feedback message body is sent to the upgrade socket client through the upgrade socket server.
6. The method according to claim 5, characterized in that After the upgrade socket server sends the feedback message body to the upgrade socket client, the method further includes: Parsing the feedback message body by the upgrade socket client according to the predetermined communication protocol to obtain the feedback message; The feedback message is notified to the user interface layer of the system to be upgraded through the upgrade socket client and the interactive interface of the system engine layer.
7. The method according to any one of claims 1 to 6, characterized in that The step of creating an upgrade socket client in the system engine layer of the system to be upgraded includes: Sending an upgrade initiation instruction to the system engine layer through the user interface layer of the system to be upgraded; An upgrade socket client is created by the system engine layer according to the upgrade initiation instruction.
8. A system upgrade device, characterized in that: include: A startup module, configured to: start an upgrade socket server in the collaborative drive system, wherein the upgrade socket server is configured to interact with an update function of a system update engine of the collaborative drive system; A creation module, configured to: create an upgrade socket client in the system engine layer of the system to be upgraded, and establish a connection between the upgrade socket client and the upgrade socket server; A sending module, configured to: send an upgrade message to the upgrade socket server via the upgrade socket client; The calling module is used to call the update function according to the upgrade message through the upgrade socket server, so that the system to be upgraded performs dual-partition switching upgrade through the update function.
9. A storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor of a computer, the computer is caused to execute the method according to any one of claims 1 to 7.
10. An electronic device, characterized in that: include: a memory storing a computer program; A processor reads a computer program stored in a memory to execute the method according to any one of claims 1 to 7.