WO2024041283A1 - Client upgrading method and apparatus, terminal device, and storage medium - Google Patents

Client upgrading method and apparatus, terminal device, and storage medium Download PDF

Info

Publication number
WO2024041283A1
WO2024041283A1 PCT/CN2023/108975 CN2023108975W WO2024041283A1 WO 2024041283 A1 WO2024041283 A1 WO 2024041283A1 CN 2023108975 W CN2023108975 W CN 2023108975W WO 2024041283 A1 WO2024041283 A1 WO 2024041283A1
Authority
WO
WIPO (PCT)
Prior art keywords
client
version
information
update file
version information
Prior art date
Application number
PCT/CN2023/108975
Other languages
French (fr)
Chinese (zh)
Inventor
杨�远
Original Assignee
北京比特大陆科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京比特大陆科技有限公司 filed Critical 北京比特大陆科技有限公司
Publication of WO2024041283A1 publication Critical patent/WO2024041283A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues

Definitions

  • the present disclosure relates to but is not limited to the field of computer technology, and in particular, to a client upgrade method, device, terminal equipment and storage medium.
  • the present disclosure provides a client upgrade method, device, terminal equipment and storage medium to improve client update efficiency.
  • the present disclosure provides a client upgrade method, including: obtaining first version information of the first client, where the first version information is used to indicate the current version of the first client; and determining the first client based on the first version information.
  • the client is to be updated; obtain the first update file of the first client, which is the latest version of the installation file of the first client; and send the first update file to the main process.
  • the present disclosure provides a client upgrade method, including: receiving a first update file from a detection process, where the first update file is the latest version of the installation file of the first client; and updating the first update file according to the first update file.
  • the client is updated from the current version to the latest version.
  • the present disclosure provides a client upgrade device, which may be a chip or a system on a chip in a terminal device, or may be used in a terminal device to implement the first aspect and any of its possible implementations.
  • the client upgrade device can realize the functions performed by the terminal device described in the first aspect and any of its possible implementation modes, and the functions can be realized by hardware executing corresponding software.
  • the hardware or software includes one or more modules corresponding to the above functions.
  • the client The upgrade device includes: an acquisition module configured to obtain first version information of the first client, where the first version information is used to indicate the current version of the first client; and a determination module configured to determine the first client based on the first version information.
  • the terminal is to be updated; the acquisition module is also configured to obtain the first update file of the first client, which is the latest version of the installation file of the first client; the sending module is configured to send the first update file to the main process .
  • the present disclosure provides a client upgrade device, which may be a chip or a system on a chip in a terminal device, or may be used in a terminal device to implement the first aspect and any of its possible implementations.
  • the client upgrade device can realize the functions performed by the terminal device described in the first aspect and any of its possible implementation modes, and the functions can be realized by hardware executing corresponding software.
  • the hardware or software includes one or more modules corresponding to the above functions.
  • the client upgrade device includes: a receiving module configured to receive a first update file from the detection process, where the first update file is the installation file of the latest version of the first client; an update module configured to receive the first update file according to the first update file, Update the first client from the current version to the latest version.
  • the present disclosure provides a terminal device, including: a memory and a processor; the processor is connected to the memory and is configured to execute computer-executable instructions stored on the memory to implement the first aspect, the second aspect and The method described in any possible embodiment thereof.
  • the present disclosure provides a computer-readable storage medium that stores computer-executable instructions. After being executed by a processor, the computer-executable instructions can implement the first aspect, the second aspect, and any of the following. A possible implementation of the method.
  • the detection process obtains the first version information of the first client, and the first version information is used to indicate the current version of the first client; determines that the first client needs to be updated based on the first version information; obtains the first client
  • the first update file of the first client is the installation file of the latest version of the first client; and the first update file is sent to the main process.
  • the first update file is sent to the main process.
  • the purpose of sharing update files is to avoid the cumbersome operation of the server issuing instructions during the update process and improve the client's update efficiency.
  • Figure 1 is a schematic structural diagram of a client upgrade framework in an embodiment of the present disclosure
  • Figure 2 is a schematic flowchart of the first implementation of the client upgrade method in an embodiment of the present disclosure
  • Figure 3 is a schematic flowchart of the second implementation of the client upgrade method in an embodiment of the present disclosure
  • Figure 4 is a schematic flowchart of the third implementation of the client upgrade method in an embodiment of the present disclosure.
  • Figure 5 is a schematic flowchart of the fourth implementation of the client upgrade method in an embodiment of the present disclosure.
  • Figure 6 is a schematic flowchart of the fifth implementation of the client upgrade method in the embodiment of the present disclosure.
  • Figure 7 is a schematic flowchart of the sixth implementation of the client upgrade method in the embodiment of the present disclosure.
  • Figure 8 is a schematic flowchart of the seventh implementation of the client upgrade method in the embodiment of the present disclosure.
  • Figure 9 is a schematic structural diagram of a client upgrade device in an embodiment of the present disclosure.
  • Figure 10 is another structural schematic diagram of a client upgrade device in an embodiment of the present disclosure.
  • Figure 11 is a schematic structural diagram of a terminal device in an embodiment of the present disclosure.
  • the corresponding device may include one or more units, such as functional units, to perform the one or more described method steps (e.g., one unit performs one or more steps , or a plurality of units, each of which performs one or more of a plurality of steps), even if such unit or units are not explicitly depicted or illustrated in the drawings.
  • units such as functional units
  • the corresponding method may include a step to perform the functionality of the one or more units (e.g., a step to perform the functionality of the one or more units) functionality, or a plurality of steps, each of which performs the functionality of one or more of a plurality of units), even if such one or more steps are not explicitly depicted or illustrated in the drawings. It is to be understood that, unless expressly stated otherwise, features of various exemplary embodiments and/or aspects described herein may be combined with each other.
  • an embodiment of the present disclosure provides a schematic diagram of a client upgrade framework, as shown in Figure 1 .
  • the client upgrade framework is a multi-threaded framework, which is composed of a detection process 100, a main process 200 and multiple client processes (such as the first client process 300, the second client process 400, etc.).
  • the detection process The process 100 and the main process 200 maintain communication and share the client's version information.
  • the detection process 100 is mainly used to obtain the client's update file.
  • the main process 200 is mainly used to mount the client's process (i.e., the client process) to perform maintenance on the client. Update, and after the client is updated, restart the client.
  • the above-mentioned detection process, main process and multiple client processes can also be understood as detection threads, main threads and multiple client threads, which are not specifically limited in the embodiments of the present disclosure.
  • the client upgrade framework can be applied to the operating system, which can be the mobile operating system ios system; it can be applied to the free and open source operating system Android system based on Linux; it can also be applied to the Windows system; it can also be applied to MeeGo system, a free and open source portable device operating system based on Linux; can also be applied to Palm webOS system, an embedded operating system.
  • the client upgrade framework can also be applied to other types of operating systems, and this is not specifically limited in the embodiments of the present disclosure.
  • the client upgrade method provided by the embodiment of the present disclosure can be applied to the detection process 100 in the above client upgrade framework.
  • FIG. 2 is a schematic flowchart of the first implementation of the client upgrade method in an embodiment of the present disclosure.
  • the client upgrade method may include:
  • the first version information is used to indicate the current version of the first client.
  • the detection process may obtain the version information (ie, first version information) of the client to be upgraded (ie, the first client).
  • the first client can be understood as the client to be updated
  • the first version information can be understood as the current version information of the client to be updated.
  • the first client can be a web client, such as browser A, browser B, browser C, etc.; the first client can also be a game client, such as game A, game B, Game C and other games; the first client can also be a mobile device client, such as chat software A, short video software B, shopping software C, etc. running on a mobile phone.
  • the first client may be another type of client or a client on another system, which is not specifically limited in this embodiment of the disclosure.
  • the first version information may include the client name, client version number, update content, compatibility information, etc. of the first client.
  • the client name is used to indicate the name of the first client
  • the client version number is used to indicate the version number of the current version of the first client
  • the update content is used to indicate the function description of the current version of the first client
  • the compatibility information is Compatible information indicating the current version of the first client (such as compatible operating system version information, compatible hardware information, compatible device information, etc.).
  • the detection process can determine that the first client needs to be updated based on the first version information. For example, the detection process compares the version number of the current version of the first client with the version number of the latest version of the first client. If the two are inconsistent, it is determined that the first client needs to be updated. If the two are consistent, it is determined that the current version of the first client is a new version. need to be updated.
  • the detection process may obtain the latest version information of the first client from the server, such as the version number of the latest version.
  • the detection process may request the above-mentioned latest version information from the server, or the detection process may also receive the above-mentioned latest version information issued by the server.
  • the detection process can also obtain the latest version information of the first client through other methods, which is not specifically limited in this embodiment of the disclosure.
  • FIG. 3 is a schematic flowchart of the second implementation of the client upgrade method in the embodiment of the present disclosure. Referring to Figure 3, when S202 is executed, S301 to S303 are executed.
  • the second version information is used to indicate the latest version of the first client.
  • the detection process after obtaining the first version information through the above S201, the detection process also needs to obtain the second version information of the first client, that is, the latest version information of the first client, so that the detection process can obtain the first version information according to the first version information and the second version information.
  • the second version information determines whether the first client needs to be updated.
  • the detection process compares the first version information obtained in the above S201 with the second version information to determine whether the current version of the first client is the latest version. same.
  • the detection process after obtaining the first version information and the second version information, performs information extraction processing on the first version information and the second version information. For example, a comparison can be performed based on the client serial number in the version information to determine whether the client serial number in the first version information and the client serial number in the second version information are the same.
  • the current version is different from the latest version, which can be understood to mean that the client serial number of the second version information is higher than the client serial number of the first version information.
  • the first update file is the installation file of the latest version of the first client.
  • the detection process can directly obtain the first update file of the first client from the server, where the first update file can be generated in advance by the server and used to store the client to be updated. end installation files.
  • the detection process reads the first update file stored on the server (such as a cloud storage server) through hypertext transfer protocol (HTTP).
  • HTTP hypertext transfer protocol
  • the first update file may include update file type, update file creation time, update file decompression path, update file storage path, update backup path, applicable system version information, language pack, etc.
  • the first update file may also contain other content, which is not specifically limited in this embodiment of the disclosure.
  • the first update file can be sent to the main process, so that the main process can update the first client based on the received first update file.
  • the detection process after the detection process determines that the first client needs to be updated, the detection process directly obtains the first update file of the first client, and does not need to issue a command through the server to obtain the update file. Improve client update efficiency.
  • FIG. 4 is a schematic flowchart of the third implementation of the client upgrade method in an embodiment of the present disclosure. Referring to Figure 4, before executing S201, S401 to S403 are executed.
  • S401 obtain the client information of N second clients; S402, build a client queue according to the client information; S403, poll the client queue, and determine the i-th second client among the N second clients. is the first client, where N is a positive integer and i is a positive integer.
  • the client information of N clients to be updated ie, the second client
  • a client queue is constructed based on the currently obtained client information of one or N second clients; and each second client in the client queue is polled in turn, and The i-th second client among the second clients is determined as the first client.
  • the first client can be understood as a client determined from the client queue.
  • the client information may include client type, client version information, client update files, etc.
  • the client information may also include other information used to represent the current client, and this disclosure does not specifically limit this.
  • the above-mentioned N second clients can be recorded as A1, A2, A3, ..., AN, and A is used to indicate the second client to be updated.
  • FIG. 5 is a schematic flowchart of the fourth implementation of the client upgrade method in the embodiment of the present disclosure. Referring to Figure 5 , when S204 is executed, S501 to S503 are executed.
  • the second verification code is the verification code corresponding to the latest version of the first client in the server.
  • the detection process needs to first determine whether the currently obtained first update file is correct. Then, the first check code of the first update file and the first client in the server can be obtained. The check code corresponding to the latest version of the client is compared, and the first check code and the second check code are compared. When the comparison results show the same, it can be determined that the currently obtained first update file is correct, and then the first update file is The update file is sent to the main process so that the main process can upgrade the first client based on the first update file.
  • the first check code and the second check code may be MD5 values.
  • the check code can also be other This disclosure does not specifically limit the numerical value of its algorithm.
  • the MD5 verification principle before the detection process needs to send the first update file to the main process, the first update file needs to be extracted and processed to obtain the corresponding MD5 value of the first update file. At the same time, it also needs to obtain the MD5 value from the server. Obtain the MD5 value corresponding to the latest version of the first client and compare the two obtained check codes. If the comparison result shows that the check codes are consistent, it can be determined that there is no error in the first update file pulled by the detection process. If If the comparison result shows that the check codes are inconsistent, it can be determined that the first update file pulled by the detection process is incorrect, and the first update file needs to be pulled again.
  • FIG. 6 is a schematic flowchart of the fifth implementation of the client upgrade method in an embodiment of the present disclosure. Referring to FIG. 6 , after executing S204, S601 to S602 are also executed.
  • the indication information is used to instruct the first client to update to the latest version.
  • S602 Update the first version information to the second version information corresponding to the latest version according to the instruction information.
  • the detection process can also receive the instruction information sent by the main process. At this time, the detection process can update the first version information to the first client according to the received instruction information.
  • the second version information corresponding to the latest version of the client is convenient for the detection process to continue polling the client queue.
  • the above indication information carries first version information of the first client, and the second version information is used to indicate the latest version.
  • the client upgrade method provided by the embodiment of the present disclosure can be applied to the main process 200 in the above client upgrade framework.
  • FIG. 7 is a schematic flowchart of the sixth implementation of the client upgrade method in the embodiment of the present disclosure.
  • the client upgrade method may include:
  • the first update file is the installation file of the latest version of the first client.
  • the main process receives the first update file sent from the detection process.
  • S702 Update the first client from the current version to the latest version according to the first update file.
  • the main process can update the current version of the first client to the latest version of the first client based on the first update file obtained from the above S701.
  • the main process may also perform: start the detection process and wait for the blocking synchronization queue message.
  • the detection process will send a message to the main process through the blocking synchronization queue to notify the main process of the next operation.
  • FIG. 8 is a schematic flowchart of the seventh implementation of the client upgrade method in the embodiment of the present disclosure. Referring to FIG. 8 , when S702 is executed, S801 to S803 are executed.
  • S801 Mount the first client process of the first client.
  • the main process updates the first client, it also needs to mount the currently running first client process, and then execute the received first update file, that is, use the latest update file of the first client. version of the installation file, update the first client, and after the update is completed, restart the updated first client.
  • the main process may also perform: sending indication information to the detection process, where the indication information is used to instruct the first client to update to the latest version.
  • the above indication information carries first version information of the first client, and the second version information is used to indicate the latest version.
  • the first update file is sent to the main process to implement the update of the first client. , avoiding the cumbersome process of the server issuing instructions and improving the client's update efficiency.
  • the detection process and the main process share the client's update files based on communication. There is no need to issue commands through the server to obtain the update files, which improves the client's update efficiency.
  • inventions of the present disclosure provide a client upgrade device.
  • the device can be a chip or a system on a chip in a terminal device, and can also be used in a mobile terminal device to implement the methods described in the above embodiments.
  • function module The client upgrade device can realize the functions performed by the terminal equipment in the above embodiments, and these functions can be realized by hardware executing corresponding software. These hardware or software include one or more modules corresponding to the above functions.
  • Figure 9 is a schematic structural diagram of a client upgrade device in an embodiment of the present disclosure. Referring to Figure 9, the client upgrade device 900 may include: an acquisition module 901 configured to obtain the first version information of the first client.
  • the first version information is used to indicate the current version of the first client;
  • the determination module 902 is configured to determine that the first client needs to be updated based on the first version information;
  • the acquisition module 901 is also configured to obtain the first client's An update file, where the first update file is the installation file of the latest version of the first client;
  • the sending module 903 is configured to send the first update file to the main process.
  • the polling module 904 is configured to obtain client information of N second clients, where N is a positive integer; construct a client queue based on the client information; poll the client queue, and add N
  • the i-th second client among the second clients is determined as the first client, and i is a positive integer.
  • the determination module 902 is also configured to obtain the second version information of the first client, and the second version information is used to indicate the latest version of the first client; compare the first version information with the second version Information; when the current version is different from the latest version, it is determined that the first client needs to be updated.
  • the sending module 903 is also configured to obtain the first check code of the first update file; and is also configured to compare the first check code with the second check code, where the The second verification code is the verification code corresponding to the latest version of the first client in the server; it is also configured to send the first update file to the main process when the first verification code and the second verification code are the same.
  • the determination module 902 is configured to receive indication information from the main process, the indication information is used to instruct the first client to update to the latest version; according to the indication information, update the first version information to the latest version Corresponding second version information.
  • the acquisition module 901, the determination module 902, the sending module 903 and the polling module 904 mentioned in the embodiment of this disclosure can be one or more processors.
  • a client upgrade device which can be a chip or a system-on-chip in a terminal device, or can also be a device in the terminal device used to implement the methods described in the above embodiments.
  • functional module The client upgrade device can realize the functions performed by the terminal equipment in the above embodiments, and these functions can be realized by hardware executing corresponding software. These hardware or software include one or more modules corresponding to the above functions.
  • Figure 10 is a schematic structural diagram of a client upgrade device in an embodiment of the present disclosure.
  • the client upgrade device 1000 may include: a receiving module 1001 configured to receive the first update file from the detection process.
  • the first update file is the installation file of the latest version of the first client;
  • the update module 1002 is configured to update the first client from the current version to the latest version according to the first update file.
  • the startup module 1003 is configured to start the detection process and wait for blocking synchronization queue messages.
  • the startup module 1003 is also configured to mount the first client process of the first client; execute the first update file; and start the updated first client.
  • the sending module 1004 is configured to send indication information to the detection process, where the indication information is used to instruct the first client to update to the latest version.
  • the receiving module 1001, the updating module 1002, the starting module 1003 and the sending module 1004 mentioned in the embodiment of this disclosure can be one or more processors.
  • FIG. 11 is a schematic structural diagram of a terminal device in an embodiment of the present disclosure. As shown in FIG. 11 , the terminal device 1100 can use general computer hardware, including a processor 1101 and a memory 1102 .
  • processor 1101 and the memory 1102 may communicate through the bus 1103.
  • At least one processor 1101 may constitute any physical device having circuitry that performs logical operations on one or more inputs.
  • at least one processor may include one or more integrated circuits (ICs), including application specific integrated circuits (ASICs), microchips, microcontrollers, microprocessors, central processing units (central processing units).
  • Instructions for execution by the at least one processor may, for example, be preloaded into memory integrated with or embedded in the controller, or may be stored in separate memory.
  • Memory can include random access memory (RAM), read-only memory (ROM), hard disk, optical disk, magnetic media, flash memory, other permanent, fixed or volatile memory, or can store instructions any other mechanism.
  • at least one processor may include more than one processor. Each processor can have similar structures, or the processors may have different configurations that are electrically connected or disconnected from each other. For example, the processor may be a separate circuit or integrated in a single circuit. When more than one processor is used, the processors may be configured to operate independently or cooperatively. Processors may be coupled electrically, magnetically, optically, acoustically, mechanically, or by other means that allow them to interact.
  • the present disclosure also provides a computer-readable storage medium on which computer instructions are stored, and the instructions are used by a processor to execute the steps of the above calibration method.
  • Memory 1102 may include computer storage media in the form of volatile and/or nonvolatile memory, such as read-only memory and/or random access memory.
  • Memory 1102 may store an operating system, application programs, other program modules, executable code, program data, user data, and the like.
  • the above-mentioned memory 1102 stores execution instructions for realizing the functions of the acquisition module 901, the determination module 902, the sending module 903, the polling module 904 and the update module 905 in Figure 9.
  • the functions/implementation processes of the acquisition module 901, the determination module 902, the sending module 903, the polling module 904 and the update module 905 in Figure 9 can all be realized by the processor 1101 in Figure 11 calling the execution instructions stored in the memory 1102.
  • the above-mentioned memory 1102 stores execution instructions for realizing the functions of the receiving module 1001, the updating module 1002, the starting module 1003 and the sending module 1004 in Figure 10.
  • the functions/implementation processes of the receiving module 1001, update module 1002, startup module 1003 and sending module 1004 in Figure 10 can all be realized by the processor 1101 in Figure 11 calling the execution instructions stored in the memory 1102.
  • a terminal device including: a memory and a processor; the processor is connected to the memory, is configured to execute computer-executable instructions stored on the memory, and can implement one of the above or Client upgrade methods described in multiple embodiments.
  • embodiments of the present disclosure provide a computer storage medium.
  • the computer storage medium stores computer-executable instructions. After the computer-executable instructions are executed by the processor, the steps described in one or more of the above embodiments can be implemented. Client upgrade method.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Transfer Between Computers (AREA)
  • Stored Programmes (AREA)

Abstract

The present disclosure provides a client upgrading method and apparatus, a terminal device, and a storage medium. The method comprises: acquiring first version information of a first client, the first version information being used for indicating the current version of the first client; according to the first version information, determining that the first client is to be updated; acquiring a first update file of the first client, the first update file being an installation file of the latest version of the first client; and transmitting the first update file to a main process.

Description

一种客户端升级方法、装置、终端设备及存储介质A client upgrade method, device, terminal equipment and storage medium
本公开要求于在2022年08月23日递交的申请号为202211013936.9,发明名称为“一种客户端升级方法、装置、终端设备及存储介质”的中国专利申请的优先权;其全部内容通过引用并入本公开。This disclosure claims the priority of the Chinese patent application with application number 202211013936.9 submitted on August 23, 2022, and the invention name is "a client upgrade method, device, terminal equipment and storage medium"; the entire content of which is by reference incorporated into this disclosure.
技术领域Technical field
本公开涉及但不限于计算机技术领域,尤其涉及一种客户端升级方法、装置、终端设备及存储介质。The present disclosure relates to but is not limited to the field of computer technology, and in particular, to a client upgrade method, device, terminal equipment and storage medium.
背景技术Background technique
随着计算机技术的急速发展,在计算机上运行的客户端种类和数量也越来越多,用户对客户端的要求也越来越高。如此众多的客户端的运行状况也对售后服务提出了一个很大的技术挑战,一种新型适宜的售后方式应运而生,即客户端的在线升级。但现有技术中,开发人员在进行软件升级时,需要完全按照终端设备中的自动升级程序的相关设置进行开发,例如,需要根据自动升级程序中预先设置的获取路径,将特定的更新文件放置在软件升级包的特定位置处,以使得自动升级程序能够获取到该更新文件,这导致开发人员非常被动,灵活性很差。With the rapid development of computer technology, there are more and more types and numbers of clients running on computers, and users have higher and higher requirements for clients. The operating status of so many clients also poses a great technical challenge to after-sales service. A new and suitable after-sales method has emerged, that is, online upgrade of clients. However, in the existing technology, when developers upgrade software, they need to completely follow the relevant settings of the automatic upgrade program in the terminal device. For example, they need to place specific update files according to the preset acquisition path in the automatic upgrade program. At a specific location in the software upgrade package, the automatic upgrade program can obtain the update file, which makes developers very passive and has poor flexibility.
因此,急需一种效率高且不影响用户使用的客户端升级方法。Therefore, there is an urgent need for a client upgrade method that is efficient and does not affect user usage.
发明内容Contents of the invention
本公开提供一种客户端升级方法、装置、终端设备及存储介质,以提高客户端的更新效率。The present disclosure provides a client upgrade method, device, terminal equipment and storage medium to improve client update efficiency.
第一方面,本公开提供一种客户端升级方法,包括:获取第一客户端的第一版本信息,第一版本信息用于指示第一客户端的当前版本;根据第一版本信息,确定第一客户端待更新;获取第一客户端的第一更新文件,第一更新文件为第一客户端的最新版本的安装文件;向主进程发送第一更新文件。In a first aspect, the present disclosure provides a client upgrade method, including: obtaining first version information of the first client, where the first version information is used to indicate the current version of the first client; and determining the first client based on the first version information. The client is to be updated; obtain the first update file of the first client, which is the latest version of the installation file of the first client; and send the first update file to the main process.
第二方面,本公开提供一种客户端升级方法,包括:接收来自检测进程的第一更新文件,第一更新文件为第一客户端的最新版本的安装文件;根据第一更新文件,将第一客户端由当前版本更新为最新版本。In a second aspect, the present disclosure provides a client upgrade method, including: receiving a first update file from a detection process, where the first update file is the latest version of the installation file of the first client; and updating the first update file according to the first update file. The client is updated from the current version to the latest version.
第三方面,本公开提供一种客户端升级装置,该装置可以为终端设备中的芯片或者片上系统,还可以为终端设备中用于实现第一方面及其任一种可能的实施方式所述方法的功能模块。该客户端升级装置可以实现第一方面及其任一种可能的实施方式所述终端设备所执行的功能,所述功能可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或者多个上述功能相应的模块。该客户端 升级装置包括:获取模块,被配置为获取第一客户端的第一版本信息,第一版本信息用于指示第一客户端的当前版本;确定模块,被配置为根据第一版本信息,确定第一客户端待更新;获取模块,还被配置为获取第一客户端的第一更新文件,第一更新文件为第一客户端的最新版本的安装文件;发送模块,被配置为向主进程发送第一更新文件。In a third aspect, the present disclosure provides a client upgrade device, which may be a chip or a system on a chip in a terminal device, or may be used in a terminal device to implement the first aspect and any of its possible implementations. The function module of the method. The client upgrade device can realize the functions performed by the terminal device described in the first aspect and any of its possible implementation modes, and the functions can be realized by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions. The client The upgrade device includes: an acquisition module configured to obtain first version information of the first client, where the first version information is used to indicate the current version of the first client; and a determination module configured to determine the first client based on the first version information. The terminal is to be updated; the acquisition module is also configured to obtain the first update file of the first client, which is the latest version of the installation file of the first client; the sending module is configured to send the first update file to the main process .
第四方面,本公开提供一种客户端升级装置,该装置可以为终端设备中的芯片或者片上系统,还可以为终端设备中用于实现第一方面及其任一种可能的实施方式所述方法的功能模块。该客户端升级装置可以实现第一方面及其任一种可能的实施方式所述终端设备所执行的功能,所述功能可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或者多个上述功能相应的模块。该客户端升级装置包括:接收模块,被配置为接收来自检测进程的第一更新文件,第一更新文件为第一客户端的最新版本的安装文件;更新模块,被配置为根据第一更新文件,将第一客户端由当前版本更新为最新版本。In a fourth aspect, the present disclosure provides a client upgrade device, which may be a chip or a system on a chip in a terminal device, or may be used in a terminal device to implement the first aspect and any of its possible implementations. The function module of the method. The client upgrade device can realize the functions performed by the terminal device described in the first aspect and any of its possible implementation modes, and the functions can be realized by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions. The client upgrade device includes: a receiving module configured to receive a first update file from the detection process, where the first update file is the installation file of the latest version of the first client; an update module configured to receive the first update file according to the first update file, Update the first client from the current version to the latest version.
第五方面,本公开提供一种终端设备,包括:存储器和处理器;处理器与存储器连接,被配置为执行存储在存储器上的计算机可执行指令,以实现如第一方面、第二方面及其任一可能的实施方式所述的方法。In a fifth aspect, the present disclosure provides a terminal device, including: a memory and a processor; the processor is connected to the memory and is configured to execute computer-executable instructions stored on the memory to implement the first aspect, the second aspect and The method described in any possible embodiment thereof.
第六方面,本公开提供一种计算机可读存储介质,该计算机可读存储介质存储有计算机可执行指令,计算机可执行指令被处理器执行后能够实现如第一方面、第二方面及其任一可能的实施方式所述的方法。In a sixth aspect, the present disclosure provides a computer-readable storage medium that stores computer-executable instructions. After being executed by a processor, the computer-executable instructions can implement the first aspect, the second aspect, and any of the following. A possible implementation of the method.
本公开提供的技术方案与现有技术相比存在的有益效果是:Compared with the existing technology, the technical solution provided by the present disclosure has the following beneficial effects:
在本公开中,检测进程通过获取第一客户端的第一版本信息,第一版本信息用于指示第一客户端的当前版本;根据第一版本信息,确定第一客户端待更新;获取第一客户端的第一更新文件,第一更新文件为第一客户端的最新版本的安装文件;向主进程发送第一更新文件。如此,根据获得的第一客户端的第一版本信息,确定第一客户端处于待更新状态时,向主进程发送第一更新文件,同时,由于检测进程和主进程之间的通信连接,能够达到共享更新文件的目的,从而避免了更新过程中服务器下发指令的繁琐操作,提高了客户端的更新效率。In the present disclosure, the detection process obtains the first version information of the first client, and the first version information is used to indicate the current version of the first client; determines that the first client needs to be updated based on the first version information; obtains the first client The first update file of the first client is the installation file of the latest version of the first client; and the first update file is sent to the main process. In this way, according to the obtained first version information of the first client, when it is determined that the first client is in a state to be updated, the first update file is sent to the main process. At the same time, due to the communication connection between the detection process and the main process, it can be achieved The purpose of sharing update files is to avoid the cumbersome operation of the server issuing instructions during the update process and improve the client's update efficiency.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开的保护范围。It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit the scope of the present disclosure.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开实施例,并与说明书一起用于解释本公开实施例的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description serve to explain the principles of the disclosed embodiments.
图1为本公开实施例中的客户端升级框架的结构示意图;Figure 1 is a schematic structural diagram of a client upgrade framework in an embodiment of the present disclosure;
图2为本公开实施例中的客户端升级方法的第一种实施流程示意图;Figure 2 is a schematic flowchart of the first implementation of the client upgrade method in an embodiment of the present disclosure;
图3为本公开实施例中的客户端升级方法的第二种实施流程示意图;Figure 3 is a schematic flowchart of the second implementation of the client upgrade method in an embodiment of the present disclosure;
图4为本公开实施例中的客户端升级方法的第三种实施流程示意图; Figure 4 is a schematic flowchart of the third implementation of the client upgrade method in an embodiment of the present disclosure;
图5为本公开实施例中的客户端升级方法的第四种实施流程示意图;Figure 5 is a schematic flowchart of the fourth implementation of the client upgrade method in an embodiment of the present disclosure;
图6为本公开实施例中的客户端升级方法的第五种实施流程示意图;Figure 6 is a schematic flowchart of the fifth implementation of the client upgrade method in the embodiment of the present disclosure;
图7为本公开实施例中的客户端升级方法的第六种实施流程示意图;Figure 7 is a schematic flowchart of the sixth implementation of the client upgrade method in the embodiment of the present disclosure;
图8为本公开实施例中的客户端升级方法的第七种实施流程示意图;Figure 8 is a schematic flowchart of the seventh implementation of the client upgrade method in the embodiment of the present disclosure;
图9为本公开实施例中的客户端升级装置的一种结构示意图;Figure 9 is a schematic structural diagram of a client upgrade device in an embodiment of the present disclosure;
图10为本公开实施例中的客户端升级装置的另一种结构示意图;Figure 10 is another structural schematic diagram of a client upgrade device in an embodiment of the present disclosure;
图11为本公开实施例中的一种终端设备的结构示意图。Figure 11 is a schematic structural diagram of a terminal device in an embodiment of the present disclosure.
具体实施方式Detailed ways
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开实施例相一致的所有实施方式。相反,它们仅是本公开实施例的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with embodiments of the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of embodiments of the present disclosure.
在本公开实施例使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本公开实施例。在本公开实施例所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。The terminology used in the embodiments of the present disclosure is for the purpose of describing specific embodiments only and is not intended to limit the embodiments of the present disclosure. As used in the embodiments of the present disclosure, the singular forms "a," "the" and "the" are intended to include the plural forms as well, unless the context clearly dictates otherwise. It will also be understood that the term "and/or" as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
下面结合本公开实施例中的附图对本公开实施例进行描述。以下描述中,参考形成本公开实施例一部分并以说明之方式示出本公开实施例的具体方面或可使用本公开实施例的具体方面的附图。应理解,本公开实施例可在其它方面中使用,并可包括附图中未描绘的结构或逻辑变化。因此,以下详细描述不应以限制性的意义来理解。例如,应理解,结合所描述方法的揭示内容可以同样适用于用于执行所述方法的对应设备或系统,且反之亦然。例如,如果描述一个或多个具体方法步骤,则对应的设备可以包含如功能单元等一个或多个单元,来执行所描述的一个或多个方法步骤(例如,一个单元执行一个或多个步骤,或多个单元,其中每个都执行多个步骤中的一个或多个),即使附图中未明确描述或说明这种一个或多个单元。另一方面,例如,如果基于如功能单元等一个或多个单元描述具体装置,则对应的方法可以包含一个步骤来执行一个或多个单元的功能性(例如,一个步骤执行一个或多个单元的功能性,或多个步骤,其中每个执行多个单元中一个或多个单元的功能性),即使附图中未明确描述或说明这种一个或多个步骤。应理解的是,除非另外明确提出,本文中所描述的各示例性实施例和/或方面的特征可以相互组合。The embodiments of the present disclosure will be described below with reference to the drawings in the embodiments of the present disclosure. In the following description, reference is made to the accompanying drawings which form a part hereof and illustrate by way of illustration specific aspects of the disclosed embodiments or in which specific aspects of the disclosed embodiments may be used. It is to be understood that the disclosed embodiments may be utilized in other aspects and may incorporate structural or logical changes not depicted in the drawings. Accordingly, the following detailed description should not be taken in a limiting sense. For example, it should be understood that disclosure in connection with the described methods may equally apply to corresponding devices or systems for performing the methods, and vice versa. For example, if one or more specific method steps are described, the corresponding device may include one or more units, such as functional units, to perform the one or more described method steps (e.g., one unit performs one or more steps , or a plurality of units, each of which performs one or more of a plurality of steps), even if such unit or units are not explicitly depicted or illustrated in the drawings. On the other hand, for example, if a specific apparatus is described based on one or more units such as functional units, the corresponding method may include a step to perform the functionality of the one or more units (e.g., a step to perform the functionality of the one or more units) functionality, or a plurality of steps, each of which performs the functionality of one or more of a plurality of units), even if such one or more steps are not explicitly depicted or illustrated in the drawings. It is to be understood that, unless expressly stated otherwise, features of various exemplary embodiments and/or aspects described herein may be combined with each other.
随着客户端升级技术的发展和完善,通过服务器获取客户端的升级安装包对客户端进行自动更新,或者通过服务器对执行模块下发更新指令对客户端进行更新,成为当前客户端升级领域的重要方式。而在计算机领域中只要涉及到客户端,则必然会存在客户端升级的需求,对客户端升级是计算机领域中最重要的业务,也是保证客户端正常运行的必要技术。With the development and improvement of client upgrade technology, obtaining the client's upgrade installation package through the server to automatically update the client, or updating the client through the server issuing update instructions to the execution module, has become an important issue in the current client upgrade field. Way. As long as the client is involved in the computer field, there will inevitably be a need for client upgrade. Client upgrade is the most important business in the computer field, and it is also a necessary technology to ensure the normal operation of the client.
因此,急需一种较为合适的客户端升级方法。 Therefore, a more suitable client upgrade method is urgently needed.
为了解决上述问题,本公开实施例提供了一种客户端升级框架示意图,参加图1所示。In order to solve the above problem, an embodiment of the present disclosure provides a schematic diagram of a client upgrade framework, as shown in Figure 1 .
客户端升级框架是一种多线程运行的框架,是由检测进程100、主进程200和多个客户端进程(如第一客户端进程300、第二客户端进程400等)构成的,其中检测进程100和主进程200维持通信,共享客户端的版本信息,检测进程100主要用于获取客户端的更新文件,主进程200主要用于挂载客户端的进程(即客户端进程),以对客户端进行更新,并在客户端更新后,重启客户端。当然,上述检测进程、主进程以及多个客户端进程也可以理解为检测线程、主线程以及多个客户端线程,本公开实施例中对此不作具体限定。The client upgrade framework is a multi-threaded framework, which is composed of a detection process 100, a main process 200 and multiple client processes (such as the first client process 300, the second client process 400, etc.). The detection process The process 100 and the main process 200 maintain communication and share the client's version information. The detection process 100 is mainly used to obtain the client's update file. The main process 200 is mainly used to mount the client's process (i.e., the client process) to perform maintenance on the client. Update, and after the client is updated, restart the client. Of course, the above-mentioned detection process, main process and multiple client processes can also be understood as detection threads, main threads and multiple client threads, which are not specifically limited in the embodiments of the present disclosure.
需要说明的是,客户端升级框架可以应用于操作系统可以是移动操作系统ios系统;可以应用于基于Linux的自由及开放源代码的操作系统Android系统;也可以应用于Windows系统;也可以应用于基于Linux的自由及开放源代码的便携设备操作系统MeeGo系统;也可以应用于一种嵌入式操作系统Palm webOS系统。当然,客户端升级框架也可以应用于其它类型的操作系统,本公开实施例对此不作具体限定。It should be noted that the client upgrade framework can be applied to the operating system, which can be the mobile operating system ios system; it can be applied to the free and open source operating system Android system based on Linux; it can also be applied to the Windows system; it can also be applied to MeeGo system, a free and open source portable device operating system based on Linux; can also be applied to Palm webOS system, an embedded operating system. Of course, the client upgrade framework can also be applied to other types of operating systems, and this is not specifically limited in the embodiments of the present disclosure.
下面结合上述客户端升级框架,对本公开实施例提供的升级方法进行说明。The upgrade method provided by the embodiment of the present disclosure will be described below in conjunction with the above-mentioned client upgrade framework.
本公开实施例提供的客户端升级方法可以应用于上述客户端升级框架中的检测进程100。The client upgrade method provided by the embodiment of the present disclosure can be applied to the detection process 100 in the above client upgrade framework.
图2为本公开实施例中的客户端升级方法的第一种实施流程示意图,参见图2所示,该客户端升级方法可以包括:Figure 2 is a schematic flowchart of the first implementation of the client upgrade method in an embodiment of the present disclosure. Referring to Figure 2, the client upgrade method may include:
S201,获取第一客户端的第一版本信息。S201: Obtain the first version information of the first client.
其中,第一版本信息用于指示第一客户端的当前版本。The first version information is used to indicate the current version of the first client.
应理解的,检测进程在进行客户端进程升级之前,可以获取待升级的客户端(即第一客户端)的版本信息(即第一版本信息)。这里,第一客户端可以理解为待更新客户端,第一版本信息可以理解为待更新客户端的当前版本信息。It should be understood that before upgrading the client process, the detection process may obtain the version information (ie, first version information) of the client to be upgraded (ie, the first client). Here, the first client can be understood as the client to be updated, and the first version information can be understood as the current version information of the client to be updated.
在一实例中,第一客户端可以为web客户端,如浏览器A、浏览器B、浏览器C等页面浏览器;第一客户端也可以为游戏客户端,如游戏A、游戏B、游戏C等游戏;第一客户端也可以为移动设备客户端,如运行在手机上的聊天软件A、短视频软件B、购物软件C等。当然,第一客户端可以是其它类型的客户端,也可以是其它系统上的客户端,本公开实施例对此不作具体限定。In one example, the first client can be a web client, such as browser A, browser B, browser C, etc.; the first client can also be a game client, such as game A, game B, Game C and other games; the first client can also be a mobile device client, such as chat software A, short video software B, shopping software C, etc. running on a mobile phone. Of course, the first client may be another type of client or a client on another system, which is not specifically limited in this embodiment of the disclosure.
在一些可能的实施方式中,第一版本信息可以包含第一客户端的客户端名称、客户端版本号、更新内容、兼容性信息等。其中,客户端名称用于表明第一客户端的名称,客户端版本号用于指示第一客户端当前版本的版本号,更新内容用于指示第一客户端当前版本的功能描述,兼容性信息用于指示第一客户端当前版本的兼容信息(如兼容的操作系统的版本信息、兼容的硬件信息、兼容的设备信息等)。In some possible implementations, the first version information may include the client name, client version number, update content, compatibility information, etc. of the first client. Among them, the client name is used to indicate the name of the first client, the client version number is used to indicate the version number of the current version of the first client, the update content is used to indicate the function description of the current version of the first client, and the compatibility information is Compatible information indicating the current version of the first client (such as compatible operating system version information, compatible hardware information, compatible device information, etc.).
S202,根据第一版本信息,确定第一客户端待更新。S202: Determine that the first client needs to be updated based on the first version information.
可以理解的,检测进程在得到第一版本信息之后,可以根据第一版本信息确定第一客户端需要更新。示例性的,检测进程比对第一客户端当前版本的版本号与第一客户端最新版本的版本号。若两者不一致时,确定第一客户端需要更新,若两者一致时,确定第一客户端当前版本为新版本,不 需要更新。It can be understood that after the detection process obtains the first version information, it can determine that the first client needs to be updated based on the first version information. For example, the detection process compares the version number of the current version of the first client with the version number of the latest version of the first client. If the two are inconsistent, it is determined that the first client needs to be updated. If the two are consistent, it is determined that the current version of the first client is a new version. need to be updated.
在一些可能的实施方式中,检测进程可以从服务器获得第一客户端的最新版本信息,如最新版本的版本号。例如,检测进程可以向服务器请求上述最新版本信息,或者,检测进程也可以接收服务器下发的上述最新版本信息。当然,检测进程还可以通过其他方式获得第一客户端的最新版本信息,本公开实施例对此不作具体限定。In some possible implementations, the detection process may obtain the latest version information of the first client from the server, such as the version number of the latest version. For example, the detection process may request the above-mentioned latest version information from the server, or the detection process may also receive the above-mentioned latest version information issued by the server. Of course, the detection process can also obtain the latest version information of the first client through other methods, which is not specifically limited in this embodiment of the disclosure.
在一些可能的实施方式中,检测进程在执行上述S202时,还可以执行S301至S303。图3为本公开实施例中的客户端升级方法的第二种实施流程示意图,参见图3所示,在执行S202时,执行S301至S303。In some possible implementations, when the detection process executes S202 above, it may also execute S301 to S303. Figure 3 is a schematic flowchart of the second implementation of the client upgrade method in the embodiment of the present disclosure. Referring to Figure 3, when S202 is executed, S301 to S303 are executed.
S301,获取第一客户端的第二版本信息。S301. Obtain the second version information of the first client.
这里,第二版本信息用于指示第一客户端的最新版本。Here, the second version information is used to indicate the latest version of the first client.
可以理解的,检测进程在通过上述S201得到第一版本信息后,还需要获取第一客户端的第二版本信息,即第一客户端的最新版本信息,以便于检测进程可以根据第一版本信息和第二版本信息确定第一客户端是否需要更新。It is understandable that after obtaining the first version information through the above S201, the detection process also needs to obtain the second version information of the first client, that is, the latest version information of the first client, so that the detection process can obtain the first version information according to the first version information and the second version information. The second version information determines whether the first client needs to be updated.
S302,比对第一版本信息与第二版本信息。S302: Compare the first version information and the second version information.
可以理解的,检测进程在通过上述S301得到第二版本信息后,将上述S201得到的第一版本信息与第二版本信息进行比对处理,以此来判断第一客户端的当前版本与最新版本是否相同。It can be understood that, after obtaining the second version information through the above S301, the detection process compares the first version information obtained in the above S201 with the second version information to determine whether the current version of the first client is the latest version. same.
在一些可能的实施方式中,在得到第一版本信息、第二版本信息后,检测进程对第一版本信息、第二版本信息进行信息提取处理。示例性,可以根据版本信息中的客户端序列号进行比对,确定第一版本信息中的客户端序列号与第二版本信息中的客户端序列号的是否相同。In some possible implementations, after obtaining the first version information and the second version information, the detection process performs information extraction processing on the first version information and the second version information. For example, a comparison can be performed based on the client serial number in the version information to determine whether the client serial number in the first version information and the client serial number in the second version information are the same.
S303,当当前版本与最新版本不同时,确定第一客户端待更新。S303: When the current version is different from the latest version, determine that the first client needs to be updated.
可以理解的,在上述S302比对第一版本信息和第二版本信息后,判断当前版本与最新版本是否不同,若第一版本信息和第二版本信息相同,则可以确定第一客户端待更新。若第一版本信息和第二版本信息不相同,则执行上述S303。It can be understood that after comparing the first version information and the second version information in the above S302, it is determined whether the current version is different from the latest version. If the first version information and the second version information are the same, it can be determined that the first client needs to be updated. . If the first version information and the second version information are not the same, perform the above S303.
在一些可能的实施方式中,当前版本与最新版本不同,可以理解为第二版本信息的客户端序列号高于第一版本信息的客户端序列号。In some possible implementations, the current version is different from the latest version, which can be understood to mean that the client serial number of the second version information is higher than the client serial number of the first version information.
S203,获取第一客户端的第一更新文件。S203. Obtain the first update file of the first client.
其中,第一更新文件为第一客户端的最新版本的安装文件。Wherein, the first update file is the installation file of the latest version of the first client.
可以理解的,检测进程在确认第一客户端需要更新后,可以直接从服务器中获取第一客户端的第一更新文件,其中,第一更新文件可以是预先通过服务器生成的用于存储待更新客户端的安装文件。示例性的,检测进程通过超文本传输协议(hyper text transfer protocol,HTTP)读取存储于服务器(如云存储服务器)上的第一更新文件。It can be understood that after confirming that the first client needs to be updated, the detection process can directly obtain the first update file of the first client from the server, where the first update file can be generated in advance by the server and used to store the client to be updated. end installation files. Illustratively, the detection process reads the first update file stored on the server (such as a cloud storage server) through hypertext transfer protocol (HTTP).
在一些可能的实施方式中,第一更新文件可以包括更新文件类型、更新文件建立时间、更新文件解压路径、更新文件存放路径、更新备份路径、适用系统版本信息、语言包等。当然,第一更新文件也可以包含其他内容,本公开实施例对此不作具体限定, In some possible implementations, the first update file may include update file type, update file creation time, update file decompression path, update file storage path, update backup path, applicable system version information, language pack, etc. Of course, the first update file may also contain other content, which is not specifically limited in this embodiment of the disclosure.
S204,向主进程发送第一更新文件。S204: Send the first update file to the main process.
可以理解的,当检测进程得到第一客户端的第一更新文件后,可以将第一更新文件发送给主进程,以便于主进程可以根据接收的第一更新文件对第一客户端进行更新处理。It can be understood that after the detection process obtains the first update file of the first client, the first update file can be sent to the main process, so that the main process can update the first client based on the received first update file.
由此可见,在本公开实施例中,检测进程在确定第一客户端需要更新后,检测进程直接获取第一客户端的第一更新文件,不需要经由服务器下发命令后再获取更新文件,以提高客户端的更新效率。It can be seen from this that in the embodiment of the present disclosure, after the detection process determines that the first client needs to be updated, the detection process directly obtains the first update file of the first client, and does not need to issue a command through the server to obtain the update file. Improve client update efficiency.
在一些可能的实施方式中,检测进程在执行上述S201之前,还可以执行S401至S403。图4为本公开实施例中的客户端升级方法的第三种实施流程示意图,参见图4所示,在执行S201之前,执行S401至S403。In some possible implementations, before executing S201 above, the detection process may also execute S401 to S403. Figure 4 is a schematic flowchart of the third implementation of the client upgrade method in an embodiment of the present disclosure. Referring to Figure 4, before executing S201, S401 to S403 are executed.
S401,获取N个第二客户端的客户端信息;S402,根据客户端信息,构建客户端队列;S403,轮询客户端队列,将N个第二客户端中的第i个第二客户端确定为第一客户端,其中,N为正整数,i为正整数。S401, obtain the client information of N second clients; S402, build a client queue according to the client information; S403, poll the client queue, and determine the i-th second client among the N second clients. is the first client, where N is a positive integer and i is a positive integer.
可以理解的,在进行客户端升级的过程中,需要先确定一待更新客户端,那么,可以获取N个待更新的客户端(即第二客户端)的客户端信息。此时,对于需要进行升级的客户端来说,根据当前获取的一个或者N个第二客户端的客户端信息,构建客户端队列;并依次轮询客户端队列中的各个第二客户端,将第二客户端中的第i个第二客户端确定为第一客户端。那么,第一客户端可以理解为从客户端队列中确定的一个客户端。It is understandable that during the client upgrade process, it is necessary to first determine a client to be updated, and then the client information of N clients to be updated (ie, the second client) can be obtained. At this time, for the client that needs to be upgraded, a client queue is constructed based on the currently obtained client information of one or N second clients; and each second client in the client queue is polled in turn, and The i-th second client among the second clients is determined as the first client. Then, the first client can be understood as a client determined from the client queue.
在一些可能的实施方式中,客户端信息可以包括客户端类型,客户端版本信息,客户端更新文件等。当然,客户端信息也可以包括其他用于表示当前客户端的信息,本公开对此不作具体限定。示例性的,上述N个第二客户端可以记为A1、A2、A3、……、AN,A用于指示待更新的第二客户端。In some possible implementations, the client information may include client type, client version information, client update files, etc. Of course, the client information may also include other information used to represent the current client, and this disclosure does not specifically limit this. For example, the above-mentioned N second clients can be recorded as A1, A2, A3, ..., AN, and A is used to indicate the second client to be updated.
在一些可能的实施方式中,在确定第一客户端待更新后,检测进程可以对第一更新文件进行校验。那么,图5为本公开实施例中的客户端升级方法的第四种实施流程示意图,参见图5所示,在执行S204时,执行S501至S503。In some possible implementations, after determining that the first client needs to be updated, the detection process may verify the first update file. Then, Figure 5 is a schematic flowchart of the fourth implementation of the client upgrade method in the embodiment of the present disclosure. Referring to Figure 5 , when S204 is executed, S501 to S503 are executed.
S501,获取第一更新文件的第一校验码。S501: Obtain the first verification code of the first updated file.
S502,将第一校验码与第二校验码进行比较。S502: Compare the first check code with the second check code.
这里,第二校验码为服务器中第一客户端的最新版本对应的校验码。Here, the second verification code is the verification code corresponding to the latest version of the first client in the server.
S503,当第一校验码与第二校验码相同时,向主进程发送第一更新文件。S503: When the first verification code and the second verification code are the same, send the first update file to the main process.
可以理解的,检测进程在向主进程发送第一更新文件之前,需要先确定当前得到的第一更新文件是否正确,那么,可以获取第一更新文件的第一校验码以及服务器中第一客户端的最新版本对应的校验码,将第一校验码和第二校验码进行比较,当比较结果显示相同时,则可以确定当前得到的第一更新文件是无误的,然后,将第一更新文件发送给主进程,便于主进程可以根据第一更新文件对第一客户端进行升级处理。It can be understood that before sending the first update file to the main process, the detection process needs to first determine whether the currently obtained first update file is correct. Then, the first check code of the first update file and the first client in the server can be obtained. The check code corresponding to the latest version of the client is compared, and the first check code and the second check code are compared. When the comparison results show the same, it can be determined that the currently obtained first update file is correct, and then the first update file is The update file is sent to the main process so that the main process can upgrade the first client based on the first update file.
在一些可能的实施方式中,第一校验码和第二校验码可以为MD5值。当然,校验码也可以是其 它算法的数值,本公开对此不作具体限定。In some possible implementations, the first check code and the second check code may be MD5 values. Of course, the check code can also be other This disclosure does not specifically limit the numerical value of its algorithm.
需要说明的是,MD5校验原理:在检测进程需要向主进程发送第一更新文件之前,需要对第一更新文件进行提取处理,得到第一更新文件相应的MD5值,同时,还需要从服务器中获取第一客户端最新版本对应的MD5值,将得到的两个校验码进行比较,若该比较结果显示校验码一致,则可以确定检测进程拉取的第一更新文件没有出错,若该比较结果显示校验码不一致,则可以确定检测进程拉取的第一更新文件出错了,需要从新拉取第一更新文件。It should be noted that the MD5 verification principle: before the detection process needs to send the first update file to the main process, the first update file needs to be extracted and processed to obtain the corresponding MD5 value of the first update file. At the same time, it also needs to obtain the MD5 value from the server. Obtain the MD5 value corresponding to the latest version of the first client and compare the two obtained check codes. If the comparison result shows that the check codes are consistent, it can be determined that there is no error in the first update file pulled by the detection process. If If the comparison result shows that the check codes are inconsistent, it can be determined that the first update file pulled by the detection process is incorrect, and the first update file needs to be pulled again.
在一些可能的实施方式中,检测进程在执行上述S204之后,还可以执行S601至S603。图6为本公开实施例中的客户端升级方法的第五种实施流程示意图,参见图6所示,在执行S204之后,还执行S601至S602。In some possible implementations, after executing the above-mentioned S204, the detection process may also execute S601 to S603. FIG. 6 is a schematic flowchart of the fifth implementation of the client upgrade method in an embodiment of the present disclosure. Referring to FIG. 6 , after executing S204, S601 to S602 are also executed.
S601,接收来自主进程的指示信息。S601. Receive instruction information from the main process.
这里,指示信息用于指示第一客户端更新为最新版本。Here, the indication information is used to instruct the first client to update to the latest version.
S602,根据指示信息,将第一版本信息更新为最新版本对应的第二版本信息。S602: Update the first version information to the second version information corresponding to the latest version according to the instruction information.
可以理解的,检测进程在将第一更新文件发送给主进程之后,还可以接收主进程发送的指示信息,此时,检测进程可以根据接收的指示信息,将第一版本信息更新为第一客户端最新版本对应的第二版本信息,便于检测进程继续轮询客户端队列。It can be understood that after sending the first update file to the main process, the detection process can also receive the instruction information sent by the main process. At this time, the detection process can update the first version information to the first client according to the received instruction information. The second version information corresponding to the latest version of the client is convenient for the detection process to continue polling the client queue.
在一些可能的实施方式中,上述指示信息中携带有第一客户端的第一版本信息,第二版本信息用于指示最新版本。In some possible implementations, the above indication information carries first version information of the first client, and the second version information is used to indicate the latest version.
本公开实施例提供的客户端升级方法可以应用于上述客户端升级框架中的主进程200。The client upgrade method provided by the embodiment of the present disclosure can be applied to the main process 200 in the above client upgrade framework.
那么,图7为本公开实施例中的客户端升级方法的第六种实施流程示意图,参见图7所示,该客户端升级方法可以包括:Then, Figure 7 is a schematic flowchart of the sixth implementation of the client upgrade method in the embodiment of the present disclosure. Referring to Figure 7, the client upgrade method may include:
S701,接收来自检测进程的第一更新文件。S701. Receive the first update file from the detection process.
这里,第一更新文件为第一客户端的最新版本的安装文件。Here, the first update file is the installation file of the latest version of the first client.
可以理解的,主进程接收到来自检测进程发送的第一更新文件。It can be understood that the main process receives the first update file sent from the detection process.
S702,根据第一更新文件,将第一客户端由当前版本更新为最新版本。S702: Update the first client from the current version to the latest version according to the first update file.
可以理解的,主进程可以根据从上述S701得到的第一更新文件,将当前版本的第一客户端更新为最新版本的第一客户端。It can be understood that the main process can update the current version of the first client to the latest version of the first client based on the first update file obtained from the above S701.
在一些可能的实施方式中,主进程在执行上述S701之前,还可以执行:启动检测进程,并等待阻塞同步队列消息。In some possible implementations, before executing the above S701, the main process may also perform: start the detection process and wait for the blocking synchronization queue message.
可以理解的,检测进程会通过阻塞同步队列发送消息给主进程,通知主进程进行下一步操作。It is understandable that the detection process will send a message to the main process through the blocking synchronization queue to notify the main process of the next operation.
在一些可能的实施方式中,主进程在执行上述S702时,还可以执行S801至S803。图8为本公开实施例中的客户端升级方法的第七种实施流程示意图,参见图8所示,在执行S702时,执行S801至S803。In some possible implementations, when executing S702 above, the main process may also execute S801 to S803. FIG. 8 is a schematic flowchart of the seventh implementation of the client upgrade method in the embodiment of the present disclosure. Referring to FIG. 8 , when S702 is executed, S801 to S803 are executed.
S801,挂载第一客户端的第一客户端进程。S801: Mount the first client process of the first client.
S802,执行第一更新文件。 S802, execute the first update file.
S803,启动更新后的第一客户端。S803, start the updated first client.
可以理解的,主进程在对第一客户端进行更新时,还需要将当前运行中的第一客户端进程挂载起来,之后,执行所接收的第一更新文件,即使用第一客户端的最新版本的安装文件,对第一客户端进行更新处理,更新完成后,重新启动更新后的第一客户端。It is understandable that when the main process updates the first client, it also needs to mount the currently running first client process, and then execute the received first update file, that is, use the latest update file of the first client. version of the installation file, update the first client, and after the update is completed, restart the updated first client.
在一些可能的实施方式中,主进程在执行上述S702之后,还可以执行:向检测进程发送指示信息,这里,指示信息用于指示第一客户端更新为最新版本。In some possible implementations, after executing the above S702, the main process may also perform: sending indication information to the detection process, where the indication information is used to instruct the first client to update to the latest version.
在一些可能的实施方式中,上述指示信息中携带有第一客户端的第一版本信息,第二版本信息用于指示最新版本。In some possible implementations, the above indication information carries first version information of the first client, and the second version information is used to indicate the latest version.
至此,便完成了客户端的升级过程。At this point, the client upgrade process is completed.
由此可见,在本公开实施例中,可以根据获得的第一客户端的第一版本信息,确定第一客户端处于待更新状态时,向主进程发送第一更新文件,实现第一客户端的更新,避免了服务器下发指令的繁琐过程,提高了客户端的更新效率。另外,检测进程和主进程基于通信的方式,实现了共享客户端的更新文件,不需要经由服务器下发命令后再获取更新文件,提高了客户端的更新效率。It can be seen that in the embodiment of the present disclosure, when it is determined that the first client is in a state to be updated based on the obtained first version information of the first client, the first update file is sent to the main process to implement the update of the first client. , avoiding the cumbersome process of the server issuing instructions and improving the client's update efficiency. In addition, the detection process and the main process share the client's update files based on communication. There is no need to issue commands through the server to obtain the update files, which improves the client's update efficiency.
基于相同的发明构思,本公开实施例提供了一种客户端升级装置,该装置可以为终端设备中的芯片或者片上系统,还可以为移动终端设备中用于实现上述各个实施例所述的方法的功能模块。该客户端升级装置可以实现上述各实施例中终端设备所执行的功能,这些功能可以通过硬件执行相应的软件实现。这些硬件或软件包括一个或多个上述功能相应的模块。图9为本公开实施例中的客户端升级装置的一种结构示意图,参见图9所示,客户端升级装置900,可以包括:获取模块901,被配置为获取第一客户端的第一版本信息,第一版本信息用于指示第一客户端的当前版本;确定模块902,被配置为根据第一版本信息,确定第一客户端待更新;获取模块901,还被配置为获取第一客户端的第一更新文件,第一更新文件为第一客户端的最新版本的安装文件;发送模块903,被配置为向主进程发送第一更新文件。Based on the same inventive concept, embodiments of the present disclosure provide a client upgrade device. The device can be a chip or a system on a chip in a terminal device, and can also be used in a mobile terminal device to implement the methods described in the above embodiments. function module. The client upgrade device can realize the functions performed by the terminal equipment in the above embodiments, and these functions can be realized by hardware executing corresponding software. These hardware or software include one or more modules corresponding to the above functions. Figure 9 is a schematic structural diagram of a client upgrade device in an embodiment of the present disclosure. Referring to Figure 9, the client upgrade device 900 may include: an acquisition module 901 configured to obtain the first version information of the first client. , the first version information is used to indicate the current version of the first client; the determination module 902 is configured to determine that the first client needs to be updated based on the first version information; the acquisition module 901 is also configured to obtain the first client's An update file, where the first update file is the installation file of the latest version of the first client; the sending module 903 is configured to send the first update file to the main process.
在一些可能的实施方式中,轮询模块904,被配置为获取N个第二客户端的客户端信息,N为正整数;根据客户端信息,构建客户端队列;轮询客户端队列,将N个第二客户端中的第i个第二客户端确定为第一客户端,i为正整数。In some possible implementations, the polling module 904 is configured to obtain client information of N second clients, where N is a positive integer; construct a client queue based on the client information; poll the client queue, and add N The i-th second client among the second clients is determined as the first client, and i is a positive integer.
在一些可能的实施方式中,确定模块902,还被配置为获取第一客户端的第二版本信息,第二版本信息用于指示第一客户端的最新版本;比对第一版本信息与第二版本信息;当当前版本与最新版本不同时,确定第一客户端待更新。In some possible implementations, the determination module 902 is also configured to obtain the second version information of the first client, and the second version information is used to indicate the latest version of the first client; compare the first version information with the second version Information; when the current version is different from the latest version, it is determined that the first client needs to be updated.
在一些可能的实施方式中,发送模块903,还被配置为获取第一更新文件的第一校验码;还被配置为将第一校验码与第二校验码进行比较,其中,第二校验码为服务器中第一客户端的最新版本对应的校验码;还被配置为当第一校验码与第二校验码相同时,向主进程发送第一更新文件。In some possible implementations, the sending module 903 is also configured to obtain the first check code of the first update file; and is also configured to compare the first check code with the second check code, where the The second verification code is the verification code corresponding to the latest version of the first client in the server; it is also configured to send the first update file to the main process when the first verification code and the second verification code are the same.
在一些可能的实施方式中,确定模块902,被配置为接收来自主进程的指示信息,指示信息用于指示第一客户端更新为最新版本;根据指示信息,将第一版本信息更新为最新版本对应的第二版本信息。 In some possible implementations, the determination module 902 is configured to receive indication information from the main process, the indication information is used to instruct the first client to update to the latest version; according to the indication information, update the first version information to the latest version Corresponding second version information.
需要说明的是,获取模块901、确定模块902、发送模块903和轮询模块904的具体实现过程可参考图2至图6实施例的详细描述。It should be noted that for the specific implementation process of the acquisition module 901, the determination module 902, the sending module 903 and the polling module 904, reference can be made to the detailed description of the embodiments in Figures 2 to 6.
本公开实施例中提到的获取模块901、确定模块902、发送模块903和轮询模块904可以为一个或者多个处理器。The acquisition module 901, the determination module 902, the sending module 903 and the polling module 904 mentioned in the embodiment of this disclosure can be one or more processors.
基于相同的发明构思,本公开实施例提供了一种客户端升级装置,该装置可以为终端设备中的芯片或者片上系统,还可以为终端设备中用于实现上述各个实施例所述的方法的功能模块。该客户端升级装置可以实现上述各实施例中终端设备所执行的功能,这些功能可以通过硬件执行相应的软件实现。这些硬件或软件包括一个或多个上述功能相应的模块。图10为本公开实施例中的客户端升级装置的一种结构示意图,参见图10所示,客户端升级装置1000,可以包括:接收模块1001,被配置为接收来自检测进程的第一更新文件,第一更新文件为第一客户端的最新版本的安装文件;更新模块1002,被配置为根据第一更新文件,将第一客户端由当前版本更新为最新版本。Based on the same inventive concept, embodiments of the present disclosure provide a client upgrade device, which can be a chip or a system-on-chip in a terminal device, or can also be a device in the terminal device used to implement the methods described in the above embodiments. functional module. The client upgrade device can realize the functions performed by the terminal equipment in the above embodiments, and these functions can be realized by hardware executing corresponding software. These hardware or software include one or more modules corresponding to the above functions. Figure 10 is a schematic structural diagram of a client upgrade device in an embodiment of the present disclosure. Referring to Figure 10, the client upgrade device 1000 may include: a receiving module 1001 configured to receive the first update file from the detection process. , the first update file is the installation file of the latest version of the first client; the update module 1002 is configured to update the first client from the current version to the latest version according to the first update file.
在一些可能的实施方式中,启动模块1003,被配置为启动检测进程,并等待阻塞同步队列消息。In some possible implementations, the startup module 1003 is configured to start the detection process and wait for blocking synchronization queue messages.
在一些可能的实施方式中,启动模块1003,还被配置为挂载第一客户端的第一客户端进程;执行第一更新文件;启动更新后的第一客户端。In some possible implementations, the startup module 1003 is also configured to mount the first client process of the first client; execute the first update file; and start the updated first client.
在一些可能的实施方式中,发送模块1004,被配置为向检测进程发送指示信息,指示信息用于指示第一客户端更新为最新版本。In some possible implementations, the sending module 1004 is configured to send indication information to the detection process, where the indication information is used to instruct the first client to update to the latest version.
需要说明的是,接收模块1001、更新模块1002、启动模块1003和发送模块1004的具体实现过程可参考图7至图8实施例的详细描述。It should be noted that for the specific implementation process of the receiving module 1001, the updating module 1002, the starting module 1003 and the sending module 1004, reference can be made to the detailed description of the embodiments in Figures 7 to 8.
本公开实施例中提到的接收模块1001、更新模块1002、启动模块1003和发送模块1004可以为一个或者多个处理器。The receiving module 1001, the updating module 1002, the starting module 1003 and the sending module 1004 mentioned in the embodiment of this disclosure can be one or more processors.
基于相同的发明构思,本公开实施例提供一种终端设备,该终端设备可以与上述一个或者多个实施例中所述的对账系统一致。图11为本公开实施例中的一种终端设备的结构示意图,参见图11所示,终端设备1100,可以采用通用的计算机硬件,包括处理器1101、存储器1102。Based on the same inventive concept, embodiments of the present disclosure provide a terminal device, which may be consistent with the reconciliation system described in one or more of the above embodiments. FIG. 11 is a schematic structural diagram of a terminal device in an embodiment of the present disclosure. As shown in FIG. 11 , the terminal device 1100 can use general computer hardware, including a processor 1101 and a memory 1102 .
可选的,处理器1101和存储器1102可以通过总线1103通信。Optionally, the processor 1101 and the memory 1102 may communicate through the bus 1103.
在一些可能的实施方式中,至少一个处理器1101可以构成具有对一个或多个输入执行逻辑运算的电路的任何物理设备。例如,至少一个处理器可以包括一个或多个集成电路(integrated circuit,IC),包括专用集成电路(application specific integrated circuit,ASIC)、微芯片、微控制器、微处理器、中央处理单元(central processing unit,CPU)的全部或部分、图形处理单元(graphics processing unit,GPU)、数字信号处理器(digital signal process,DSP)、现场可编程门阵列(field programmable gate array,FPGA)或者适于执行指令或执行逻辑运算的其它电路。由至少一个处理器执行的指令可以例如被预加载到与控制器集成的或嵌入在控制器中的存储器中,或者可以存储在分离的存储器中。存储器可以包括随机存取存储器(random access memory,RAM)、只读存储器(read-only memory,ROM)、硬盘、光盘、磁介质、闪存,其它永久、固定或易失性存储器,或者能够存储指令的任何其它机制。在一些实施例中,至少一个处理器可以包括多于一个处理器。每个处理器可以具有相似 的结构,或者处理器可以具有彼此电连接或断开的不同构造。例如,处理器可以是分离的电路或集成在单个电路中。当使用多于一个处理器时,处理器可以被配置为独立地或协作地操作。处理器可以以电、磁、光学、声学、机械或通过允许它们交互的其它手段来耦合。根据本公开的一个实施例,本公开还提供了一种计算机可读存储介质,其上存储有计算机指令,该指令被处理器执行上述标定方法的步骤。存储器1102可以包括以易失性和/或非易失性存储器形式的计算机存储媒体,如只读存储器和/或随机存取存储器。存储器1102可以存储操作系统、应用程序、其他程序模块、可执行代码、程序数据、用户数据等。In some possible implementations, at least one processor 1101 may constitute any physical device having circuitry that performs logical operations on one or more inputs. For example, at least one processor may include one or more integrated circuits (ICs), including application specific integrated circuits (ASICs), microchips, microcontrollers, microprocessors, central processing units (central processing units). processing unit (CPU), graphics processing unit (GPU), digital signal process (DSP), field programmable gate array (FPGA), or is adapted to perform instructions or other circuits that perform logical operations. Instructions for execution by the at least one processor may, for example, be preloaded into memory integrated with or embedded in the controller, or may be stored in separate memory. Memory can include random access memory (RAM), read-only memory (ROM), hard disk, optical disk, magnetic media, flash memory, other permanent, fixed or volatile memory, or can store instructions any other mechanism. In some embodiments, at least one processor may include more than one processor. Each processor can have similar structures, or the processors may have different configurations that are electrically connected or disconnected from each other. For example, the processor may be a separate circuit or integrated in a single circuit. When more than one processor is used, the processors may be configured to operate independently or cooperatively. Processors may be coupled electrically, magnetically, optically, acoustically, mechanically, or by other means that allow them to interact. According to one embodiment of the present disclosure, the present disclosure also provides a computer-readable storage medium on which computer instructions are stored, and the instructions are used by a processor to execute the steps of the above calibration method. Memory 1102 may include computer storage media in the form of volatile and/or nonvolatile memory, such as read-only memory and/or random access memory. Memory 1102 may store an operating system, application programs, other program modules, executable code, program data, user data, and the like.
在一实施例中,上述存储器1102中存储有用于实现图9中的获取模块901、确定模块902、发送模块903、轮询模块904和更新模块905的功能的执行指令。图9中的获取模块901、确定模块902、发送模块903、轮询模块904和更新模块905的功能/实现过程均可以通过图11中的处理器1101调用存储器1102中存储的执行指令来实现,具体实现过程和功能参考上述相关实施例。In one embodiment, the above-mentioned memory 1102 stores execution instructions for realizing the functions of the acquisition module 901, the determination module 902, the sending module 903, the polling module 904 and the update module 905 in Figure 9. The functions/implementation processes of the acquisition module 901, the determination module 902, the sending module 903, the polling module 904 and the update module 905 in Figure 9 can all be realized by the processor 1101 in Figure 11 calling the execution instructions stored in the memory 1102. For specific implementation processes and functions, refer to the above related embodiments.
在另一实施例中,上述存储器1102中存储有用于实现图10中的接收模块1001、更新模块1002、启动模块1003和发送模块1004的功能的执行指令。图10中的接收模块1001、更新模块1002、启动模块1003和发送模块1004的功能/实现过程均可以通过图11中的处理器1101调用存储器1102中存储的执行指令来实现,具体实现过程和功能参考上述相关实施例。In another embodiment, the above-mentioned memory 1102 stores execution instructions for realizing the functions of the receiving module 1001, the updating module 1002, the starting module 1003 and the sending module 1004 in Figure 10. The functions/implementation processes of the receiving module 1001, update module 1002, startup module 1003 and sending module 1004 in Figure 10 can all be realized by the processor 1101 in Figure 11 calling the execution instructions stored in the memory 1102. The specific implementation process and functions Reference is made to the above related embodiments.
基于相同的发明构思,本公开实施例提供一种终端设备,包括:存储器和处理器;处理器与存储器连接,被配置为执行存储在存储器上的计算机可执行指令,并能够实现如上述一个或者多个实施例所述的客户端升级方法。Based on the same inventive concept, embodiments of the present disclosure provide a terminal device, including: a memory and a processor; the processor is connected to the memory, is configured to execute computer-executable instructions stored on the memory, and can implement one of the above or Client upgrade methods described in multiple embodiments.
基于相同的发明构思,本公开实施例提供一种计算机存储介质,计算机存储介质存储有计算机可执行指令,计算机可执行指令被处理器执行后,能够实现如上述一个或者多个实施例所述的客户端升级方法。Based on the same inventive concept, embodiments of the present disclosure provide a computer storage medium. The computer storage medium stores computer-executable instructions. After the computer-executable instructions are executed by the processor, the steps described in one or more of the above embodiments can be implemented. Client upgrade method.
本领域技术人员可以理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本公开实施例的实施过程构成任何限定。本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本公开旨在涵盖本公开的任何变形、用途或者适应性变化,这些变形、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的工质常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Those skilled in the art can understand that the size of the sequence numbers of each step in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its functions and internal logic, and should not be determined by the implementation process of the embodiments of the present disclosure. constitute any limitation. Other embodiments of the disclosure will be readily apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the disclosure that follow the general principles of the disclosure and include common sense or customary techniques in the technical field that are not disclosed in the disclosure. means. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
以上所述,仅为本公开示例性的具体实施方式,但本公开的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本公开的保护范围之内。因此,本公开的保护范围应该以权利要求的保护范围为准。 The above are only exemplary specific implementations of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person familiar with the technical field can easily think of changes or modifications within the technical scope disclosed in the present disclosure. All substitutions are within the scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.

Claims (24)

  1. 一种客户端升级方法,包括:A client upgrade method includes:
    获取第一客户端的第一版本信息,所述第一版本信息用于指示所述第一客户端的当前版本;Obtain first version information of the first client, where the first version information is used to indicate the current version of the first client;
    根据所述第一版本信息,确定所述第一客户端待更新;Determine that the first client needs to be updated according to the first version information;
    获取所述第一客户端的第一更新文件,所述第一更新文件为所述第一客户端的最新版本的安装文件;Obtain the first update file of the first client, where the first update file is the installation file of the latest version of the first client;
    向主进程发送所述第一更新文件。Send the first update file to the main process.
  2. 根据权利要求1所述的方法,其中,所述获取第一客户端的第一版本信息之前,所述方法还包括:The method according to claim 1, wherein before obtaining the first version information of the first client, the method further includes:
    获取N个第二客户端的客户端信息,N为正整数;Obtain the client information of N second clients, N is a positive integer;
    根据所述客户端信息,构建客户端队列;Build a client queue according to the client information;
    轮询所述客户端队列,将所述N个第二客户端中的第i个第二客户端确定为所述第一客户端,i为正整数。The client queue is polled, and the i-th second client among the N second clients is determined as the first client, where i is a positive integer.
  3. 根据根据权利要求1所述的方法,其中,所述根据所述第一版本信息,确定所述第一客户端待更新,包括:The method according to claim 1, wherein determining that the first client needs to be updated according to the first version information includes:
    获取所述第一客户端的第二版本信息,所述第二版本信息用于指示所述第一客户端的最新版本;Obtain second version information of the first client, where the second version information is used to indicate the latest version of the first client;
    比对所述第一版本信息与所述第二版本信息;Compare the first version information and the second version information;
    当所述当前版本与所述最新版本不同时,确定所述第一客户端待更新。When the current version is different from the latest version, it is determined that the first client needs to be updated.
  4. 根据权利要求1所述的方法,其中,所述向主进程发送所述第一更新文件,包括:The method according to claim 1, wherein sending the first update file to the main process includes:
    获取所述第一更新文件的第一校验码;Obtain the first verification code of the first update file;
    将所述第一校验码与第二校验码进行比较,其中,所述第二校验码为服务器中所述第一客户端的最新版本对应的校验码;Compare the first check code with a second check code, where the second check code is the check code corresponding to the latest version of the first client in the server;
    当所述第一校验码与所述第二校验码相同时,向所述主进程发送所述第一更新文件。When the first verification code is the same as the second verification code, the first update file is sent to the main process.
  5. 根据权利要求1所述的方法,其中,所述向主进程发送所述第一更新文件之后,所述方法还包括:The method according to claim 1, wherein after sending the first update file to the main process, the method further includes:
    接收来自所述主进程的指示信息,所述指示信息用于指示所述第一客户端更新为所述最新版本;Receive indication information from the main process, the indication information being used to instruct the first client to update to the latest version;
    根据所述指示信息,将所述第一版本信息更新为所述最新版本对应的第二版本信息。According to the instruction information, the first version information is updated to the second version information corresponding to the latest version.
  6. 根据权利要求1所述的方法,其中,所述指示信息中携带有所述第一客户端的第二版本信息,所述第二版本信息用于指示所述最新版本。The method according to claim 1, wherein the indication information carries second version information of the first client, and the second version information is used to indicate the latest version.
  7. 一种客户端升级方法,包括:A client upgrade method includes:
    接收来自检测进程的第一更新文件,所述第一更新文件为第一客户端的最新版本的安装文件;Receive a first update file from the detection process, where the first update file is the installation file of the latest version of the first client;
    根据所述第一更新文件,将所述第一客户端由当前版本更新为所述最新版本。According to the first update file, the first client is updated from the current version to the latest version.
  8. 根据权利要求7所述的方法,其中,所述接收来自检测进程的第一更新文件之前,所述方法还包括: The method according to claim 7, wherein before receiving the first update file from the detection process, the method further includes:
    启动所述检测进程,并等待阻塞同步队列消息。Start the detection process and wait for blocking synchronization queue messages.
  9. 根据权利要求7所述的方法,其中,所述根据所述第一更新文件,将所述第一客户端由当前版本更新为所述最新版本,包括:The method according to claim 7, wherein updating the first client from the current version to the latest version according to the first update file includes:
    挂载所述第一客户端的第一客户端进程;Mount the first client process of the first client;
    执行所述第一更新文件;Execute the first update file;
    启动更新后的所述第一客户端。Start the updated first client.
  10. 根据权利要求9所述的方法,其中,在所述根据所述第一更新文件,将所述第一客户端由当前版本更新为所述最新版本之后,所述方法还包括:The method according to claim 9, wherein after updating the first client from the current version to the latest version according to the first update file, the method further includes:
    向所述检测进程发送指示信息,所述指示信息用于指示所述第一客户端更新为所述最新版本。Send indication information to the detection process, where the indication information is used to instruct the first client to update to the latest version.
  11. 根据权利要求10所述的方法,其中,所述指示信息中携带有所述第一客户端的第二版本信息,所述第二版本信息用于指示所述最新版本。The method according to claim 10, wherein the indication information carries second version information of the first client, and the second version information is used to indicate the latest version.
  12. 一种客户端升级装置,包括:A client upgrade device, including:
    获取模块,被配置为获取第一客户端的第一版本信息,所述第一版本信息用于指示所述第一客户端的当前版本;An acquisition module configured to acquire first version information of the first client, where the first version information is used to indicate the current version of the first client;
    确定模块,被配置为根据所述第一版本信息,确定所述第一客户端待更新;a determining module configured to determine that the first client needs to be updated based on the first version information;
    所述获取模块,还被配置为获取所述第一客户端的第一更新文件,所述第一更新文件为所述第一客户端的最新版本的安装文件;The acquisition module is further configured to acquire a first update file of the first client, where the first update file is an installation file of the latest version of the first client;
    发送模块,被配置为向主进程发送所述第一更新文件。The sending module is configured to send the first update file to the main process.
  13. 根据权利要求12所述的装置,其中,所述装置还包括:The device of claim 12, wherein the device further comprises:
    轮询模块,被配置为获取N个第二客户端的客户端信息,N为正整数;根据所述客户端信息,构建客户端队列;轮询所述客户端队列,将所述N个第二客户端中的第i个第二客户端确定为所述第一客户端,i为正整数。The polling module is configured to obtain client information of N second clients, where N is a positive integer; construct a client queue according to the client information; poll the client queue, and add the N second clients to the client queue. The i-th second client among the clients is determined as the first client, and i is a positive integer.
  14. 根据权利要求12所述的装置,其中,所述确定模块,还被配置为获取所述第一客户端的第二版本信息,所述第二版本信息用于指示所述第一客户端的最新版本;比对所述第一版本信息与所述第二版本信息;当所述当前版本与所述最新版本不同时,确定所述第一客户端待更新。The device according to claim 12, wherein the determining module is further configured to obtain second version information of the first client, and the second version information is used to indicate the latest version of the first client; Compare the first version information and the second version information; when the current version is different from the latest version, determine that the first client needs to be updated.
  15. 根据权利要求12所述的装置,其中,所述发送模块,还被配置为获取所述第一更新文件的第一校验码;将所述第一校验码与第二校验码进行比较,其中,所述第二校验码为服务器中所述第一客户端的最新版本对应的校验码;还被配置为当所述第一校验码与所述第二校验码相同时,向所述主进程发送所述第一更新文件。The device according to claim 12, wherein the sending module is further configured to obtain a first check code of the first update file; compare the first check code with a second check code , wherein the second check code is the check code corresponding to the latest version of the first client in the server; it is also configured to when the first check code is the same as the second check code, Send the first update file to the main process.
  16. 根据权利要求12所述的装置,其中,所述确定模块,还被配置为接收来自所述主进程的指示信息,所述指示信息用于指示所述第一客户端更新为所述最新版本;根据所述指示信息,将所述第一版本信息更新为所述最新版本对应的第二版本信息。The device according to claim 12, wherein the determining module is further configured to receive indication information from the main process, the indication information being used to instruct the first client to update to the latest version; According to the instruction information, the first version information is updated to the second version information corresponding to the latest version.
  17. 根据权利要求12所述的装置,其中,所述指示信息中携带有第二版本信息。The device according to claim 12, wherein the indication information carries second version information.
  18. 一种客户端升级装置,包括: A client upgrade device, including:
    接收模块,被配置为接收来自检测进程的第一更新文件,所述第一更新文件为第一客户端的最新版本的安装文件;A receiving module configured to receive a first update file from the detection process, where the first update file is the installation file of the latest version of the first client;
    更新模块,被配置为根据所述第一更新文件,将所述第一客户端由当前版本更新为所述最新版本。An update module configured to update the first client from the current version to the latest version according to the first update file.
  19. 根据权利要求18所述的装置,其中,所述装置还包括:The device of claim 18, wherein the device further comprises:
    启动模块,被配置为启动所述检测进程,并等待阻塞同步队列消息。A startup module is configured to start the detection process and wait for blocking synchronization queue messages.
  20. 根据权利要求18所述的装置,其中,所述装置还包括:The device of claim 18, wherein the device further comprises:
    启动模块,被配置为挂载所述第一客户端的第一客户端进程;执行所述第一更新文件;启动更新后的所述第一客户端。A startup module configured to mount the first client process of the first client; execute the first update file; and start the updated first client.
  21. 根据权利要求20所述的装置,其中,所述装置还包括:The device of claim 20, wherein the device further comprises:
    发送模块,被配置为向所述检测进程发送指示信息,所述指示信息用于指示所述第一客户端更新为所述最新版本。A sending module configured to send indication information to the detection process, where the indication information is used to instruct the first client to update to the latest version.
  22. 根据权利要求21所述的装置,其中,所述指示信息中携带有所述第一客户端的第二版本信息,所述第二版本信息用于指示所述最新版本。The device according to claim 21, wherein the indication information carries second version information of the first client, and the second version information is used to indicate the latest version.
  23. 一种终端设备,包括:存储器和处理器;所述处理器与所述存储器连接,被配置为执行存储在所述存储器上的计算机可执行指令,以实现如权利要求1至11任一项所述的方法。A terminal device, including: a memory and a processor; the processor is connected to the memory and is configured to execute computer-executable instructions stored on the memory to implement any one of claims 1 to 11 method described.
  24. 一种计算机存储介质,所述计算机存储介质存储有计算机可执行指令,其中,所述计算机可执行指令被处理器执行后能够实现如权利要求1至11任一项所述的方法。 A computer storage medium stores computer-executable instructions, wherein the computer-executable instructions, after being executed by a processor, can implement the method according to any one of claims 1 to 11.
PCT/CN2023/108975 2022-08-23 2023-07-24 Client upgrading method and apparatus, terminal device, and storage medium WO2024041283A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211013936.9A CN115344289A (en) 2022-08-23 2022-08-23 Client upgrading method and device, terminal equipment and storage medium
CN202211013936.9 2022-08-23

Publications (1)

Publication Number Publication Date
WO2024041283A1 true WO2024041283A1 (en) 2024-02-29

Family

ID=83953851

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/108975 WO2024041283A1 (en) 2022-08-23 2023-07-24 Client upgrading method and apparatus, terminal device, and storage medium

Country Status (2)

Country Link
CN (1) CN115344289A (en)
WO (1) WO2024041283A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115344289A (en) * 2022-08-23 2022-11-15 北京比特大陆科技有限公司 Client upgrading method and device, terminal equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040010786A1 (en) * 2002-07-11 2004-01-15 Microsoft Corporation System and method for automatically upgrading a software application
CN110069266A (en) * 2018-01-24 2019-07-30 腾讯科技(深圳)有限公司 Application upgrade method, apparatus, computer equipment and storage medium
CN112099825A (en) * 2020-09-11 2020-12-18 北京金山云网络技术有限公司 Method, device and equipment for upgrading component and storage medium
CN112564956A (en) * 2020-11-30 2021-03-26 山东亚华电子股份有限公司 Remote upgrading method, equipment and device for client and storage medium
CN115344289A (en) * 2022-08-23 2022-11-15 北京比特大陆科技有限公司 Client upgrading method and device, terminal equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040010786A1 (en) * 2002-07-11 2004-01-15 Microsoft Corporation System and method for automatically upgrading a software application
CN110069266A (en) * 2018-01-24 2019-07-30 腾讯科技(深圳)有限公司 Application upgrade method, apparatus, computer equipment and storage medium
CN112099825A (en) * 2020-09-11 2020-12-18 北京金山云网络技术有限公司 Method, device and equipment for upgrading component and storage medium
CN112564956A (en) * 2020-11-30 2021-03-26 山东亚华电子股份有限公司 Remote upgrading method, equipment and device for client and storage medium
CN115344289A (en) * 2022-08-23 2022-11-15 北京比特大陆科技有限公司 Client upgrading method and device, terminal equipment and storage medium

Also Published As

Publication number Publication date
CN115344289A (en) 2022-11-15

Similar Documents

Publication Publication Date Title
JP4805116B2 (en) Information processing system, information processing system control method, service using device, and service providing device
WO2017067448A1 (en) Firmware-over-the-air upgrade method, system and computer storage medium
EP2864873B1 (en) Auto-update while running a client software application with update handshake between versions and runtime validation of the successor version
US9792623B2 (en) Advertisement processing method and apparatus
WO2017071207A1 (en) Application installation method, corresponding apparatus, and application installation system
WO2024041283A1 (en) Client upgrading method and apparatus, terminal device, and storage medium
CN110730090B (en) Batch updating method, device, medium and electronic equipment for agent terminals in cloud environment
CN106325929A (en) Firmware upgrading method, firmware upgrading device, refrigerator and server side
CN108733496B (en) Event processing method and device
US9489190B1 (en) Message processing engine
CN109375937A (en) Method for upgrading system, device, terminal device and storage medium
WO2017016282A1 (en) Software upgrading method and apparatus, and computer storage medium
JP2010219725A (en) Network device and method of releasing external storage device on network
CN102622254B (en) Television outage disposal route and system
CN112181467B (en) Method and device for upgrading memory firmware of terminal, terminal and storage medium
CN111353150A (en) Trusted boot method, trusted boot device, electronic equipment and readable storage medium
CN115878138A (en) Application pre-downloading method and device, computer and storage medium
CN109101253B (en) Management method and device for host in cloud computing system
CN114327574A (en) Differential upgrading method, electronic device and storage medium
US20190056957A1 (en) Operating system boot up optimizations
CN113821248B (en) Service method of vehicle-end software, vehicle-end software and related equipment thereof
CN114726849B (en) File transmission method, device, server and computer readable storage medium
EP3447640B1 (en) Operating system up boot optimizations
CN115686569A (en) OTA upgrading method and related components thereof
US20110196992A1 (en) Method for dismounting a storage device, and computer program product and electronic apparatus for implementing the method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23856373

Country of ref document: EP

Kind code of ref document: A1