CN116257260A - Software updating method, device, computer equipment, storage medium and product - Google Patents

Software updating method, device, computer equipment, storage medium and product Download PDF

Info

Publication number
CN116257260A
CN116257260A CN202111499867.2A CN202111499867A CN116257260A CN 116257260 A CN116257260 A CN 116257260A CN 202111499867 A CN202111499867 A CN 202111499867A CN 116257260 A CN116257260 A CN 116257260A
Authority
CN
China
Prior art keywords
image acquisition
acquisition module
version
software
program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111499867.2A
Other languages
Chinese (zh)
Inventor
赵伟
郭润增
王少鸣
洪哲鸣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202111499867.2A priority Critical patent/CN116257260A/en
Publication of CN116257260A publication Critical patent/CN116257260A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application discloses a software updating method, a software updating device, computer equipment, a storage medium and a software updating product. The scheme is suitable for the terminal, the terminal comprises an image acquisition module, and when a starting instruction of the image acquisition module is detected, an applet framework integrated in the terminal can be started; transmitting a version query request of a target program in the image acquisition module to a server through an applet framework, wherein the target program runs based on the applet framework; response data returned by the server based on the version inquiry request is obtained; based on the response data, the object program is updated by the applet framework. The scheme can be applied to various scenes such as cloud technology, artificial intelligence, intelligent traffic and the like, and can be used for efficiently and flexibly updating software.

Description

Software updating method, device, computer equipment, storage medium and product
Technical Field
The present application relates to the field of computer technologies, and in particular, to a software updating method, apparatus, computer device, storage medium, and product.
Background
Software update refers to a version update of software, e.g., updating software from a low version to a high version. In practical application, since the high version often repairs part of faults of the low version, the functions and performances of the software can be upgraded by software update, and the user experience is improved.
In the research and practice of the related art, the inventor of the present application found that, for a terminal including an image acquisition module, when performing software update on target software therein, the software update may be implemented by relying on software update data issued by a server, but this may make the software update less efficient and less flexible, and thus, the current software update method still needs to be improved.
Disclosure of Invention
The embodiment of the application provides a software updating method, a device, computer equipment, a storage medium and a product, which can efficiently and flexibly update software.
The embodiment of the application provides a software updating method, which is applicable to a terminal, wherein the terminal comprises an image acquisition module, and the method comprises the following steps:
when a starting instruction of the image acquisition module is detected, starting an applet framework integrated in the terminal;
transmitting a version inquiry request of a target program in the image acquisition module to a server through the applet framework, wherein the target program runs based on the applet framework;
response data returned by the server based on the version inquiry request is obtained;
and based on the response data, performing software update on the target program through the applet framework.
Correspondingly, the embodiment of the application also provides a software updating device, which comprises:
the starting unit is used for starting the applet framework integrated in the terminal when the starting instruction of the image acquisition module is detected;
the sending unit is used for sending a version inquiry request of the target program in the image acquisition module to the server through the small program framework, wherein the target program runs based on the small program framework;
the acquisition unit is used for acquiring response data returned by the server based on the version inquiry request;
and the updating unit is used for carrying out software updating on the processing program through the applet framework based on the response data.
In an embodiment, the acquiring unit includes:
the first acquisition subunit is used for acquiring query response data returned by the server in response to the version query request, wherein the query response data comprises target version information of the target program;
the version verification subunit is used for verifying the current program version of the target program according to the target version information;
the first sending subunit is used for sending a version update request of the target program to the server if the verification is passed;
And the second acquisition subunit is used for acquiring update response data returned by the server in response to the version update request.
In one embodiment, the response data includes software update data of the target program; the updating unit includes:
a data storage subunit, configured to store the software update data;
the data acquisition subunit is used for acquiring stored software update data through the applet framework when an update instruction of the image acquisition module is detected;
and the software updating subunit is used for updating the software of the target program according to the software updating data.
In an embodiment, the transmitting unit includes:
the target determining subunit is used for determining a target program to be subjected to version inquiry in the image acquisition module;
a third obtaining subunit, configured to obtain a version query request of the target program;
and the second sending subunit is used for sending the version inquiry request to the server through the applet framework.
In an embodiment, the terminal includes a hardware adaptation layer, where the hardware adaptation layer is configured to adapt a hardware interface of the image acquisition module, and the software updating device further includes:
The calling unit is used for calling the hardware adaptation layer through the applet framework when detecting a calling instruction of the updated object program for the image acquisition module;
and the execution unit is used for executing the operation corresponding to the calling instruction through the hardware adaptation layer based on the calling result.
In an embodiment, before said invoking the hardware adaptation layer by the applet framework, the software updating means further comprises:
the first determining unit is used for determining service requirement information of the image acquisition module;
the first screening unit is used for screening the hardware interface of the image acquisition module according to the service demand information;
the first construction unit is used for constructing the hardware adaptation layer of the terminal according to the screening result.
In an embodiment, the terminal further comprises a hardware layer, the hardware layer comprising at least one sub-module of the image acquisition module; the calling unit comprises:
the module calling subunit is used for calling the target submodule in the hardware layer through the hardware adaptation layer;
and the operation execution subunit is used for executing the operation corresponding to the calling instruction based on the calling result.
In an embodiment, the applet framework has at least one basic functional module, and the software updating means further comprises, prior to said starting the applet framework integrated in the terminal:
the second determining unit is used for determining service demand information and calculation power index information of the image acquisition module;
the second screening unit is used for screening the basic functional module according to the business demand information and the power calculation index information;
and the integrating unit is used for integrating the applet framework in the terminal according to the screening result.
In an embodiment, the terminal includes a software layer, the software layer is integrated with an applet framework, the applet framework includes at least one basic function module, and before the sending the version query request of the target program in the image acquisition module to the server, the software updating device further includes:
the development unit is used for developing a program function aiming at the image acquisition module based on the basic function module;
and the second construction unit is used for constructing a target program of the image acquisition module according to the applet framework and the program function.
Accordingly, embodiments of the present 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 as shown in the embodiments of the present application.
Accordingly, the embodiments of the present application further provide a computer device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the steps of the software updating method shown in the embodiments of the present application are implemented when the processor executes the computer program.
Accordingly, embodiments of the present application also provide a computer program product comprising a computer program/instruction, wherein the computer program/instruction, when executed by a processor, implements the steps of the software update method as shown in the embodiments of the present application.
According to the embodiment of the application, when the starting instruction of the image acquisition module is detected, the applet framework integrated in the terminal is started; transmitting a version inquiry request of a target program in the image acquisition module to a server through the applet framework, wherein the target program runs based on the applet framework; response data returned by the server based on the version inquiry request is obtained; and based on the response data, performing software update on the target program through the applet framework.
The method and the device can efficiently and flexibly update the target program in the image acquisition module, and particularly, the method and the device can start the applet framework when the image acquisition module is started, wherein the target program to be updated is based on the applet framework, namely, the target software of the image acquisition module is operated on the applet framework, in addition, the method and the device can send a version inquiry request of the target program to the server through the applet framework, namely, the applet framework can inquire whether new version software of the target software exists in the server when the applet framework is started each time, so that when the software of the target software in the image acquisition module is updated, software update data can not be sent by the server, but software update inquiry can be carried out to the server, so that software update data of the target software can be obtained, and software update can be carried out on the target software.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic view of a scenario of a software update method provided in an embodiment of the present application;
FIG. 2 is a flow chart of a software update method provided by an embodiment of the present application;
FIG. 3 is a schematic diagram of a software update method according to an embodiment of the present application;
FIG. 4 is a schematic diagram of an applet framework for a software update method provided by an embodiment of the present application;
FIG. 5 is another architecture diagram of a software update method according to an embodiment of the present application;
FIG. 6 is another architecture diagram of a software update method provided by an embodiment of the present application;
FIG. 7 is another architecture diagram of a software update method according to an embodiment of the present application;
FIG. 8 is another flow chart of a software update method according to an embodiment of the present application;
FIG. 9 is a schematic structural diagram of a software updating apparatus according to an embodiment of the present application;
FIG. 10 is another schematic structural diagram of a software updating apparatus according to an embodiment of the present application;
FIG. 11 is another schematic structural diagram of a software updating apparatus according to an embodiment of the present application;
FIG. 12 is another schematic structural diagram of a software updating apparatus according to an embodiment of the present application;
FIG. 13 is another schematic structural diagram of a software updating apparatus according to an embodiment of the present application;
FIG. 14 is another schematic structural diagram of a software updating apparatus according to an embodiment of the present application;
FIG. 15 is another schematic structural diagram of a software updating apparatus according to an embodiment of the present application;
FIG. 16 is another schematic diagram of a software update apparatus according to an embodiment of the present application;
FIG. 17 is another schematic structural diagram of a software updating apparatus according to an embodiment of the present application;
fig. 18 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
The embodiment of the application provides a software updating method, a software updating device, computer equipment, a storage medium and a product. Specifically, the embodiment of the application provides a software updating device suitable for computer equipment. The computer device may be a terminal or the like. Specifically, the terminal may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, a car computer, a face recognition device, etc., but is not limited thereto. In practical applications, the terminal and the server may be directly or indirectly connected through wired or wireless communication, which is not limited herein.
It should be noted that, the server 20 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and basic cloud computing services such as big data and artificial intelligence platforms. The terminal 10 and the server 20 may be directly or indirectly connected through wired or wireless communication, and the present application is not limited thereto.
The embodiment of the application will take a software updating device as an example of a terminal, and specifically, the terminal may include an image acquisition module to introduce a software updating method.
Referring to fig. 1, when a start instruction of an image acquisition module is detected by a terminal 10, an applet framework integrated in the terminal 10 is started, and a version inquiry request of a target program in the image acquisition module is transmitted to a server 20 through the applet framework, wherein the target program operates based on the applet framework. Further, the terminal 10 may acquire response data returned by the server 20 based on the version query request, so that the terminal 10 may perform software update on the target program through the applet framework based on the response data.
The following will describe in detail. The following description of the embodiments is not intended to limit the preferred embodiments.
The software updating method provided by the embodiment of the application can be executed by the terminal or jointly executed by the terminal and the server; the embodiments of the present application are described by taking a software updating method performed by a terminal as an example, and specifically, the terminal may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, a vehicle-mounted computer, a face recognition device, etc., but not limited thereto.
In the embodiment of the present application, the method may be performed by a software updating device integrated in a terminal, where the terminal may include an image acquisition module, and as illustrated in fig. 2, a specific flow of the software updating method may be as follows:
101. and when a starting instruction of the image acquisition module is detected, starting an applet framework integrated in the terminal.
The image acquisition module refers to a module unit capable of realizing image acquisition, and for example, in application scenes such as face recognition, face payment and the like, the image acquisition module may include a camera and the like. As examples, the image acquisition module may include a 3D camera, an infrared camera, a color camera, and the like.
Specifically, the 3D camera may be used to collect a depth map, where the depth map is an image obtained by collecting infrared light with a speckle structure by the infrared sensor and then resolving the speckle by the depth unit. In 3D computer graphics and computer vision, a depth map is an image or image channel containing information about the distance of the surface of a scene object to the viewpoint, which can be used for in vivo detection, assisted alignment recognition, etc. in face payment. The infrared camera may be used to collect an infrared image, wherein the infrared image is an image imaged by infrared sensor collecting floodinfrared light, and in face payment, the infrared image may be used for living body detection, etc. The color camera can be used for collecting color images, wherein the color images are images formed by collecting natural light through a color sensor, and the color images can be used for face optimization, contrast identification and the like in face payment.
The start instruction of the image acquisition module is a related instruction for starting the image acquisition module, for example, when the image acquisition module is started, the start instruction of the image acquisition module can be detected. As an example, the image acquisition module may specifically be a camera, so when it is detected that the camera is opened, a start instruction of the camera may be detected.
The applet framework is a framework for running a custom web program in a customized browser mode, can be run in a WebAssemble client or other hardware platform, and can provide performance very close to that of running local codes in cooperation with WebAssemble codes.
Specifically, webAssembly (abbreviated as WASM in english) is a new type of code that modern browsers can execute, with the aim of obtaining better performance on the network. WASM is a low-level binary format code, small in size, and therefore fast in loading and execution.
In an embodiment, the image acquisition module may specifically be a camera, referring to fig. 3, when the camera is opened, the terminal may detect a start instruction of the camera, and further, the terminal may start the applet framework. In this way, in practical applications, the terminal may start the applet framework every time the camera is started.
In an embodiment, considering that the computational power of the image acquisition module is limited in practical application, in order to integrate the applet framework in the terminal, module screening may be performed on the applet framework, specifically, before the step of "starting the applet framework integrated in the terminal", it may include:
determining service demand information and calculation power index information of an image acquisition module;
screening the basic function modules according to the service demand information and the calculation index information;
and integrating an applet framework in the terminal according to the screening result.
The service requirement information of the image acquisition module refers to information obtained by analyzing requirements of services based on the image acquisition module in an actual application scene. As an example, when the image acquisition module is specifically a camera, in an application scenario of face payment, it may be determined that service requirement information of the camera may include functions such as image acquisition, image processing, and the like, but not include functions such as multimedia, multi-process communication, user Interface (UI), and drawing.
The computing power index information of the image acquisition module is related index information indicating the computing power of the image acquisition module. As an example, the power indicator information of the image acquisition module may include parameter information of the image acquisition module in terms of memory read-write, input/Output (IO), and the like.
The basic functional module of the applet framework refers to a basic module provided by the applet framework for realizing a specific function, and a user can further develop and adjust the basic functional module to realize related business logic. For example, the basic functional modules of the applet framework may include basic modules that implement the following functions: network related, applet scheduling, security related, resource compression, multimedia related, multi-process communication, UI presentation and rendering, and the like.
In the application, considering that in practical application, the computing power of the image acquisition module is limited, in order to enable the target program to run on the applet framework, the basic function module of the applet framework can be screened according to the service demand information and the computing power index information.
As an example, the image acquisition module may specifically include a camera, the target program is specifically an applet, and since the camera hardware platform is a low-power platform, in order to enable the applet to run on the camera platform, the basic function module of the applet framework may be screened according to the service requirement information of the camera in the actual application scene and the power calculation index information of the camera hardware platform itself, so as to screen out the basic function module irrelevant to the camera scene or inconsistent with the power calculation of the camera, for example, the basic function module that implements the following functions may be screened out: multimedia correlation, multi-process communication, UI display and drawing, etc., but only a basic functional module strongly correlated with the service scene information of the camera or conforming to the calculation power index information of the camera is reserved, for example, a basic functional module realizing the following functions may be reserved: resource compression, security correlation, network correlation, etc.
Further, an applet framework may be integrated in the terminal according to the screening result, and in particular, the screened applet framework may be integrated in the terminal. As an example, the image acquisition module may specifically include a camera, the object program is specifically an applet, referring to an applet framework schematic diagram shown in fig. 4, specifically, according to service requirement information and calculation index information of the camera platform, basic function modules of the applet framework may be screened, and basic function modules that are strongly related to service scene information of the camera or conform to calculation index information of the camera are retained, as shown in fig. 4, to implement basic function modules related to network, applet scheduling, security related, resource compression and the like. In addition, the applet framework integrated in the terminal may be further configured with JavaScript (abbreviated as JS) development capability, so that the upper layer service may implement relevant service logic based on these basic functional modules and JS-related capability.
102. And sending a version query request of the target program in the image acquisition module to the server through the applet framework, wherein the target program runs based on the applet framework.
In this application, the target program is a program to be updated in the image acquisition module, for example, the target program may specifically be run in the form of an applet. Specifically, the applet is an application that can be used without downloading and installing, which realizes the dream of "tentacle-accessible" of the application, and the user can open the application by sweeping or searching. The concept of 'run out and walk' is also embodied, and the user does not need to care whether to install too many applications. Applications will be ubiquitous, available at any time, but without installation and uninstallation.
In one embodiment, since the applet framework integrated in the terminal may have at least one basic function module and the applet framework may also be provided with development capabilities in a specific programming language, such as JS development capability, a developer may utilize the basic function module of the applet framework and the development capabilities provided by the applet framework to develop a target program that operates based on the applet framework. In particular, the terminal may comprise a software layer and an applet framework integrated in the software layer, and the applet framework may comprise at least one basic functional module, in particular, before the step of "sending a version query request of the object program in the image acquisition module to the server", it may comprise:
Developing a program function for the image acquisition module based on the base function module;
and constructing an object program of the image acquisition module according to the applet framework and the program function.
The program function refers to a program for realizing a specific function, and thus, the program function for the image acquisition module is a program for realizing the specific function for the image acquisition module. For example, specific functions may include image processing, firmware upgrades (in practice, the program in the image acquisition module may be referred to as firmware), opening of the image acquisition module, streaming, and off-streaming (where "opening" refers to starting the image acquisition module; streaming "refers to performing image acquisition, e.g., turning on the camera's camera function, and" off-streaming "refers to terminating image acquisition, e.g., turning off the camera's camera function), etc.
Because the basic functional module is a basic module provided by the applet framework to implement a particular function, a user may further develop and adjust based on the basic functional module to implement the associated business logic. Thus, program functions for the image acquisition module can be developed based on the basic function module. For example, the user can directly develop the basic functional module on the basis of the basic functional module to develop the program function for the image acquisition module; as another example, because the applet framework may be provided with development capabilities in a particular programming language, such as JS development capabilities, a user can develop program functionality to provide services externally by utilizing the underlying functional modules provided by the applet framework, as well as the development capabilities in the associated programming language.
As an example, the image acquisition module may specifically include a camera, and the object program may specifically be an applet. Since the object program runs based on the applet framework, and referring to fig. 4, the applet framework may have at least one basic function module, and the applet framework may be provided with JS development capability, in practical applications, program functions may be developed based on the basic function module and the JS development capability provided by the applet framework. For example, camera core image related capabilities such as open, start, close, etc. can be developed using JS; as another example, program functions that implement peripheral functions such as image processing and firmware upgrades may also be developed.
Further, the target program of the image acquisition module can be constructed according to the small program framework and the developed program functions. For example, a program corresponding to the developed program function may be used as a target program, and deployed in an applet form on an applet framework to construct a target program of the image acquisition module; for another example, the developed program functions may be further coupled, so that the coupled program may implement a plurality of functions for the image acquisition module, and the coupled program is deployed as an object program in an applet format on the applet framework to construct the object program for the image acquisition module.
In an embodiment, the image acquisition module may specifically include a camera, and the object program is specifically an applet. As can be seen from fig. 4, the upper layer of the applet framework may be provided with a development capability under a specific programming language, for example, JS development capability, and in the present application, the target program may be developed based on the applet framework and the development capability under the specific programming language, so, referring to fig. 5, the target program may be regarded as the applet framework, and the upper layer application of the development capability under the specific programming language, that is, the upper layer application may develop the relevant functional module and provide services to the outside based on the applet framework and the relevant JS development capability thereof. For example, the related capability of the camera core image can be developed by using JS, and the related capability is deployed in the camera in the form of an applet, and meanwhile, a new version can be pulled to a server at intervals; while some peripheral functions of the camera, such as image processing and firmware upgrades, etc., may also be implemented in the form of applets.
The version inquiry request of the target program refers to data sent to the server, and the data is used for determining whether a new version exists in the target program or not.
In this application, since at least one program may be deployed on the applet framework, an object program to be queried for version may be determined therefrom, and then a version query request of the object program in the image acquisition module is sent to the server through the applet framework, specifically, the step of sending, through the applet framework, the version query request of the object program in the image acquisition module to the server may include:
determining a target program to be subjected to version inquiry in an image acquisition module;
acquiring a version inquiry request of a target program;
and sending a version inquiry request to the server through the applet framework.
In the present application, there may be various ways to determine the target program to be queried for the version in the image acquisition module, for example, all the programs in the image acquisition module may be used as the target program; as another example, the target program may be selected from all programs of the image acquisition module. As an example, a corresponding version inquiry period may be set for each program, and when the current time matches the version inquiry period, the corresponding program is set as a target program to be subjected to version inquiry. As another example, tag information may be provided for each program, and a target program may be selected from all programs of the image acquisition module according to the tag, for example, target tag information transmitted by a server or other terminal may be received, and a program matching the target tag information may be determined as a target program to be subjected to version inquiry.
In the present application, there may be various ways to obtain the version query request of the target program, for example, after determining the target software to be subjected to version query, the terminal may further generate the version query request of the target program; for another example, a version inquiry request may be generated by the target program and transmitted to the terminal so that the terminal can acquire the version inquiry request.
It should be noted that, in the present application, the execution sequence between the step of determining the target program to be queried for the version in the image capturing module and the step of obtaining the version query request of the target program may not be limited. In an embodiment, the version query request may be generated by the target program and sent to the terminal, and correspondingly, the terminal may obtain the version query request and determine the program corresponding to the version query request as the target program to be subjected to the version query.
Further, the version inquiry request can be sent to the server through the applet framework, for example, the terminal can generate version inquiry request data by calling a related interface provided by the applet framework, and send the version inquiry request data to the server; for another example, the terminal may send the obtained version query request to the applet framework to trigger the applet framework to generate version query request data and send the version query request data to the server.
103. Response data returned by the server based on the version query request is acquired.
Because the version query request sent to the server is specifically used for determining whether the target program has a new version or not to the server, after receiving the version query request, the server can execute related operations based on the version query request and generate response data returned to the terminal based on operation results.
For example, the version query request may carry current version information of the target program, where the current version information indicates a current version of the target program in the terminal, so that the server may parse the current version information of the target program from the current version query information after obtaining the version query information, and the server may compare the current version of the target program with a latest version of the target program stored in the server according to the current version information, so as to determine whether the target program of the terminal has a new version, and if so, the server may generate software update data of the target program according to the target program of the latest version, and attach the software update data to the terminal in response data.
For another example, the version query request may be used to request to query the server for the current latest program version of the target program, and correspondingly, the server may perform a related query operation based on the version query request to query the latest version of the target program in the server, and attach the target version information characterizing the latest version to the response data and return the response data to the terminal, so that the terminal may request, from the server, software update data required for performing software update on the target program according to the received target version information, and specifically, the step of "obtaining the response data returned by the server based on the version query request" may include:
Acquiring query response data returned by a server in response to the version query request, wherein the query response data comprises target version information of a target program;
checking the current program version of the target program according to the target version information;
if the verification is passed, a version update request of the target program is sent to the server;
update response data returned by the server in response to the version update request is acquired.
The query response data returned by the server in response to the version query request refers to response data returned by the server in response to the version query request sent by the terminal.
The query response data refers to response data generated by the server in response to a version query request sent by the terminal, and in the application, the update response data specifically may include target version information of a target program, where the target version information indicates the latest version of the target program in the current server.
Specifically, after the server obtains the version query request, a query operation may be performed with respect to the program version of the target program to query the latest version of the target program in the server, and further, the server may append target version information indicating the latest version of the target program to query response data, and send the query response data to the terminal, so that the terminal may learn the latest version of the target program in the server.
Correspondingly, the terminal can analyze the target version information of the target program from the acquired query response data, and determine the latest version of the target program at the server side through the target version information. Further, the terminal may verify the current program version of the target program in the terminal according to the target version information, so as to determine whether the target program in the terminal needs to be updated. For example, the terminal may verify the current program version of the target program by comparing the current program version of the target program with the latest version, and if the current program version of the target program in the terminal is not the latest version, it is determined that the verification is passed, that is, the target program in the terminal needs to be updated; otherwise, determining that the verification is not passed, i.e. the target program in the terminal does not need to be updated.
The version update request of the target program is data sent to the server, and the data is used for requesting software update data of the target program from the server, so that the terminal can update the software of the target program by using the software update data.
The update response data refers to response data generated by the server in response to a version update request sent by the terminal, and in the application, the update response data may specifically include software update data of the target program.
The software update data of the target program refers to related data required for performing software update on the target program, for example, the software update data may be program data corresponding to the target program under a new version; for another example, the software update data may be a data download address, and the terminal may download program data corresponding to the new version of the target program from the data download address.
For example, the version update request sent by the terminal to the server may include version specification information, specifically, the version specification information specifically indicates a target program version to which the target program is to be updated, so that the server may append software update data corresponding to the target program version to update response data in response to the version update request, and send the update response data to the terminal, so that the terminal may parse the software update information corresponding to the target program version from the update response data, and update the target program in the terminal from the current version to the target program version through the software update information.
For another example, the version update request sent by the terminal to the server may not include specific version designation information, that is, the version update request is used to request to obtain software update data corresponding to the target program of the latest version in the server, and correspondingly, the server may append the software update data corresponding to the latest version to update response data in response to the version update request, and send the update response data to the terminal, so that the terminal may parse the software update information corresponding to the latest version from the update response data, and update the target program in the terminal from the current version to the latest version through the software update information.
In an embodiment, referring to fig. 3, the terminal may obtain 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 program version of the target program according to the target version information, and when the verification is passed, the terminal determines that the server side has the new version of the target program, and then sends a version update request of the target program to the server. The terminal can acquire update response data returned by the server in response to the version update request, and analyze the software update data of the target program from the update response data so as to load new version resources of the target program.
104. Based on the response data, the object program is updated by the applet framework.
In the present application, the response data may include software update data of the target program, so the terminal may parse the software update data from the response data, and because the software update data of the target program is related data required for performing software update on the target program, for example, the software update data may be program data corresponding to the target program under a new version (where the new version is relative to a current version of the target program, that is, where the new version is the target update version of the target program); for another example, the software update data may be a data download address, and the terminal may download program data corresponding to the new version of the target program from the data download address. Therefore, the terminal can perform software update on the target program based on the software update data, and because the target program runs based on the applet framework in the present application, the terminal can perform software update on the target program through the applet framework.
In an embodiment, the terminal may update the software of the target program through the applet framework after acquiring the program data corresponding to the new version of the target program lock based on the software update data, that is, the terminal may start the new version of the resource of the target program after loading the new version of the resource.
In another embodiment, the image acquisition module may be in operation when the new version resource of the target program is loaded, for example, the camera may be in operation, so that the new version resource of the target program may be stored first, and when the current operation state of the image acquisition module is not affected, the software of the target program is updated through the new version resource. Specifically, the step of "updating the target program with the applet framework based on the software update data" may include:
storing the software update data;
when an updating instruction of the image acquisition module is detected, acquiring stored software updating data through an applet framework;
and updating the software of the target program according to the software updating data.
For example, the software update data of the target program may be a new version resource of the target program, and thus the terminal may store the new version resource of the target program.
The update instruction of the image acquisition module refers to an instruction for determining to update software of the target program.
In practical application, the update instruction may be set as required, for example, the update instruction may be a start instruction of the image acquisition module, and when the terminal may store the new version resource after loading the new version resource of the target program, and when the image acquisition module is restarted, the stored new version resource is obtained through the applet framework, and software update is performed on the target program, so as to update the target program into the new version.
For another example, the update instruction may be an instruction issued by the server, and specifically, the terminal may store the new version resource after loading the new version resource of the target program, and after receiving the update instruction issued by the server, acquire the stored new version resource through the applet framework, and update the software of the target program to update the target program into the new version.
For another example, the update instruction may be an instruction preset according to a certain time interval, and if the current time meets a preset condition, the update instruction may be triggered to be executed. Specifically, the terminal may store the new version resource after loading the new version resource of the target program, and after detecting the update instruction, acquire the stored new version resource through the applet framework, and update the software of the target program to update the target program to the new version.
In the application, the target program and the applet framework can be both attributed to the software layer, and the terminal comprises the hardware layer besides the software layer due to the fact that the image acquisition module is included in the terminal, and in practical application, the hardware adaptation layer can be arranged between the software layer and the hardware layer, so that the software layer can interact with the hardware layer more efficiently through the hardware adaptation layer.
In an embodiment, the terminal may include a hardware adaptation layer, where the hardware adaptation layer may be configured to adapt a hardware interface of the image acquisition module, and in particular, the software updating method may further include:
when detecting an updated target program call instruction aiming at the image acquisition module, calling a hardware adaptation layer through an applet framework;
and executing the operation corresponding to the calling instruction through the hardware adaptation layer based on the calling result.
In one embodiment, it is contemplated that the object program is executed based on an applet framework, and therefore, in the software layer, the object program may be above the applet framework and the object program may implement the relevant functions by calling the applet framework. In the hardware layer, an image acquisition module may be included, for example, a camera may be included, and in addition, other image processing related hardware may be further included, for example, an image signal processor (Image Signal Processor, ISP), where ISP is a unit for processing the output signal of the front-end image sensor. Between the software layer and the hardware layer, a hardware adaptation layer may be laid out, and in particular, the hardware adaptation layer may be used to adapt the hardware interface in the hardware layer.
In view of the fact that in practical application, the computing power of the image acquisition module is limited, in the application, besides the basic functional module of the applet framework can be screened to simplify the applet framework, the hardware interface of the image acquisition module can be screened according to the service requirement information of the image acquisition module, and the hardware adaptation layer is constructed according to the screening result, so that the constructed hardware adaptation layer accords with the service requirement of the image acquisition module and the computing power limit of the image acquisition module. Specifically, before the step of "invoking the hardware adaptation layer through the applet framework", it may include:
determining service demand information of an image acquisition module;
screening hardware interfaces of the image acquisition module according to the service demand information;
and constructing a hardware adaptation layer of the terminal according to the screening result.
The service requirement information of the image acquisition module refers to information obtained by analyzing requirements of services based on the image acquisition module in an actual application scene.
In the application, the hardware interface provided by the image acquisition module may be screened according to the service requirement information, for example, the image acquisition module may specifically include a camera and an ISP, and the object program is specifically an applet, so that the hardware adaptation layer mainly solves a part of the interface with the camera hardware, for example, when firmware is upgraded, or when data is acquired from the ISP, the hardware adaptation layer needs to interact with the corresponding ISP or depth computing hardware. Further, in practical application, a structure diagram as shown in fig. 6 may be constructed, where a plurality of general hardware interfaces (Application Programming Interface, API) related to the camera may be abstracted above the main control chip of the camera, and the hardware interfaces of the image acquisition module may be screened according to service requirement information, for example, some relatively common camera related functions may be reserved from the hardware interfaces according to service requirements, for example, some hardware interfaces unrelated to upper layer services may be screened from the hardware interfaces, so as to screen out the hardware interfaces that implement general capability of the camera.
After the target hardware interfaces are screened out from the hardware interfaces provided by the image acquisition module, a hardware adaptation layer can be constructed to adapt the target hardware interfaces, for example, the target hardware interfaces are taken as hardware interfaces in the ISP, and the hardware interfaces in the ISP can be packaged through the hardware adaptation layer to apply calling to upper camera. It will be appreciated that in practical applications, different hardware adaptation layers may be provided for different image acquisition modules, respectively.
In one embodiment, the updated object may implement the relevant function by calling the applet framework, considering that the object is executed based on the applet framework, and thus, in the software layer, the object may be above the applet framework. In the hardware layer, an image acquisition module may be included, for example, a camera, ISP, etc. And a hardware adaptation layer can be arranged between the software layer and the hardware layer. In this way, when the updated calling instruction of the target program for the image acquisition module is detected, the hardware adaptation layer can be called through the applet framework, and the image acquisition module can be called through the hardware adaptation layer.
As an example, the image acquisition module may specifically include a camera, an ISP, and the like, the object program is specifically an applet, and referring to the architecture diagram shown in fig. 7, the uppermost layer may be a camera service logic applet written based on an applet framework, that is, the object program, where the object program has the advantage of convenient updating, and the object program may be responsible for various tasks of resource coordination, image processing, and the like of the entire camera, and provides image data for an upper layer.
And in this example, the basic functional module of the applet framework may be screened to reduce the applet framework, so as to obtain a lightweight applet framework, and the lightweight applet framework may be responsible for running the core function of the applet on the camera hardware and integrated into the software layer of the terminal, where the object program runs based on the lightweight applet framework.
Thus, the object may implement the relevant function by invoking the lightweight applet framework, e.g., invoking the image acquisition module by invoking the lightweight applet framework. Under the lightweight applet framework, and between the software layer and the hardware layer, a hardware adaptation layer may be deployed, which may specifically call the image acquisition module by calling the hardware adaptation layer, for example, an ISP in the image acquisition module.
Therefore, in the present application, the corresponding operation may be performed by the hardware adaptation layer based on the call result of the applet 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 an ISP and a camera, the terminal may call, through the hardware adaptation layer, a target sub-module corresponding to the call instruction in the hardware layer to perform an operation corresponding to the call instruction. Specifically, the step of executing, by the hardware adaptation layer, the operation corresponding to the call instruction based on the call result may include:
Invoking a target sub-module in a hardware layer through a hardware adaptation layer;
and executing the operation corresponding to the calling instruction based on the calling result.
In an embodiment, for different sub-modules in the image acquisition module, there may be different hardware adaptation layers correspondingly, and the hardware interfaces in the corresponding sub-modules are adapted by the corresponding hardware adaptation layers. The applet framework may call the target sub-module in the hardware layer by calling the hardware adaptation layer corresponding to the target sub-module and perform an operation corresponding to the call instruction based on the call result, for example, by calling the hardware interface corresponding to the call instruction.
In another embodiment, the hardware interfaces in different sub-modules in the image acquisition module may be adapted by the same hardware adaptation layer for these sub-modules. The applet framework may call the target sub-module in the hardware layer by calling the hardware adaptation layer and perform an operation corresponding to the call instruction based on the call result, for example, by calling a hardware interface corresponding to the call instruction.
As can be seen from the above, in this embodiment, when a start instruction of the image acquisition module is detected, an applet framework integrated in the terminal is started; transmitting a version query request of a target program in the image acquisition module to a server through an applet framework, wherein the target program runs based on the applet framework; response data returned by the server based on the version inquiry request is obtained, wherein the response data comprises software update data of the target program; based on the software update data, the object program is updated by the applet framework.
The method and the device can efficiently and flexibly update the target program in the image acquisition module, and particularly, the method and the device can start the applet framework when the image acquisition module is started, wherein the target program to be updated is based on the applet framework, namely, the target software of the image acquisition module is operated on the applet framework, in addition, the method and the device can send a version inquiry request of the target program to the server through the applet framework, namely, the applet framework can inquire whether new version software of the target software exists in the server when the applet framework is started each time, so that when the software of the target software in the image acquisition module is updated, software update data can not be sent by the server, but software update inquiry can be carried out to the server, so that software update data of the target software can be obtained, and software update can be carried out on the target software.
And, in this solution, the applet framework is used as a framework for running the custom web program in the customized browser mode, and the performance very close to the running performance of the native code can be provided by cooperating with the WASM code, so by deploying the applet framework in the software layer and setting the target program to run based on the applet framework, compared with the solution of simply deploying the target program in the software layer, not only the performance of the code running can be greatly improved, but also because the applet framework can be provided with at least one basic function module and development capability under a specific language, such as JS development capability, a developer can develop the target program running based on the applet framework by utilizing the basic function module of the applet framework and the development capability provided by the applet framework, which greatly reduces the difficulty of deploying the target program in the terminal and improves the development efficiency of the target program. In addition, in the scheme, the basic function module of the applet frame is screened according to the service demand information and the calculation index information of the image acquisition module, and then the lightweight applet frame is integrated in the terminal according to the screening result, so that the beneficial effects of integrating the applet frame in the terminal can be kept, the redundant module of the applet frame is further screened out, and the lightweight applet frame is integrated in the terminal, thereby reducing the calculated amount and improving the resource utilization rate.
In addition, in the application scenario of face payment, the 3D payment camera is a core device, the quality of the core device greatly influences the face-brushing payment experience of the whole industry, and with business iteration, a target program in the camera needs to be updated repeatedly. The traditional firmware update period is longer, and the service iteration speed is influenced. According to the scheme, the method of introducing the lightweight customized applet framework into the camera is provided, and the method is matched with the wasm operation, so that the operation efficiency of the camera is close to that of a local code, and the camera has the flexible iteration advantage similar to that of a web program. Therefore, by the scheme, the iterative camera internal algorithm software can be quickly updated so as to be more suitable for the quick change of the service.
According to the method described in the above examples, examples are further detailed below.
In this embodiment, an example will be described in which the software updating means is integrated in a terminal, which may include an image acquisition module. The terminal may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, a car computer, a face recognition device, etc. In practical applications, the terminal and the server may be directly or indirectly connected through wired or wireless communication, which is not limited herein.
It should be noted that the server may be an independent physical server, or may be a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and basic cloud computing services such as big data and artificial intelligence platforms. The terminal and the server may be directly or indirectly connected through wired or wireless communication, which is not limited herein.
As shown in fig. 8, a software updating method specifically includes the following steps:
201. and when the terminal detects a starting instruction of the image acquisition module, starting an applet framework integrated in the terminal.
In an embodiment, before the step of "starting the applet framework integrated in the terminal", the terminal may determine service requirement information and calculation index information of the image acquisition module, and screen the basic function module according to the service requirement information and the calculation index information, so that the lightweight applet framework can be integrated in the terminal according to the screening result.
202. And the terminal sends a version inquiry request of the target program in the image acquisition module to the server through the applet framework, wherein the target program runs based on the applet framework.
In an embodiment, the version query request may carry current version information of the target program, where the current version information indicates a current version of the target program in the terminal.
203. The server generates response data based on the version inquiry request and transmits the response data to the terminal, wherein the response data includes software update data of the target program.
In an embodiment, after the server obtains the version query information, the server may parse the current version information of the target program from the version query information, and according to the current version information, the server may compare the current version of the target program with the latest version of the target program stored in the server to determine whether the target program of the terminal has a new version, if so, the server may generate software update data of the target program according to the target program of the latest version, and attach the software update data to the response data and return the software update data to the terminal.
For example, the software update data may be program data corresponding to the target program under the new version; for another example, the software update data may be a data download address, and the terminal may download program data corresponding to the new version of the target program from the data download address.
204. The terminal acquires response data returned by the server based on the version inquiry request, and analyzes the software update data of the target program from the response data.
205. And the terminal updates the software of the target program through the applet framework based on the software update data.
In an embodiment, the terminal may store the software update data, and when detecting the update instruction of the image acquisition module, acquire the stored software update data through the applet framework, and then update the target program according to the software update data.
In practical application, the update instruction may be set as required, for example, the update instruction may be a start instruction of the image acquisition module, and when the terminal may store the new version resource after loading the new version resource of the target program, and when the image acquisition module is restarted, the stored new version resource is obtained through the applet framework, and software update is performed on the target program, so as to update the target program into the new version.
As can be seen from the foregoing, the embodiment of the present application may efficiently and flexibly update the target program in the image acquisition module, specifically, the solution may enable the applet framework to be started when the image acquisition module is started, where, because the target program to be updated is run based on the applet framework, that is, the target software of the image acquisition module is run on the applet framework, in addition, in the solution, the applet framework may send a version query request of the target program to the server through the applet framework, that is, each time the applet framework is started, the server may be queried whether there is new version software of the target software, which makes the software update data of the target software no longer depend on the server when the software update is performed on the target software in the image acquisition module, but may be performed by performing a software update query to the server to obtain the software update data of the target software, thereby implementing a software update for the target software.
In order to better implement the above method, correspondingly, the embodiment of the application also provides a software updating device, wherein the software updating device can be integrated in the terminal. The terminal may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, a car computer, a face recognition device, etc.
For example, as shown in fig. 9, the software updating apparatus may include a starting unit 301, a transmitting unit 302, an acquiring unit 303, and an updating unit 304, as follows:
a starting unit 301, configured to, when a starting instruction of the image acquisition module is detected, start an applet framework integrated in the terminal;
a sending unit 302, configured to send, to a server, a version query request of a target program in the image acquisition module through the applet framework, where the target program runs based on the applet framework;
an obtaining unit 303, configured to obtain response data returned by the server based on the version query request;
and an updating unit 304, configured to update software of the processing program through the applet framework based on the response data.
In an embodiment, referring to fig. 10, the acquiring unit 303 may include:
the first obtaining subunit 3031 may be configured to obtain query response data returned by the server in response to the version query request, where the query response data includes target version information of the target program;
version verification subunit 3032 may be configured to verify a current program version of the target program according to the target version information;
a first sending subunit 3033, configured to send, if the verification passes, a version update request of the target program to a server;
the second acquisition subunit 3034 may be configured to acquire update response data returned by the server in response to the version update request.
In one embodiment, referring to FIG. 11, the response data includes software update data for the target program; the updating unit 304 may include:
a data storage subunit 3041, configured to store the software update data;
a data acquisition subunit 3042, configured to acquire, when an update instruction of the image acquisition module is detected, stored software update data through the applet framework;
The software update subunit 3043 may be configured to perform software update on the target program according to the software update data.
In an embodiment, referring to fig. 12, the transmitting unit 302 may include:
a target determining subunit 3021, configured to determine a target program to be queried for a version in the image capturing module;
a third obtaining subunit 3022, configured to obtain a version query request of the target program;
the second sending subunit 3023 may be configured to send, through the applet framework, the version query request to a server.
In an embodiment, referring to fig. 13, the terminal includes a hardware adaptation layer, where the hardware adaptation layer is configured to adapt a hardware interface of the image acquisition module, and the software updating apparatus may further include:
a calling unit 305, configured to, when detecting a calling instruction of the updated object program for the image acquisition module, call the hardware adaptation layer through the applet framework;
the execution unit 306 may be configured to execute, based on a call result, an operation corresponding to the call instruction through the hardware adaptation layer.
In an embodiment, referring to fig. 14, before the invoking of the hardware adaptation layer by the applet framework, the software updating apparatus may further include:
A first determining unit 307, configured to determine service requirement information of the image acquisition module;
the first screening unit 308 may be configured to screen the hardware interface of the image acquisition module according to the service requirement information;
the first construction unit 309 may be configured to construct a hardware adaptation layer of the terminal according to the screening result.
In an embodiment, referring to fig. 15, the terminal further includes a hardware layer including at least one sub-module of the image acquisition module; the calling unit 305 may include:
the module calling sub-unit 3051 may be configured to call a target sub-module in the hardware layer through the hardware adaptation layer;
the operation execution subunit 3052 may be configured to execute an operation corresponding to the call instruction based on a call result.
In an embodiment, referring to fig. 16, the applet framework has at least one basic functional module, and before said starting the applet framework integrated in the terminal, the software updating means may further comprise:
the second determining unit 3010 may be configured to determine service requirement information and calculation power index information of the image acquisition module;
the second screening unit 3011 may be configured to screen the basic functional module according to the service requirement information and the calculation index information;
An integrating unit 3012 may be configured to integrate an applet framework in the terminal according to the screening result.
In an embodiment, referring to fig. 17, the terminal includes a software layer, the software layer is integrated with an applet framework, the applet framework includes at least one basic function module, and before the sending the version query request of the target program in the image acquisition module to the server, the software updating apparatus may further include:
a development unit 3013 operable to develop a program function for the image acquisition module based on the basic function module;
the second construction unit 3014 may be configured to construct a target program of the image acquisition module according to the applet framework and the program function.
In the implementation, each unit may be implemented as an independent entity, or may be implemented as the same entity or several entities in any combination, and the implementation of each unit may be referred to the foregoing method embodiment, which is not described herein again.
As can be seen from the above, in the software updating apparatus of the present embodiment, when the starting unit 301 detects the starting instruction of the image acquisition module, the applet framework integrated in the terminal is started; the sending unit 302 sends a version query request of the target program in the image acquisition module to the server through the applet framework, wherein the target program runs based on the applet framework; acquiring response data returned by the server based on the version inquiry request by the acquiring unit 303, wherein the response data comprises software update data of the target program; the processing program is software updated by the applet framework based on the software update data by the update unit 304.
The method and the device can efficiently and flexibly update the target program in the image acquisition module, and particularly, the method and the device can start the applet framework when the image acquisition module is started, wherein the target program to be updated is based on the applet framework, namely, the target software of the image acquisition module is operated on the applet framework, in addition, the method and the device can send a version inquiry request of the target program to the server through the applet framework, namely, the applet framework can inquire whether new version software of the target software exists in the server when the applet framework is started each time, so that when the software of the target software in the image acquisition module is updated, software update data can not be sent by the server, but software update inquiry can be carried out to the server, so that software update data of the target software can be obtained, and software update can be carried out on the target software.
In addition, the embodiment of the application also provides computer equipment, and the computer equipment can be equipment such as a terminal. The terminal may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, a car computer, a face recognition device, etc. As shown in fig. 18, a schematic structural diagram of a computer device according to an embodiment of the present application is shown, specifically:
the computer device may include a memory 401 having one or more computer-readable storage media, an input unit 402, a processor 403 having one or more processing cores, and a power supply 404. Those skilled in the art will appreciate that the computer device structure shown in FIG. 18 is not limiting of the computer device and may include more or fewer components than shown in FIG. 18, or may be a combination of certain components, or a different arrangement of components. Wherein:
the memory 401 may be used to store software programs and modules, and the processor 403 executes various functional applications and data processing by executing the software programs and modules stored in the memory 401. The memory 401 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the computer device (such as audio data, phonebooks, etc.), and the like. In addition, memory 401 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 401 may further include a memory controller to provide access to the memory 401 by the processor 403 and the input unit 402.
The input unit 402 may be used to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, in one particular embodiment, the input unit 402 may include a touch-sensitive surface, as well as other input devices. The touch-sensitive surface, also referred to as a touch display screen or a touch pad, may collect touch operations thereon or thereabout by a user (e.g., operations thereon or thereabout by a user using any suitable object or accessory such as a finger, stylus, etc.), and actuate the corresponding connection means according to a predetermined program. Alternatively, the touch-sensitive surface may comprise two parts, a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 403, and can receive commands sent from the processor 403 and execute them. In addition, touch sensitive surfaces may be implemented in a variety of types, such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch-sensitive surface, the input unit 402 may also include other input devices. In particular, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc.
Processor 403 is the control center of the computer device, and uses various interfaces and lines to connect the various parts of the overall handset, by running or executing software programs and/or modules stored in memory 401, and invoking data stored in memory 401, performing various functions of the computer device and processing the data, thereby performing overall monitoring of the handset. Optionally, 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 primarily handles operating systems, user interfaces, application programs, etc., and the modem processor primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 403.
The computer device also includes a power supply 404 (e.g., a battery) for powering the various components, which may be logically connected to the processor 403 via a power management system so as to perform functions such as managing charge, discharge, and power consumption via the power management system. The power supply 404 may also include one or more of any of a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Although not shown, the computer device may further include a camera, a bluetooth module, etc., which will not be described herein. In particular, in this embodiment, the processor 403 in the computer device loads executable files corresponding to the processes of one or more application programs into the memory 401 according to the following instructions, and the processor 403 executes the application programs stored in the memory 401, so as to implement various functions, as follows:
when a starting instruction of the image acquisition module is detected, starting an applet framework integrated in the terminal; transmitting a version query request of a target program in the image acquisition module to a server through an applet framework, wherein the target program runs based on the applet framework; response data returned by the server based on the version inquiry request is obtained, wherein the response data comprises software update data of the target program; based on the software update data, the object program is updated by the applet framework.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
As can be seen from the foregoing, the computer device in this embodiment is capable of efficiently and flexibly updating the target program in the image acquisition module, specifically, the computer device can start the applet framework when the image acquisition module is started, where the target program to be updated is based on the applet framework, that is, the target software of the image acquisition module is run on the applet framework, and in this scheme, the computer device can send a version query request of the target program to the server through the applet framework, that is, the applet framework can query whether there is new version software of the target software to the server when each start is performed, so that when the software update of the target software in the image acquisition module is performed, the software update data of the target software is not sent depending on the server any more, but the software update data of the target software can be obtained through the software update query to the server, so that the software update is performed on the target software, which not only improves the flexibility of the software update, but also helps the applet framework to perform the update of the software because the version query request of the target program is sent to the server through the applet framework.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present application provide a storage medium having stored therein a plurality of instructions capable of being loaded by a processor to perform steps in any of the software updating methods provided by embodiments of the present application. For example, the instructions may perform the steps of:
when a starting instruction of the image acquisition module is detected, starting an applet framework integrated in the terminal; transmitting a version query request of a target program in the image acquisition module to a server through an applet framework, wherein the target program runs based on the applet framework; response data returned by the server based on the version inquiry request is obtained, wherein the response data comprises software update data of the target program; based on the software update data, the object program is updated by the applet framework.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Wherein the storage medium may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
The steps in any software updating method provided in the embodiments of the present application may be executed due to the instructions stored in the storage medium, so that the beneficial effects that any software updating method provided in the embodiments of the present application may be achieved, which are detailed in the previous embodiments and are not repeated herein.
According to one aspect of the present application, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The computer instructions are read from a computer-readable storage medium by a processor of a computer device, and executed by the processor, cause the computer device to perform the methods provided in various alternative implementations of the software update aspects described above.
The foregoing has outlined some of the more detailed description of the software updating method, apparatus, computer device, storage medium and product provided by the embodiments of the present application, wherein specific examples are provided herein to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to assist in understanding the method and core idea of the present application; meanwhile, those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present application, and the present description should not be construed as limiting the present application in view of the above.

Claims (13)

1. A software updating method, characterized in that it is applied to a terminal, said terminal comprising an image acquisition module, said method comprising:
when a starting instruction of the image acquisition module is detected, starting an applet framework integrated in the terminal;
transmitting a version inquiry request of a target program in the image acquisition module to a server through the applet framework, wherein the target program runs based on the applet framework;
response data returned by the server based on the version inquiry request is obtained;
and based on the response data, performing software update on the target program through the applet framework.
2. The software updating method according to claim 1, wherein obtaining response data returned by the server based on the version inquiry request includes:
acquiring query response data returned by a server in response to the version query request, wherein the query response data comprises target version information of the target program;
checking the current program version of the target program according to the target version information;
if the verification is passed, a version update request of the target program is sent to a server;
And acquiring update response data returned by the server in response to the version update request.
3. The software updating method according to claim 1, wherein the response data includes software updating data of the target program; based on the response data, performing software update on the target program through the applet framework, including:
storing the software update data;
when an updating instruction of the image acquisition module is detected, acquiring stored software updating data through the applet framework;
and carrying out software updating on the target program according to the software updating data.
4. The software updating method according to claim 1, wherein sending a version inquiry request of the target program in the image acquisition module to a server through the applet framework comprises:
determining a target program to be subjected to version inquiry in the image acquisition module;
acquiring a version inquiry request of the target program;
and sending the version inquiry request to a server through the applet framework.
5. The software updating method according to claim 1, wherein the terminal comprises a hardware adaptation layer for adapting a hardware interface of the image acquisition module, the method further comprising:
When detecting an updated target program call instruction aiming at the image acquisition module, calling the hardware adaptation layer through the applet framework;
and executing the operation corresponding to the calling instruction through the hardware adaptation layer based on the calling result.
6. The software updating method according to claim 5, wherein before said invoking the hardware adaptation layer by the applet framework, the method further comprises:
determining service demand information of the image acquisition module;
screening the hardware interface of the image acquisition module according to the service demand information;
and constructing a hardware adaptation layer of the terminal according to the screening result.
7. The software updating method according to claim 5, wherein the terminal further comprises a hardware layer including at least one sub-module of the image acquisition module;
executing, by the hardware adaptation layer, an operation corresponding to the call instruction, including:
invoking a target sub-module in the hardware layer through the hardware adaptation layer;
and executing the operation corresponding to the calling instruction based on the calling result.
8. The software updating method according to claim 1, wherein an applet framework has at least one basic functional module, the method further comprising, prior to said starting the applet framework integrated in the terminal:
Determining service demand information and calculation power index information of the image acquisition module;
screening the basic function module according to the service demand information and the power calculation index information;
and integrating an applet framework in the terminal according to the screening result.
9. The software updating method according to claim 1, wherein the terminal comprises a software layer, the software layer being integrated with an applet framework, the applet framework comprising at least one basic functional module, the method further comprising, before the sending of the version query request of the object program in the image acquisition module to the server:
developing a program function for the image acquisition module based on the base function module;
and constructing an object program of the image acquisition module according to the applet framework and the program function.
10. A software updating apparatus, comprising:
the starting unit is used for starting the applet framework integrated in the terminal when the starting instruction of the image acquisition module is detected;
the sending unit is used for sending a version inquiry request of the target program in the image acquisition module to the server through the small program framework, wherein the target program runs based on the small program framework;
The acquisition unit is used for acquiring response data returned by the server based on the version inquiry request;
and the updating unit is used for carrying out software updating on the processing program through the applet framework based on the response data.
11. A computer device comprising a memory and a processor; the memory stores an application program, and the processor is configured to execute the application program in the memory to perform the operations in the software updating method according to any one of claims 1 to 9.
12. A computer readable storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps in the software update of any one of claims 1 to 9.
13. A computer program product comprising computer programs/instructions which, when executed by a processor, implement the steps in the software updating method of any of claims 1 to 9.
CN202111499867.2A 2021-12-09 2021-12-09 Software updating method, device, computer equipment, storage medium and product Pending CN116257260A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111499867.2A CN116257260A (en) 2021-12-09 2021-12-09 Software updating method, device, computer equipment, storage medium and product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111499867.2A CN116257260A (en) 2021-12-09 2021-12-09 Software updating method, device, computer equipment, storage medium and product

Publications (1)

Publication Number Publication Date
CN116257260A true CN116257260A (en) 2023-06-13

Family

ID=86684857

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111499867.2A Pending CN116257260A (en) 2021-12-09 2021-12-09 Software updating method, device, computer equipment, storage medium and product

Country Status (1)

Country Link
CN (1) CN116257260A (en)

Similar Documents

Publication Publication Date Title
CN112970059B (en) Electronic device for processing user utterance and control method thereof
CN112162795B (en) Plug-in starting method and device, computer equipment and storage medium
US20200401384A1 (en) Electronic device and operation method thereof
CN108540509B (en) Processing method and device of terminal browser, server and intelligent terminal
US20230185554A1 (en) Application installation method and electronic device for supporting same
CN114341800A (en) Method and apparatus for improving runtime performance after application update in an electronic device
CN113592209A (en) Model training task management method, device, terminal and storage medium
CN110457049A (en) Realize method, apparatus, electronic equipment and the storage medium of plug-in unit automation
CN108874554B (en) Information communication method and device
CN114205365A (en) Application interface migration system and method and related equipment
CN111371851A (en) Connection method, connection device, electronic equipment and storage medium
CN113408260A (en) Project engineering generation method and device, computer equipment and storage medium
JP7257554B2 (en) Model file distribution method, platform, system, terminal and readable storage medium
CN112650540B (en) Method for starting fast application and related device
US11264031B2 (en) Method for processing plans having multiple end points and electronic device applying the same method
CN111124627B (en) Method and device for determining call initiator of application program, terminal and storage medium
CN116257260A (en) Software updating method, device, computer equipment, storage medium and product
CN114610446B (en) Method, device and system for automatically injecting probe
KR102506155B1 (en) Electronic device, application executing system and control methods thereof
CN116028099A (en) Method for generating installation package, related device, equipment and storage medium
CN114880003A (en) System upgrading method of intelligent terminal, intelligent terminal and storage medium
KR20190098516A (en) Method for managing data related to application and electronic device thereof
CN111552537B (en) Theme switching method and device, computer equipment and storage medium
CN114489698A (en) Application program installation method and device
EP3819763B1 (en) Electronic device and operating method thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40088246

Country of ref document: HK