A software updating method and device, computer device, storage medium and product

CN116257260BActive Publication Date: 2026-10-20TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111499867.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-09
Publication Date
2026-10-20
Estimated Expiration
2041-12-09

AI Technical Summary

Technical Problem

[0003]在对相关技术的研究和实践过程中,本申请的发明人发现,对于包括图像采集模块的终端来说,在对其中的目标软件进行软件更新时,可以倚靠服务器下发的软件更新数据来实现,但这会使得软件更新的效率与灵活性都较为低下,因此,当前的软件更新方法还有待改进

Benefits of technology

[0018]本申请实施例可以当检测到所述图像采集模块的启动指令时,启动所述终端中集成的小程序框架;通过所述小程序框架,向服务器发送所述图像采集模块中目标程序的版本查询请求,其中,所述目标程序基于所述小程序框架运行;获取服务器基于所述版本查询请求返回的响应数据;基于所述响应数据,通过所述小程序框架对所述目标程序进行软件更新。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116257260B_ABST
    Figure CN116257260B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a software updating method and device, computer equipment, storage medium and product. The scheme is suitable for a terminal, the terminal comprising an image acquisition module. The scheme can start a small program framework integrated in the terminal when a starting instruction of the image acquisition module is detected. A version query request for a target program in the image acquisition module is sent to a server through the small program framework, wherein the target program runs based on the small program framework. Response data returned by the server based on the version query request is acquired. The target program is updated through the small program framework based on the response data. The scheme can be applied to various scenes such as cloud technology, artificial intelligence and intelligent transportation, and the software can be efficiently and flexibly updated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to a software update method, apparatus, computer equipment, storage medium, and product. Background Technology

[0002] Software updates refer to updating software versions, such as upgrading from a lower version to a higher version. In practice, higher versions often fix some of the bugs in lower versions, so software updates can be used to upgrade the functionality and performance of software and improve the user experience.

[0003] In the process of researching and practicing related technologies, the inventors of this application discovered that for terminals including image acquisition modules, when updating the target software, it is possible to rely on the software update data sent by the server. However, this makes the efficiency and flexibility of software updates relatively low. Therefore, the current software update method needs to be improved. Summary of the Invention

[0004] This application provides a software update method, apparatus, computer device, storage medium, and product that can perform software updates efficiently and flexibly.

[0005] This application provides a software update method applicable to a terminal, the terminal including an image acquisition module, the method comprising: When the start command of the image acquisition module is detected, the mini-program framework integrated in the terminal is started; The mini-program framework is used to send a version query request for the target program in the image acquisition module to the server, wherein the target program runs based on the mini-program framework. Obtain the response data returned by the server based on the version query request; Based on the response data, the target program is updated using the mini-program framework.

[0006] Accordingly, embodiments of this application also provide a software update apparatus, including: The startup unit is used to start the mini-program framework integrated in the terminal when the startup command of the image acquisition module is detected. The sending unit is used to send a version query request of the target program in the image acquisition module to the server through the mini-program framework, wherein the target program runs based on the mini-program framework; The acquisition unit is used to acquire the response data returned by the server based on the version query request; The update unit is used to update the target program based on the response data through the mini-program framework.

[0007] In one embodiment, the acquisition unit includes: The first acquisition subunit is used to acquire query response data returned by the server in response to the version query request, wherein the query response data includes the target version information of the target program; The version verification subunit is used to verify the current program version of the target program based on the target version information. The first sending subunit is used to send a version update request for the target program to the server if the verification passes. The second acquisition subunit is used to acquire the update response data returned by the server in response to the version update request.

[0008] In one embodiment, the response data includes software update data for the target program; the update unit includes: A data storage subunit is used to store the software update data; The data acquisition subunit is used to acquire stored software update data through the mini-program framework when an update instruction from the image acquisition module is detected. The software update subunit is used to update the target program according to the software update data.

[0009] In one embodiment, the transmitting unit includes: The target determination subunit is used to determine the target program in the image acquisition module to be queried for version verification. The third acquisition subunit is used to acquire the version query request of the target program; The second sending subunit is used to send the version query request to the server through the mini-program framework.

[0010] In one embodiment, the terminal includes a hardware adaptation layer for adapting to the hardware interface of the image acquisition module, and the software update device further includes: The calling unit is used to call the hardware adaptation layer through the applet framework when an updated calling instruction for the image acquisition module is detected from the target program. An execution unit is used to perform the operation corresponding to the call instruction through the hardware adaptation layer based on the call result.

[0011] In one embodiment, before invoking the hardware adaptation layer through the applet framework, the software update device further includes: The first determining unit is used to determine the service requirement information of the image acquisition module; The first filtering unit is used to filter the hardware interface of the image acquisition module according to the business requirement information. The first construction unit is used to construct the hardware adaptation layer of the terminal based on the screening results.

[0012] In one embodiment, the terminal further includes a hardware layer, the hardware layer including at least one sub-module of the image acquisition module; the calling unit includes: The module calling subunit is used to call the target submodule in the hardware layer through the hardware adaptation layer; The operation execution subunit is used to execute the operation corresponding to the call instruction based on the call result.

[0013] In one embodiment, the mini-program framework has at least one basic functional module, and before the mini-program framework integrated in the terminal is launched, the software update device further includes: The second determining unit is used to determine the business requirements information and computing power index information of the image acquisition module; The second filtering unit is used to filter the basic functional modules based on the business requirement information and the computing power indicator information. An integration unit is used to integrate a mini-program framework into the terminal based on the filtering results.

[0014] In one embodiment, the terminal includes a software layer that integrates a mini-program framework, the mini-program framework including at least one basic functional module. Before sending a version query request for the target program in the image acquisition module to the server, the software update device further includes: A development unit is used to develop program functions for the image acquisition module based on the basic functional modules. The second construction unit is used to construct the target program of the image acquisition module according to the mini-program framework and the program functions.

[0015] Accordingly, embodiments of this application also provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the software update method shown in embodiments of this application.

[0016] Accordingly, this application also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the software update method shown in the embodiments of this application.

[0017] Accordingly, this application also provides a computer program product, including a computer program / instructions, wherein when the computer program / instructions are executed by a processor, they implement the steps of the software update method shown in this application.

[0018] In this embodiment, when a start command for the image acquisition module is detected, a mini-program framework integrated in the terminal is launched; through the mini-program framework, a version query request for the target program in the image acquisition module is sent to the server, wherein the target program runs based on the mini-program framework; response data returned by the server based on the version query request is obtained; and based on the response data, the target program is updated through the mini-program framework.

[0019] This solution enables efficient and flexible updates to the target program within the image acquisition module. Specifically, it launches a mini-program framework when the image acquisition module starts. Since the target program to be updated runs on this framework—meaning the target software of the image acquisition module runs on top of it—and the solution allows the mini-program framework to send version query requests to the server, meaning it can query the server for a new version of the target software each time it starts, software updates for the target software in the image acquisition module no longer rely on the server distributing update data. Instead, the solution retrieves the update data by querying the server, thus enabling software updates. This not only improves the flexibility of software updates but also, because the version query request is sent to the server through the mini-program framework, it serves not only as the underlying framework for the target program's operation but, more importantly, assists in executing software updates, thereby improving the efficiency of software updates. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a schematic diagram of a scenario for the software update method provided in an embodiment of this application; Figure 2 This is a flowchart of the software update method provided in the embodiments of this application; Figure 3 This is a schematic diagram of the architecture of the software update method provided in the embodiments of this application; Figure 4 This is a schematic diagram of the applet framework for the software update method provided in the embodiments of this application; Figure 5 This is another schematic diagram of the architecture of the software update method provided in the embodiments of this application; Figure 6 This is another schematic diagram of the architecture of the software update method provided in the embodiments of this application; Figure 7 This is another schematic diagram of the architecture of the software update method provided in the embodiments of this application; Figure 8 This is another flowchart illustrating the software update method provided in this application embodiment; Figure 9 This is a schematic diagram of the structure of the software update device provided in the embodiments of this application; Figure 10 This is another schematic diagram of the software update device provided in the embodiments of this application; Figure 11 This is another schematic diagram of the software update device provided in the embodiments of this application; Figure 12 This is another schematic diagram of the software update device provided in the embodiments of this application; Figure 13 This is another schematic diagram of the software update device provided in the embodiments of this application; Figure 14 This is another schematic diagram of the software update device provided in the embodiments of this application; Figure 15 This is another schematic diagram of the software update device provided in the embodiments of this application; Figure 16 This is another schematic diagram of the software update device provided in the embodiments of this application; Figure 17 This is another schematic diagram of the software update device provided in the embodiments of this application; Figure 18 This is a schematic diagram of the structure of the computer device provided in the embodiments of this application. Detailed Implementation

[0022] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0023] This application provides a software update method, apparatus, computer device, storage medium, and product. Specifically, this application provides a software update apparatus suitable for computer devices. The computer device can be a terminal or similar device. Specifically, the terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, in-vehicle computer, facial recognition device, etc., but is not limited to these. In practical applications, the terminal and the server can be directly or indirectly connected via wired or wireless communication, and this application does not impose any limitations.

[0024] It is worth noting that server 20 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. Terminal 10 and server 20 can be directly or indirectly connected via wired or wireless communication, which is not limited herein.

[0025] This application embodiment will take a software update device as an example. Specifically, the terminal may include an image acquisition module to introduce the software update method.

[0026] refer to Figure 1 When terminal 10 detects the start command of the image acquisition module, it launches the integrated mini-program framework and sends a version query request for the target program in the image acquisition module to server 20 through the mini-program framework. The target program runs based on the mini-program framework. Furthermore, terminal 10 can obtain the response data returned by server 20 based on the version query request, so that terminal 10 can update the target program through the mini-program framework based on the response data.

[0027] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the preferred order of the embodiments.

[0028] This application provides a software update method that can be executed by a terminal or jointly by a terminal and a server. This application uses the execution of the software update method by a terminal as an example for illustration. Specifically, the terminal can be a smartphone, tablet computer, laptop computer, desktop computer, smart speaker, smartwatch, in-vehicle computer, facial recognition device, etc., but is not limited to these.

[0029] In this embodiment of the application, the method can be executed by a software update device integrated in a terminal, which may include an image acquisition module, such as... Figure 2The specific process of the software update method can be described as follows: 101. When the start command of the image acquisition module is detected, the mini-program framework integrated in the terminal is started.

[0030] The image acquisition module refers to a module unit capable of acquiring images. For example, in applications such as facial recognition and facial payment, the image acquisition module may include a camera. As an example, the image acquisition module may include a 3D camera, an infrared camera, or a color camera.

[0031] Specifically, 3D cameras can be used to acquire depth maps, which are images obtained by capturing speckle-structured infrared light from an infrared sensor and then resolving the speckle using depth units. In 3D computer graphics and computer vision, a depth map is an image or image channel containing information related to the distance from the surface of a scene object to the viewpoint. In facial payment, depth maps can be used for liveness detection and to assist in comparison and recognition. Infrared cameras can be used to acquire infrared images, which are images captured by an infrared sensor using pan-infrared light. In facial payment, infrared images can be used for liveness detection. Color cameras can be used to acquire color images, which are images captured by a color sensor using natural light. In facial payment, color images can be used for face selection and comparison recognition.

[0032] The startup command for the image acquisition module is a command that enables the image acquisition module. For example, when the image acquisition module is started, its startup command can be detected. As an example, the image acquisition module can specifically be a camera; therefore, when the camera is detected as being turned on, its startup command can also be detected.

[0033] Among them, the mini-program framework is a framework that runs custom web programs in a customized browser-like mode. It can run within the WeChat client or other hardware platforms, and when combined with WebAssembly code, it can provide performance very close to native code execution.

[0034] Specifically, WebAssembly (abbreviated as WASM) is a new type of code that modern browsers can execute, with the goal of achieving better performance on the web. WASM is a low-level binary code format, small in size, and therefore loads and executes quickly.

[0035] In one embodiment, the image acquisition module may specifically be a camera, see [link to relevant documentation]. Figure 3 When the camera is turned on, the terminal can detect the camera's activation command, and further, the terminal can launch the mini-program framework. In practical applications, this means that the terminal can launch the mini-program framework every time the camera is activated.

[0036] In one embodiment, considering the limited computing power of the image acquisition module in practical applications, in order to integrate the mini-program framework into the terminal, the mini-program framework can be module-filtered. Specifically, before the step "starting the mini-program framework integrated in the terminal", the following can be included: Determine the business requirements and computing power indicators for the image acquisition module; Based on business requirements and computing power metrics, the basic functional modules were selected. Based on the screening results, the mini-program framework is integrated into the terminal.

[0037] The business requirements information for the image acquisition module refers to the information obtained after analyzing the needs of business applications based on the image acquisition module in actual application scenarios. For example, when the image acquisition module is specifically a camera, in the application scenario of facial payment, the business requirements information for the camera can be determined to include functions such as image acquisition and image processing, but exclude functions such as multimedia, multi-process communication, user interface (UI), and drawing.

[0038] The computing power metrics of the image acquisition module are relevant indicators that demonstrate the module's computing capabilities. For example, these metrics may include parameters related to memory read / write and input / output (IO).

[0039] The basic functional modules of the mini-program framework refer to the basic modules provided by the framework to implement specific functions. Users can further develop and adjust these basic functional modules to implement related business logic. For example, the basic functional modules of the mini-program framework may include basic modules that implement the following functions: network-related, mini-program scheduling, security-related, resource compression, multimedia-related, multi-process communication, UI display and rendering, etc.

[0040] In this application, considering that the computing power of the image acquisition module is limited in practical applications, in order to enable the target program to run on the mini-program framework, the basic functional modules of the mini-program framework can be selected based on business requirements information and computing power indicators.

[0041] As an example, consider an image acquisition module that includes a camera and a target program that is a mini-program. Since the camera hardware platform is a low-computing-power platform, in order for the mini-program to run on the camera platform, the basic functional modules of the mini-program framework can be filtered based on the business requirements of the camera in the actual application scenario and the computing power indicators of the camera hardware platform itself. This will filter out basic functional modules that are irrelevant to the camera scenario or do not match the camera's computing power. For example, basic functional modules that implement the following functions can be filtered out: multimedia-related, multi-process communication, UI display and drawing, etc. Only basic functional modules that are strongly related to the camera's business scenario information or match the camera's computing power indicators can be retained. For example, basic functional modules that implement the following functions can be retained: resource compression, security-related, network-related, etc.

[0042] Furthermore, based on the filtering results, a mini-program framework can be integrated into the terminal. Specifically, the filtered mini-program framework can be integrated into the terminal. As an example, consider an image acquisition module that specifically includes a camera, and a target program that is a mini-program. See [link to relevant documentation]. Figure 4 The diagram illustrating the mini-program framework shows that, specifically, based on the business requirements and computing power metrics of the camera platform, the basic functional modules of the mini-program framework can be filtered, retaining those that are strongly related to the camera's business scenario or match the camera's computing power metrics, such as... Figure 4 The diagram shows the basic functional modules used to implement network-related functions, mini-program scheduling, security-related functions, and resource compression. In addition, the mini-program framework integrated into the terminal can also be configured with JavaScript (JS) development capabilities, allowing upper-layer business logic to be implemented based on these basic functional modules and JS-related capabilities.

[0043] 102. Using the mini-program framework, send a version query request for the target program in the image acquisition module to the server. The target program runs based on the mini-program framework.

[0044] In this application, the target program refers to the program in the image acquisition module that needs a software update. For example, the target program can specifically run as a mini-program. A mini-program is an application that can be used without downloading or installing, realizing the dream of "applications at your fingertips." Users can open the application by scanning a QR code or searching. It also embodies the "use and go" concept, so users don't need to worry about installing too many applications. Applications will be ubiquitous and always available, yet require no installation or uninstallation.

[0045] In one embodiment, since the mini-program framework integrated in the terminal can have at least one basic functional module, and the mini-program framework can also provide development capabilities in a specific programming language, such as JS development capabilities, developers can utilize the basic functional modules of the mini-program framework and the development capabilities provided by the mini-program framework to develop target programs that run based on the mini-program framework. Specifically, the terminal may include a software layer, and the mini-program framework is integrated in the software layer. The mini-program framework may include at least one basic functional module. Specifically, before the step of "sending a version query request for the target program in the image acquisition module to the server", the following may be included: Based on the basic functional modules, develop program functions for the image acquisition module; Based on the mini-program framework and program functions, construct the target program for the image acquisition module.

[0046] In this context, "program function" refers to the program used to achieve a specific function. Therefore, the program function for the image acquisition module is the program that implements the specific function of the image acquisition module. For example, the specific function may include image processing, firmware upgrade (in practical applications, the program in the image acquisition module can be called firmware), turning on, starting, and turning off the image acquisition module (where "turning on" means starting the image acquisition module; "starting" means performing image acquisition, such as turning on the camera's video recording function; and "turning off" means terminating image acquisition, such as turning off the camera's video recording function), and so on.

[0047] Since the basic functional modules are provided by the mini-program framework to implement specific functions, users can further develop and adjust them to implement related business logic. Therefore, program functions for the image acquisition module can be developed based on the basic functional modules. For example, users can directly develop the basic functional modules to create program functions for the image acquisition module. Furthermore, since the mini-program framework provides development capabilities in specific programming languages, such as JavaScript, users can utilize the basic functional modules provided by the mini-program framework and the development capabilities of relevant programming languages ​​to develop program functions to provide services externally.

[0048] As an example, we can consider an image acquisition module that specifically includes a camera, and a target program that is a mini-program. Since the target program runs on the mini-program framework, and referencing... Figure 4As can be seen, a mini-program framework can have at least one basic functional module, and it also provides JS development capabilities. Therefore, in practical applications, program functions can be developed based on the basic functional modules and JS development capabilities provided by the mini-program framework. For example, core image-related capabilities of a camera, such as opening, starting, and closing the stream, can all be developed using JS; furthermore, peripheral functions such as image processing and firmware upgrades can also be developed.

[0049] Furthermore, based on the mini-program framework and the developed program functions, a target program for the image acquisition module can be constructed. For example, the program corresponding to the developed program functions can be used as the target program and deployed as a mini-program on the mini-program framework to construct the target program for the image acquisition module. Alternatively, the developed program functions can be further coupled so that the coupled program can implement multiple functions for the image acquisition module, and the coupled program can be used as the target program and deployed as a mini-program on the mini-program framework to construct the target program for the image acquisition module.

[0050] In one embodiment, the image acquisition module may specifically include a camera, and the target program may specifically be a mini-program. See also Figure 4 As can be seen, the upper layer of the mini-program framework can provide development capabilities in specific programming languages, such as JS development capabilities. Furthermore, in this application, the target program can be developed based on the mini-program framework and the development capabilities in specific programming languages. Therefore, see [link to relevant documentation]. Figure 5 The target program can be used as an upper-layer application of the mini-program framework and the development capabilities of a specific programming language. That is, the upper-layer application can develop relevant functional modules and provide services to the outside world based on the mini-program framework and its related JS development capabilities. For example, the core image-related capabilities of the camera can be developed using JS and deployed inside the camera in the form of a mini-program, while pulling new versions from the server from time to time; at the same time, some peripheral functions of the camera, such as image processing and firmware upgrades, can also be implemented in the form of mini-programs.

[0051] The target program version query request refers to the data sent to the server to determine whether a new version of the target program exists.

[0052] In this application, since at least one program can be deployed on the mini-program framework, the target program to be queried can be identified from it. Then, the version query request of the target program in the image acquisition module is sent to the server through the mini-program framework. Specifically, the step "sending the version query request of the target program in the image acquisition module to the server through the mini-program framework" may include: Identify the target program in the image acquisition module to be version-queried; Obtain the version query request for the target program; The version query request is sent to the server through the mini-program framework.

[0053] In this application, there are several ways to determine the target program for version query in the image acquisition module. For example, all programs in the image acquisition module can be used as target programs; or, the target program can be selected from all programs in the image acquisition module. As an example, a corresponding version query period can be set for each program, and when the current time matches the version query period, the corresponding program is set as the target program for version query. As another example, tag information can be set for each program, and the target program can be selected from all programs in the image acquisition module based on the tag. For example, target tag information sent by a server or other terminal can be received, and the program matching the target tag information can be determined as the target program for version query.

[0054] In this application, there are several ways to obtain the version query request of the target program. For example, after the terminal determines the target software to be queried, it can further generate the version query request of the target program; or the target program can generate the version query request and send the version query request to the terminal so that the terminal can obtain the version query request.

[0055] It is worth noting that this application does not impose restrictions on the execution order between the step "determining the target program to be queried in the image acquisition module" and the step "obtaining the version query request of the target program". In one embodiment, the version query request can be generated by the target program and sent to the terminal. Correspondingly, the terminal can obtain the version query request and determine the program corresponding to the version query request as the target program to be queried.

[0056] Furthermore, the mini-program framework can be used to send version query requests to the server. For example, the terminal can generate version query request data by calling the relevant interfaces provided by the mini-program framework and send the version query request data to the server; or the terminal can send the obtained version query request to the mini-program framework to trigger the mini-program framework to generate version query request data and send the version query request data to the server.

[0057] 103. Obtain the response data returned by the server based on the version query request.

[0058] Since the version query request sent to the server is specifically used to determine whether a new version of the target program exists, the server can perform related operations based on the version query request after receiving it, and generate response data to be returned to the terminal based on the operation results.

[0059] For example, a version query request can carry the current version information of the target program, which indicates the current version of the target program on the terminal. In this way, after obtaining the version query information, the server can parse the current version information of the target program from it. Furthermore, the server can compare the current version of the target program with the latest version of the target program stored on the server to determine whether a new version of the target program exists on the terminal. If it exists, the server can generate software update data for the target program based on the latest version of the target program and attach the software update data to the response data and return it to the terminal.

[0060] For example, a version query request can be used to request the latest version of a target program from the server. Correspondingly, the server can perform relevant query operations based on the version query request to find the latest version of the target program on the server, and return the target version information representing the latest version to the terminal in the response data. This allows the terminal to request the software update data required to update the target program based on the received target version information. Specifically, the step "obtaining the response data returned by the server based on the version query request" may include: Obtain the query response data returned by the server in response to the version query request, wherein the query response data includes the target version information of the target program; Based on the target version information, verify the current version of the target program; If the verification passes, a version update request for the target program is sent to the server; Retrieve the update response data returned by the server in response to the version update request.

[0061] The query response data returned by the server in response to the version query request refers to the response data returned by the server in response to the version query request sent by the terminal.

[0062] The query response data refers to the response data generated by the server in response to the version query request sent by the terminal. In this application, the update response data may specifically include the target version information of the target program, which indicates the latest version of the target program on the current server.

[0063] Specifically, after receiving a version query request, the server can perform a query operation on the program version of the target program to find the latest version of the target program on the server. Furthermore, the server can attach the target version information indicating the latest version of the target program to the query response data and send the query response data to the terminal so that the terminal can know the latest version of the target program on the server.

[0064] Correspondingly, the terminal can parse the target version information of the target program from the obtained query response data, and determine the latest version of the target program on the server using this target version information. Furthermore, the terminal can verify the current version of the target program on the terminal based on the target version information to determine whether the target program on the terminal needs a software update. For example, the terminal can verify the current version of the target program by comparing it with the latest version. If the current version of the target program on the terminal is not the latest version, the verification passes, meaning the target program on the terminal needs a software update; otherwise, the verification fails, meaning the target program on the terminal does not need a software update.

[0065] The target program's version update request is data sent to the server. This data is used to request software update data for the target program from the server, so that the terminal can update the target program using this software update data.

[0066] The update response data refers to the response data generated by the server in response to the version update request sent by the terminal. In this application, the update response data may specifically include the software update data of the target program.

[0067] Among them, the software update data of the target program refers to the relevant data required to update the target program. For example, the software update data can be the program data corresponding to the new version of the target program; or the software update data can be a data download address from which the terminal can download the program data corresponding to the new version of the target program.

[0068] For example, the version update request sent by the terminal to the server may include version specification information. Specifically, the version specification information indicates the version of the target program to be updated. In this way, the server can attach the software update data corresponding to the target program version to the update response data in response to the version update request, and send the update response data to the terminal. This allows the terminal to parse the software update information corresponding to the target program version from the update response data, and update the target program on the terminal from the current version to the target program version using the software update information.

[0069] For example, the version update request sent by the terminal to the server may not include specific version information. That is, the version update request is used to request the software update data corresponding to the latest version of the target program on the server. Correspondingly, the server can attach the software update data corresponding to the latest version to the update response data in response to the version update request, and send the update response data to the terminal. This allows the terminal to parse the software update information corresponding to the latest version from the update response data, and update the target program on the terminal from the current version to the latest version using the software update information.

[0070] In one embodiment, see Figure 3 The terminal can obtain the query response data returned by the server in response to the version query request, and parse the target version information of the target program from the query response data. Further, the terminal can verify the current version of the target program based on the target version information, and if the verification passes, determine that the server has a new version of the target program, and then send a version update request to the server. The terminal can also obtain the update response data returned by the server in response to the version update request, and parse the software update data of the target program from the update response data to load the new version resources of the target program.

[0071] 104. Based on the response data, update the target program using the mini-program framework.

[0072] In this application, the response data may include software update data for the target program. Therefore, the terminal can parse the software update data from the response data. Since the software update data for the target program is the relevant data required to update the target program, for example, the software update data may be the program data corresponding to the target program under a new version (here, the new version is relative to the current version of the target program, i.e., the new version here is the target update version of the target program); or, for example, the software update data may be a data download address, from which the terminal can download the program data corresponding to the target program under the new version. Therefore, the terminal can update the target program based on the software update data. Furthermore, since in this application, the target program runs based on a mini-program framework, the terminal can update the target program through the mini-program framework.

[0073] In one embodiment, after obtaining the program data corresponding to the new version of the target program lock based on the software update data, the terminal can update the target program through the mini-program framework. In other words, the terminal can start the new version of the target program after loading the new version of the resource.

[0074] In another embodiment, considering that the image acquisition module may be operational when the new version of the target program's resources are loaded (e.g., the camera may be operational), the new version of the target program's resources can be stored first, and the target program can be updated using the new version of the resources without affecting the current operational state of the image acquisition module. Specifically, the step "updating the target program using the mini-program framework based on the software update data" may include: Store software update data; When an update command from the image acquisition module is detected, the stored software update data is obtained through the mini-program framework; Based on the software update data, update the target program.

[0075] For example, the software update data of the target program can be a new version resource of the target program, so the terminal can store the new version resource of the target program.

[0076] The update instruction for the image acquisition module refers to the instruction that determines to update the target program's software.

[0077] In practical applications, update commands can be configured as needed. For example, an update command can be a startup command for the image acquisition module. After the terminal loads the new version of the target program's resources, it can store the new version of the resources. When the image acquisition module restarts, the terminal can retrieve the stored new version of the resources through the mini-program framework and update the target program to the new version.

[0078] For example, the update command can be a command issued by the server. Specifically, after loading the new version of the target program's resources, the terminal can store the new version of the resources. After receiving the update command issued by the server, the terminal can retrieve the stored new version of the resources through the mini-program framework and update the target program to the new version.

[0079] For example, update commands can be preset commands at certain time intervals. If the current time meets the preset conditions, the update command can be triggered. Specifically, after loading the new version resources of the target program, the terminal can store the new version resources, and after detecting the update command, it can retrieve the stored new version resources through the mini-program framework and perform a software update on the target program to update it to the new version.

[0080] In this application, both the target program and the applet framework can be classified into the software layer. Since the terminal includes an image acquisition module, in addition to the software layer, the terminal can also include a hardware layer. In practical applications, a hardware adapter layer can be laid between the software layer and the hardware layer so that the software layer can interact with the hardware layer more efficiently through the hardware adapter layer.

[0081] In one embodiment, the terminal may include a hardware adaptation layer, which can be used to adapt the hardware interface of the image acquisition module. Specifically, the software update method may further include: When the updated target program's call instruction for the image acquisition module is detected, the hardware adaptation layer is called through the mini-program framework; Based on the call result, the operation corresponding to the call instruction is executed through the hardware adaptation layer.

[0082] In one embodiment, considering that the target program executes based on a mini-program framework, the target program can reside on top of the mini-program framework in the software layer, and can implement related functions by calling the mini-program framework. The hardware layer may include an image acquisition module, such as a camera, and may also include other image processing-related hardware, such as an image signal processor (ISP), where the ISP is a unit that processes the output signal of the front-end image sensor. Between the software layer and the hardware layer, a hardware adaptation layer can be laid out; specifically, the hardware adaptation layer can be used to adapt the hardware interfaces in the hardware layer.

[0083] Considering the limited computing power of image acquisition modules in practical applications, this application, in addition to streamlining the mini-program framework by filtering its basic functional modules, also filters the hardware interfaces of the image acquisition module based on its business requirements. A hardware adaptation layer is then constructed based on the filtering results, ensuring that the constructed hardware adaptation layer matches the business requirements and computing power limitations of the image acquisition module. Specifically, before the step "calling the hardware adaptation layer through the mini-program framework," the following may be included: Determine the business requirements of the image acquisition module; Based on business requirements, the hardware interfaces of the image acquisition module are selected. Based on the screening results, a hardware adaptation layer for the terminal is constructed.

[0084] Among them, the business requirement information of the image acquisition module refers to the information obtained after analyzing the requirements of the business based on the image acquisition module in actual application scenarios.

[0085] In this application, the hardware interfaces provided by the image acquisition module can be filtered based on business requirements. For example, if the image acquisition module specifically includes a camera and an ISP, and the target program is a mini-program, then the hardware adaptation layer mainly addresses the parts that interact with the camera hardware, such as during firmware upgrades or when acquiring data from the ISP, requiring interaction with the corresponding ISP or depth computing hardware. Furthermore, in practical applications, a structure such as... Figure 6 The architecture diagram shown illustrates that several general-purpose hardware interfaces (Application Programming Interfaces, APIs) related to the camera can be abstracted on top of the camera's main control chip. Furthermore, the hardware interfaces of the image acquisition module can be filtered according to business requirements. For example, some common camera-related functions can be retained from the hardware interfaces based on business needs, while some hardware interfaces unrelated to the upper-layer business can be hidden, thereby filtering out the hardware interfaces that implement the general capabilities of the camera.

[0086] After selecting the target hardware interfaces from those provided by the image acquisition module, a hardware adaptation layer can be built to adapt to these target hardware interfaces. For example, if the target hardware interface is a hardware interface in the ISP, the hardware adaptation layer can encapsulate the hardware interface in the ISP for use by the upper-layer camera application. It is understandable that in practical applications, different hardware adaptation layers can be used for different image acquisition modules.

[0087] In one embodiment, considering that the target program executes based on a mini-program framework, the target program can reside on top of the mini-program framework in the software layer. Therefore, the updated target program can implement relevant functions by calling the mini-program framework. The hardware layer may include an image acquisition module, such as a camera and an ISP. A hardware adaptation layer can be positioned between the software and hardware layers. In this way, when an updated target program's call instruction for the image acquisition module is detected, the hardware adaptation layer can be called through the mini-program framework, and the image acquisition module can be called through the hardware adaptation layer.

[0088] As an example, consider an image acquisition module that specifically includes a camera and an ISP, with the target program being a mini-program. See [link to relevant documentation]. Figure 7 In the architecture diagram shown, the top layer can be a camera business logic mini-program written based on the mini-program framework, i.e., the target program. This target program has the advantage of convenient updates, and it can be responsible for various resource coordination, image processing and other tasks of the entire camera, and provide image data to the upper layer.

[0089] Furthermore, in this example, the basic functional modules of the mini-program framework can be filtered to simplify the mini-program framework, thereby obtaining a lightweight mini-program framework. This lightweight mini-program framework can be responsible for running the core functions of the mini-program on the camera hardware, and the lightweight mini-program framework can be integrated into the software layer of the terminal. The target program runs based on this lightweight mini-program framework.

[0090] Therefore, the target program can implement relevant functions by calling this lightweight applet framework, for example, by calling the image acquisition module. Below this lightweight applet framework, and between the software and hardware layers, a hardware adaptation layer can be deployed. Specifically, the lightweight applet framework can call the image acquisition module by calling this hardware adaptation layer, for example, by calling the ISP within the image acquisition module.

[0091] Therefore, in this application, the corresponding operation can be executed through the hardware adaptation layer based on the call result of the mini-program framework to the hardware adaptation layer. Specifically, since the hardware layer may include at least one sub-module of the image acquisition module, for example, the image acquisition module may include sub-modules such as the ISP and the camera, the terminal can call the target sub-module in the hardware layer corresponding to the call instruction through the hardware adaptation layer to execute the operation corresponding to the call instruction. Specifically, the step "execute the operation corresponding to the call instruction through the hardware adaptation layer based on the call result" may include: The target submodule in the hardware layer is called through the hardware adaptation layer; Based on the result of the call, execute the operation corresponding to the call instruction.

[0092] In one embodiment, different sub-modules within the image acquisition module can have correspondingly different hardware adaptation layers, with each hardware adaptation layer adapting to the hardware interfaces within the corresponding sub-module. The mini-program framework can then invoke the target sub-module within the hardware layer by calling the hardware adaptation layer corresponding to the target sub-module, and based on the invocation result, execute the operation corresponding to the invocation instruction. For example, it can execute the operation corresponding to the invocation instruction by calling the hardware interface corresponding to the invocation instruction.

[0093] In another embodiment, different sub-modules within the image acquisition module can be adapted to the hardware interfaces of these sub-modules by the same hardware adaptation layer. The mini-program framework can then invoke this hardware adaptation layer to call the target sub-module within the hardware layer, and based on the call result, execute the operation corresponding to the call instruction. For example, it can execute the operation corresponding to the call instruction by calling the hardware interface corresponding to the call instruction.

[0094] As can be seen from the above, this embodiment can start the mini-program framework integrated in the terminal when the start command of the image acquisition module is detected; send a version query request for the target program in the image acquisition module to the server through the mini-program framework, wherein the target program runs based on the mini-program framework; obtain the response data returned by the server based on the version query request, wherein the response data includes the software update data of the target program; and update the software of the target program through the mini-program framework based on the software update data.

[0095] This solution enables efficient and flexible updates to the target program within the image acquisition module. Specifically, it launches a mini-program framework when the image acquisition module starts. Since the target program to be updated runs on this framework—meaning the target software of the image acquisition module runs on top of it—and the solution allows the mini-program framework to send version query requests to the server, meaning it can query the server for a new version of the target software each time it starts, software updates for the target software in the image acquisition module no longer rely on the server distributing update data. Instead, the solution retrieves the update data by querying the server, thus enabling software updates. This not only improves the flexibility of software updates but also, because the version query request is sent to the server through the mini-program framework, it serves not only as the underlying framework for the target program's operation but, more importantly, assists in executing software updates, thereby improving the efficiency of software updates.

[0096] Furthermore, in this solution, the mini-program framework, as a framework for running custom web applications in a customized browser-like mode, can provide performance very close to native code execution when combined with WASM code. Therefore, by deploying the mini-program framework in the software layer and setting the target application to run on this framework, compared with the solution of simply deploying the target application in the software layer, not only can the code execution performance be greatly improved, but also, since the mini-program framework can provide at least one basic functional module and development capabilities in a specific programming language, such as JS development capabilities, developers can use the basic functional modules of the mini-program framework and the development capabilities provided by the mini-program framework to develop target applications that run on the mini-program framework. This greatly reduces the difficulty of deploying the target application on the terminal and improves the development efficiency of the target application. Furthermore, this solution also filters the basic functional modules of the mini-program framework based on the business requirements and computing power indicators of the image acquisition module. Then, based on the filtering results, a lightweight mini-program framework is integrated into the terminal. This not only maintains the beneficial effects of integrating the mini-program framework into the terminal, but also further filters out redundant modules of the mini-program framework to integrate a lightweight mini-program framework into the terminal, thereby reducing the amount of computing and improving resource utilization.

[0097] Furthermore, in facial payment applications, the 3D payment camera is a core component, and its quality significantly impacts the overall facial payment experience across the industry. As business needs evolve, the internal program of the camera requires frequent updates. Traditional firmware update cycles are lengthy, hindering the speed of business iteration. This solution proposes introducing a lightweight, customized mini-program framework within the camera, running in conjunction with Web Application Manager (WASM). This approach offers near-native code efficiency while providing the flexible iteration advantages of web applications. Therefore, this solution enables the development of rapidly updated and iterated internal camera algorithm software, better adapting to rapid business changes.

[0098] Based on the method described in the above embodiments, the following examples will provide further detailed explanations.

[0099] In this embodiment, the software update device integrated into a terminal will be used as an example for explanation. This terminal may include an image acquisition module. The terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, in-vehicle computer, facial recognition device, etc., but is not limited to these. In practical applications, the terminal and the server can be directly or indirectly connected via wired or wireless communication, and this application does not impose any limitations on this.

[0100] It is worth noting that the server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal and server can be connected directly or indirectly through wired or wireless communication methods; this application does not impose any restrictions.

[0101] like Figure 8 As shown, a software update method has the following specific process: 201. When the terminal detects the start command of the image acquisition module, it starts the mini-program framework integrated in the terminal.

[0102] In one embodiment, before the step of "starting the integrated mini-program framework in the terminal", the terminal can determine the business requirements and computing power indicators of the image acquisition module, and filter the basic functional modules according to the business requirements and computing power indicators, so that a lightweight mini-program framework can be integrated in the terminal according to the filtering results.

[0103] 202. The terminal sends a version query request for the target program in the image acquisition module to the server through the mini-program framework. The target program runs based on the mini-program framework.

[0104] In one embodiment, the version query request may carry the current version information of the target program, which indicates the current version of the target program in the terminal.

[0105] 203. The server generates response data based on the version query request and sends the response data to the terminal. The response data includes the software update data of the target program.

[0106] In one embodiment, after obtaining version query information, the server can parse out the current version information of the target program. The server can then compare the current version of the target program with the latest version of the target program stored in the server to determine whether a new version of the target program exists on the terminal. If a new version exists, the server can generate software update data for the target program based on the latest version of the target program and attach the software update data to the response data and return it to the terminal.

[0107] For example, software update data can be the program data corresponding to the target program in the new version; or, software update data can be a data download address, from which the terminal can download the program data corresponding to the target program in the new version.

[0108] 204. The terminal obtains the response data returned by the server based on the version query request, and parses the software update data of the target program from the response data.

[0109] 205. The terminal updates the target program using the mini-program framework based on the software update data.

[0110] In one embodiment, the terminal can store software update data, and when an update instruction from the image acquisition module is detected, it can obtain the stored software update data through the mini-program framework, and then update the target program according to the software update data.

[0111] In practical applications, update commands can be configured as needed. For example, an update command can be a startup command for the image acquisition module. After the terminal loads the new version of the target program's resources, it can store the new version of the resources. When the image acquisition module restarts, the terminal can retrieve the stored new version of the resources through the mini-program framework and update the target program to the new version.

[0112] As can be seen from the above, the embodiments of this application can efficiently and flexibly update the target program in the image acquisition module. Specifically, this scheme can start the applet framework when the image acquisition module starts. Since the target program to be updated runs on the applet framework, that is, the target software of the image acquisition module runs on the applet framework, and since this scheme can send a version query request for the target program to the server through the applet framework, that is, the applet framework can query the server for the existence of a new version of the target software every time it starts, this means that when updating the software of the target software in the image acquisition module, it no longer relies on the server to issue software update data, but can obtain the software update data of the target software by querying the server, thereby realizing the software update for the target software. This not only improves the flexibility of software updates, but also, since the version query request for the target program is sent to the server through the applet framework, this means that the applet framework can not only serve as the basic framework for the target program to run, but more importantly, the applet framework can assist in executing the software update of the target program, thus also improving the efficiency of software updates.

[0113] To better implement the above methods, this application also provides a software update device, which can be integrated into a terminal. The terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, in-vehicle computer, facial recognition device, etc., but is not limited to these.

[0114] For example, such as Figure 9As shown, the software update device may include a startup unit 301, a sending unit 302, an acquisition unit 303, and an update unit 304, as follows: The startup unit 301 can be used to start the applet framework integrated in the terminal when the startup command of the image acquisition module is detected; The sending unit 302 can be used to send a version query request of the target program in the image acquisition module to the server through the mini-program framework, wherein the target program runs based on the mini-program framework; The acquisition unit 303 can be used to acquire the response data returned by the server based on the version query request; The update unit 304 can be used to update the target program based on the response data through the mini-program framework.

[0115] In one embodiment, reference Figure 10 The acquisition unit 303 may include: The first acquisition subunit 3031 can be used to acquire query response data returned by the server in response to the version query request, wherein the query response data includes the target version information of the target program; The version verification subunit 3032 can be used to verify the current program version of the target program based on the target version information; The first sending subunit 3033 can be used to send a version update request for the target program to the server if the verification passes. The second acquisition subunit 3034 can be used to acquire update response data returned by the server in response to the version update request.

[0116] In one embodiment, reference Figure 11 The response data includes software update data for the target program; the update unit 304 may include: The data storage subunit 3041 can be used to store the software update data; The data acquisition subunit 3042 can be used to acquire stored software update data through the applet framework when an update instruction from the image acquisition module is detected. The software update subunit 3043 can be used to update the target program according to the software update data.

[0117] In one embodiment, reference Figure 12 The sending unit 302 may include: The target determination subunit 3021 can be used to determine the target program to be queried in the image acquisition module. The third acquisition subunit 3022 can be used to acquire the version query request of the target program; The second sending subunit 3023 can be used to send the version query request to the server through the applet framework.

[0118] In one embodiment, reference Figure 13 The terminal includes a hardware adaptation layer for adapting to the hardware interface of the image acquisition module. The software update device may further include: The calling unit 305 can be used to call the hardware adaptation layer through the applet framework when an updated calling instruction for the image acquisition module is detected from the target program. The execution unit 306 can be used to perform the operation corresponding to the call instruction through the hardware adaptation layer based on the call result.

[0119] In one embodiment, reference Figure 14 Before invoking the hardware adaptation layer through the mini-program framework, the software update device may further include: The first determining unit 307 can be used to determine the service requirement information of the image acquisition module; The first filtering unit 308 can be used to filter the hardware interface of the image acquisition module according to the business requirement information. The first building unit 309 can be used to build the hardware adaptation layer of the terminal based on the screening results.

[0120] In one embodiment, reference Figure 15 The terminal further includes a hardware layer, which includes at least one sub-module of the image acquisition module; the calling unit 305 may include: The module calling subunit 3051 can be used to call the target submodule in the hardware layer through the hardware adaptation layer; The operation execution subunit 3052 can be used to execute the operation corresponding to the call instruction based on the call result.

[0121] In one embodiment, reference Figure 16 The mini-program framework has at least one basic functional module. Before launching the mini-program framework integrated in the terminal, the software update device may further include: The second determining unit 3010 can be used to determine the service requirements information and computing power index information of the image acquisition module; The second filtering unit 3011 can be used to filter the basic functional modules based on the business requirement information and the computing power index information. The integration unit 3012 can be used to integrate a mini-program framework into the terminal based on the filtering results.

[0122] In one embodiment, reference Figure 17 The terminal includes a software layer that integrates a mini-program framework. The mini-program framework includes at least one basic functional module. Before sending a version query request for the target program in the image acquisition module to the server, the software update device may further include: The development unit 3013 can be used to develop program functions for the image acquisition module based on the basic functional modules. The second building unit 3014 can be used to build the target program of the image acquisition module according to the applet framework and the program functions.

[0123] In practice, each of the above units can be implemented as an independent entity or can be arbitrarily combined to be implemented as the same or several entities. For the specific implementation of each of the above units, please refer to the previous method embodiments, which will not be repeated here.

[0124] As can be seen from the above, in the software update device of this embodiment, when the startup unit 301 detects the startup command of the image acquisition module, it starts the mini-program framework integrated in the terminal; the sending unit 302 sends a version query request of the target program in the image acquisition module to the server through the mini-program framework, wherein the target program runs based on the mini-program framework; the obtaining unit 303 obtains the response data returned by the server based on the version query request, wherein the response data includes the software update data of the target program; and the updating unit 304 updates the target program based on the software update data through the mini-program framework.

[0125] This solution enables efficient and flexible updates to the target program within the image acquisition module. Specifically, it launches a mini-program framework when the image acquisition module starts. Since the target program to be updated runs on this framework—meaning the target software of the image acquisition module runs on top of it—and the solution allows the mini-program framework to send version query requests to the server, meaning it can query the server for a new version of the target software each time it starts, software updates for the target software in the image acquisition module no longer rely on the server distributing update data. Instead, the solution retrieves the update data by querying the server, thus enabling software updates. This not only improves the flexibility of software updates but also, because the version query request is sent to the server through the mini-program framework, it serves not only as the underlying framework for the target program's operation but, more importantly, assists in executing software updates, thereby improving the efficiency of software updates.

[0126] Furthermore, this application also provides a computer device, which can be a terminal or other similar device. The terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, in-vehicle computer, facial recognition device, etc., but is not limited to these. Figure 18 As shown, it illustrates a structural schematic diagram of the computer device involved in the embodiments of this application, specifically: The computer device may include a memory 401 having one or more computer-readable storage media, an input unit 402, a processor 403 including one or more processing cores, and a power supply 404, etc. Those skilled in the art will understand that... Figure 18 The computer device structure shown does not constitute a limitation on the computer device and may include, but is not limited to, computer devices. Figure 18 This indicates more or fewer components, a combination of certain components, or different arrangements of components. Among them: The memory 401 can be used to store software programs and modules. The processor 403 executes various functional applications and data processing by running the software programs and modules stored in the memory 401. The memory 401 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device (such as audio data, telephone directory, etc.). In addition, the memory 401 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 401 may also include a memory controller to provide access to the memory 401 by the processor 403 and the input unit 402.

[0127] Input unit 402 can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control. Specifically, in one embodiment, input unit 402 may include a touch-sensitive surface and other input devices. A touch-sensitive surface, also known as a touch display or touchpad, can collect user touch operations on or near it (e.g., user operations using fingers, styluses, or any suitable object or accessory on or near the touch-sensitive surface) and drive corresponding connection devices according to a pre-set program. Optionally, the touch-sensitive surface may include a touch detection device and a touch controller. The touch detection device detects the user's touch orientation and the signal generated by the touch operation, transmitting the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to the processor 403, and can receive and execute commands from the processor 403. Furthermore, various types of touch-sensitive surfaces, such as resistive, capacitive, infrared, and surface acoustic wave, can be used. In addition to the touch-sensitive surface, input unit 402 may also include other input devices. Specifically, other input devices may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc. The processor 403 is the control center of the computer device. It connects various parts of the mobile phone via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 401, and by calling data stored in the memory 401, it performs various functions of the computer device and processes data, thereby performing overall detection of the mobile phone. Optionally, the processor 403 may include one or more processing cores; preferably, the processor 403 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into the processor 403.

[0128] The computer device also includes a power supply 404 (such as a battery) that supplies power to various components. Preferably, the power supply can be logically connected to the processor 403 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 404 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0129] Although not shown, the computer device may also include a camera, Bluetooth module, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 403 in the computer device loads the executable files corresponding to the processes of one or more applications into the memory 401 according to the following instructions, and the processor 403 runs the applications stored in the memory 401 to realize various functions, as follows: When the start command of the image acquisition module is detected, the mini-program framework integrated in the terminal is launched; through the mini-program framework, a version query request for the target program in the image acquisition module is sent to the server, wherein the target program runs based on the mini-program framework; the response data returned by the server based on the version query request is obtained, wherein the response data includes the software update data of the target program; based on the software update data, the target program is updated through the mini-program framework.

[0130] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0131] As can be seen from the above, the computer device in this embodiment efficiently and flexibly updates the target program in the image acquisition module. Specifically, the computer device can start a mini-program framework when the image acquisition module starts. Since the target program to be updated runs on the mini-program framework, that is, the target software of the image acquisition module runs on the mini-program framework, and the computer device can send a version query request for the target program to the server through the mini-program framework, that is, the mini-program framework can query the server for the existence of a new version of the target software every time it starts. This means that when updating the software of the target software in the image acquisition module, it no longer relies on the server to issue software update data, but can obtain the software update data of the target software by querying the server, thereby realizing the software update of the target software. This not only improves the flexibility of software updates, but also, since the version query request of the target program is sent to the server through the mini-program framework, the mini-program framework can not only serve as the basic framework for the target program to run, but more importantly, the mini-program framework can assist in executing the software update of the target program, thus improving the efficiency of software updates.

[0132] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0133] Therefore, embodiments of this application provide a storage medium storing a plurality of instructions that can be loaded by a processor to execute steps in any of the software update methods provided in embodiments of this application. For example, the instructions can execute the following steps: When the start command of the image acquisition module is detected, the mini-program framework integrated in the terminal is launched; through the mini-program framework, a version query request for the target program in the image acquisition module is sent to the server, wherein the target program runs based on the mini-program framework; the response data returned by the server based on the version query request is obtained, wherein the response data includes the software update data of the target program; based on the software update data, the target program is updated through the mini-program framework.

[0134] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0135] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0136] Since the instructions stored in the storage medium can execute the steps of any of the software update methods provided in the embodiments of this application, the beneficial effects that any of the software update methods provided in the embodiments of this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.

[0137] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various alternative implementations of the above-described software update aspects.

[0138] The software update method, apparatus, computer device, storage medium, and product provided in the embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A software update method, characterized in that, Applicable to a terminal, the terminal includes an image acquisition module, and the mini-program framework has at least one basic functional module; the method includes: Determine the business requirements and computing power indicators of the image acquisition module; filter the basic functional modules based on the business requirements and computing power indicators; and integrate the mini-program framework into the terminal based on the filtering results. When the start command of the image acquisition module is detected, the mini-program framework integrated in the terminal is started; The mini-program framework is used to send a version query request for the target program in the image acquisition module to the server, wherein the target program runs based on the mini-program framework. Obtain the response data returned by the server based on the version query request; Based on the response data, the target program is updated using the mini-program framework.

2. The software update method according to claim 1, characterized in that, Obtain the response data returned by the server based on the version query request, including: Obtain query response data returned by the server in response to the version query request, wherein the query response data includes the target version information of the target program; Based on the target version information, the current program version of the target program is verified; If the verification passes, a version update request for the target program is sent to the server; Obtain the update response data returned by the server in response to the version update request.

3. The software update method according to claim 1, characterized in that, The response data includes software update data for the target program; based on the response data, the target program is updated via the mini-program framework, including: The software update data is stored; When an update command from the image acquisition module is detected, the stored software update data is obtained through the mini-program framework; The target program is updated based on the software update data.

4. The software update method according to claim 1, characterized in that, Through the aforementioned mini-program framework, a version query request for the target program in the image acquisition module is sent to the server, including: Identify the target program in the image acquisition module to be version-queried; Obtain the version query request for the target program; The version query request is sent to the server through the aforementioned mini-program framework.

5. The software update method according to claim 1, characterized in that, The terminal includes a hardware adaptation layer, which is used to adapt to the hardware interface of the image acquisition module. The method further includes: When an updated call instruction for the image acquisition module is detected from the target program, the hardware adaptation layer is invoked through the mini-program framework; Based on the call result, the operation corresponding to the call instruction is executed through the hardware adaptation layer.

6. The software update method according to claim 5, characterized in that, Before invoking the hardware adaptation layer through the mini-program framework, the method further includes: Determine the business requirements of the image acquisition module; Based on the business requirements information, the hardware interfaces of the image acquisition module are selected; Based on the screening results, a hardware adaptation layer for the terminal is constructed.

7. The software update method according to claim 5, characterized in that, The terminal also includes a hardware layer, which includes at least one sub-module of the image acquisition module; Executing the operation corresponding to the invocation instruction through the hardware adaptation layer includes: The target sub-module in the hardware layer is invoked through the hardware adaptation layer; Based on the call result, the operation corresponding to the call instruction is executed.

8. The software update method according to claim 1, characterized in that, The terminal includes a software layer that integrates a mini-program framework. The mini-program framework includes at least one basic functional module. Before sending a version query request for the target program in the image acquisition module to the server, the method further includes: Based on the aforementioned basic functional modules, develop program functions for the image acquisition module; Based on the mini-program framework and the program functions, construct the target program for the image acquisition module.

9. A software update device, characterized in that, Applicable to a terminal, the terminal includes an image acquisition module, and the mini-program framework has at least one basic functional module, including: The second determining unit is used to determine the business requirements information and computing power index information of the image acquisition module; The second filtering unit is used to filter the basic functional modules based on the business requirement information and the computing power indicator information. An integration unit is used to integrate a mini-program framework into the terminal based on the filtering results; The startup unit is used to start the mini-program framework integrated in the terminal when the startup command of the image acquisition module is detected. The sending unit is used to send a version query request of the target program in the image acquisition module to the server through the mini-program framework, wherein the target program runs based on the mini-program framework; The acquisition unit is used to acquire the response data returned by the server based on the version query request; The update unit is used to update the target program based on the response data through the mini-program framework.

10. The software update apparatus according to claim 9, characterized in that, The acquisition unit includes: The first acquisition subunit is used to acquire query response data returned by the server in response to the version query request, wherein the query response data includes the target version information of the target program; The version verification subunit is used to verify the current program version of the target program based on the target version information. The first sending subunit is used to send a version update request for the target program to the server if the verification passes. The second acquisition subunit is used to acquire the update response data returned by the server in response to the version update request.

11. The software update apparatus according to claim 9, characterized in that, The response data includes software update data for the target program; The update unit includes: A data storage subunit is used to store the software update data; The data acquisition subunit is used to acquire stored software update data through the mini-program framework when an update instruction from the image acquisition module is detected. The software update subunit is used to update the target program according to the software update data.

12. The software update apparatus according to claim 9, characterized in that, The transmitting unit includes: The target determination subunit is used to determine the target program in the image acquisition module to be queried for version verification. The third acquisition subunit is used to acquire the version query request of the target program; The second sending subunit is used to send the version query request to the server through the mini-program framework.

13. The software update apparatus according to claim 9, characterized in that, The terminal includes a hardware adaptation layer for adapting to the hardware interface of the image acquisition module. The software update device further includes: The calling unit is used to call the hardware adaptation layer through the applet framework when an updated calling instruction for the image acquisition module is detected from the target program. An execution unit is used to perform the operation corresponding to the call instruction through the hardware adaptation layer based on the call result.

14. The software update apparatus according to claim 13, characterized in that, Before the hardware adaptation layer is invoked through the mini-program framework, the software update device further includes: The first determining unit is used to determine the service requirement information of the image acquisition module; The first filtering unit is used to filter the hardware interface of the image acquisition module according to the business requirement information. The first construction unit is used to construct the hardware adaptation layer of the terminal based on the screening results.

15. The software update apparatus according to claim 13, characterized in that, The terminal also includes a hardware layer, which includes at least one sub-module of the image acquisition module; The calling unit includes: The module calling subunit is used to call the target submodule in the hardware layer through the hardware adaptation layer; The operation execution subunit is used to execute the operation corresponding to the call instruction based on the call result.

16. The software update apparatus according to claim 9, characterized in that, The terminal includes a software layer that integrates a mini-program framework. The mini-program framework includes at least one basic functional module. Before sending a version query request for the target program in the image acquisition module to the server, the software update device further includes: A development unit is used to develop program functions for the image acquisition module based on the basic functional modules. The second construction unit is used to construct the target program of the image acquisition module according to the mini-program framework and the program functions.

17. A computer device, characterized in that, It includes a memory and a processor; the memory stores an application program, and the processor runs the application program within the memory to perform the operations in the software update method according to any one of claims 1 to 8.

18. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions adapted for loading by a processor to perform the steps in the software update according to any one of claims 1 to 8.

19. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the software update method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Applet updating method and device, equipment and computer readable medium

    CN111488167A