CN114938365A - Method and device for updating functional module, storage medium and electronic device - Google Patents

Method and device for updating functional module, storage medium and electronic device Download PDF

Info

Publication number
CN114938365A
CN114938365A CN202210269929.9A CN202210269929A CN114938365A CN 114938365 A CN114938365 A CN 114938365A CN 202210269929 A CN202210269929 A CN 202210269929A CN 114938365 A CN114938365 A CN 114938365A
Authority
CN
China
Prior art keywords
target
update
updating
information
server
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.)
Granted
Application number
CN202210269929.9A
Other languages
Chinese (zh)
Other versions
CN114938365B (en
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.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home 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 Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202210269929.9A priority Critical patent/CN114938365B/en
Priority claimed from CN202210269929.9A external-priority patent/CN114938365B/en
Publication of CN114938365A publication Critical patent/CN114938365A/en
Application granted granted Critical
Publication of CN114938365B publication Critical patent/CN114938365B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2823Reporting information sensed by appliance or service execution status of appliance services in a home automation network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/22Processing or transfer of terminal data, e.g. status or physical capabilities
    • H04W8/24Transfer of terminal data
    • H04W8/245Transfer of terminal data from a network towards a terminal

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Automation & Control Theory (AREA)
  • Databases & Information Systems (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a method and a device for updating a functional module, a storage medium and an electronic device, which relate to the technical field of smart home/smart home, and the method for updating the functional module comprises the following steps: receiving update information sent by a server, wherein the update information is used for indicating that a target function module to be updated exists in a plurality of function modules deployed on intelligent equipment; responding to the update information, and sending a target acquisition request to the server, wherein the target acquisition request is used for requesting to acquire update data corresponding to the target function module; receiving target updating data returned by the server in response to the target acquisition request; and updating the target function module according to the target updating data. The problem of among the correlation technique, the update efficiency of functional module is lower etc. is solved, the technological effect of the update efficiency of improving functional module has been realized.

Description

Method and device for updating functional module, storage medium and electronic device
Technical Field
The application relates to the technical field of smart home, in particular to a method and a device for updating a functional module, a storage medium and an electronic device.
Background
With the development of science and technology and the improvement of living standard, intelligent equipment is gradually popularized in production and living of people, the intelligent equipment is used as electronic equipment with computing capacity, a program is arranged on the intelligent equipment and is divided into a plurality of functional modules, and each functional module can complete a corresponding function, so that various services are provided for people in work and life, and a great deal of convenience is brought. However, as the demand of people increases, the functional requirements of the smart device also increase, so in order to meet the increasing functional requirements of users, the functional modules on the smart device need to be updated. The current technology is through the mode of online update, update function module memorability, when the service provider needs to optimize the function module of the equipment of oneself promptly, can send the renewal data to the whole intelligent equipment that needs the renewal of production of oneself at a certain time, thereby control intelligent equipment and update self function module, this just leads to when intelligent equipment receives the renewal data, the function module that needs the renewal probably is in the state of being occupied, or intelligent equipment is in the full load running state of procedure this moment, intelligent equipment can be updated automatically and is in the function module of occupation state this moment, thereby lead to intelligent equipment's operation disorder, and the wrong problem of function module renewal.
Aiming at the problems of low updating efficiency of the functional modules and the like in the related technology, no effective solution is provided.
Disclosure of Invention
The embodiment of the application provides a method and a device for updating a functional module, a storage medium and an electronic device, so as to at least solve the problems that the updating efficiency of the functional module is low and the like in the related art.
According to an embodiment of the present application, there is provided a method for updating a functional module, including: receiving update information sent by a server, wherein the update information is used for indicating that a target function module to be updated exists in a plurality of function modules deployed on intelligent equipment; responding to the update information, and sending a target acquisition request to the server, wherein the target acquisition request is used for requesting to acquire the update data corresponding to the target function module; receiving target updating data returned by the server in response to the target acquisition request; and updating the target function module according to the target updating data.
According to another embodiment of the present application, there is provided another method for updating a functional module, including: sending update information to intelligent equipment, wherein the update information is used for indicating that target function modules to be updated exist in a plurality of function modules deployed on the intelligent equipment; receiving a target acquisition request returned by the intelligent equipment in response to the update information, wherein the target acquisition request is used for requesting to acquire the update data corresponding to the target function module; and responding to the target acquisition request, and sending target updating data to the intelligent equipment, wherein the target updating data is used for indicating the intelligent equipment to update the target function module.
Optionally, the sending the update information to the smart device includes: receiving current versions of a plurality of functional modules reported by the intelligent equipment; sending an update push to the smart device, wherein the update push is used for instructing the smart device to update the current versions of the plurality of functional modules; receiving a downloading request returned by the intelligent equipment responding to the updating push; and responding to the downloading request, and sending the updating information to the intelligent equipment.
According to another embodiment of the present application, there is also provided an updating apparatus for a functional module, including: the system comprises a first receiving module, a first updating module and a second receiving module, wherein the first receiving module is used for receiving updating information sent by a server, and the updating information is used for indicating that a target function module to be updated exists in a plurality of function modules deployed on intelligent equipment; a first sending module, configured to send a target obtaining request to the server in response to the update information, where the target obtaining request is used to request to obtain update data corresponding to the target function module; a second receiving module, configured to receive target update data returned by the server in response to the target acquisition request; and the updating module is used for updating the target function module according to the target updating data.
According to another embodiment of the present application, there is also provided an updating apparatus for a functional module, including: the second sending module is used for sending update information to the intelligent equipment, wherein the update information is used for indicating that target function modules to be updated exist in a plurality of function modules deployed on the intelligent equipment; a third receiving module, configured to receive a target acquisition request returned by the intelligent device in response to the update information, where the target acquisition request is used to request to acquire update data corresponding to the target function module; and a third sending module, configured to send, in response to the target obtaining request, target update data to the intelligent device, where the target update data is used to instruct the intelligent device to update the target function module.
According to another aspect of the embodiments of the present application, there is also provided a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the method for updating the functional module when running.
According to another aspect of the embodiments of the present application, there is also provided an electronic apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the method for updating the functional module through the computer program.
In the embodiment of the application, update information sent by a server is received, wherein the update information is used for indicating that a target function module to be updated exists in a plurality of function modules deployed on intelligent equipment; responding to the update information, and sending a target acquisition request to the server, wherein the target acquisition request is used for requesting to acquire update data corresponding to the target function module; receiving target updating data returned by the server in response to the target acquisition request; the target function module is updated according to the target update data, namely when the target function module to be updated exists on the intelligent equipment, the server sends update information for indicating the target function module to be updated on the intelligent equipment to the intelligent equipment, the intelligent equipment sends a target acquisition request to the server according to the update information after receiving the update information, the target update data corresponding to the target function module is requested to be acquired, the server returns the corresponding target update data to the intelligent equipment according to the received target acquisition request, therefore, the target update data sent to the intelligent equipment by the server is sent after the target acquisition request sent by the intelligent equipment is received, the target update data are not directly sent to the intelligent equipment by the server when the function module to be updated on the intelligent equipment is determined, and the problem that the target function module to be updated is updated due to the operating state of the intelligent equipment after the target update data are received by the intelligent equipment is avoided A phenomenon of error. By adopting the technical scheme, the problems of low updating efficiency of the functional module and the like in the related technology are solved, and the technical effect of improving the updating efficiency of the functional module is realized.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
Fig. 1 is a hardware environment diagram of a method for updating a functional module according to an embodiment of the present application;
FIG. 2 is a flow chart of a method for updating a functional module according to an embodiment of the present application;
FIG. 3 is an alternative information interaction diagram according to an embodiment of the application;
FIG. 4 is a flow chart of an alternative functional module upgrade according to an embodiment of the present application;
FIG. 5 is a diagram illustrating another method for updating a function module according to an embodiment of the present application;
fig. 6 is a block diagram of a functional module updating apparatus according to an embodiment of the present application;
fig. 7 is a block diagram of another functional module updating apparatus according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the accompanying drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Moreover, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of an embodiment of the present application, a method for updating a functional module is provided. The updating method of the functional module is widely applied to full-House intelligent digital control application scenes such as intelligent homes (Smart Home), intelligent homes, intelligent Home equipment ecology, intelligent residence (Intelligent House) ecology and the like. Fig. 1 is a schematic diagram of a hardware environment of an updating method of a functional module according to an embodiment of the present application, and optionally, in this embodiment, the updating method of the functional module may be applied to a hardware environment formed by a terminal device 102 and a server 104 as shown in fig. 1. As shown in fig. 1, the server 104 is connected to the terminal device 102 through a network, and may be configured to provide a service (e.g., an application service) for the terminal or a client installed on the terminal, set a database on the server or independent of the server, and provide a data storage service for the server 104, and configure a cloud computing and/or edge computing service on the server or independent of the server, and provide a data operation service for the server 104.
The network may include, but is not limited to, at least one of: wired networks, wireless networks. The wired network may include, but is not limited to, at least one of: wide area networks, metropolitan area networks, local area networks, which may include, but are not limited to, at least one of the following: WIFI (Wireless Fidelity), bluetooth. Terminal equipment 102 can be but not limited to be PC, the cell-phone, the panel computer, intelligent air conditioner, intelligent cigarette machine, intelligent refrigerator, intelligent oven, intelligent kitchen range, intelligent washing machine, intelligent water heater, intelligent washing equipment, intelligent dish washer, intelligent projection equipment, intelligent TV, intelligent clothes hanger, intelligent (window) curtain, intelligence audio-visual, smart jack, intelligent stereo set, intelligent audio amplifier, intelligent new trend equipment, intelligent kitchen guarding equipment, intelligent bathroom equipment, intelligence robot of sweeping the floor, intelligence robot of wiping the window, intelligence robot of mopping the ground, intelligent air purification equipment, intelligent steam ager, intelligent microwave oven, intelligent kitchen is precious, intelligent clarifier, intelligent water dispenser, intelligent lock etc..
In this embodiment, a method for updating a function module is provided, and is applied to the computer terminal, and fig. 2 is a flowchart of a method for updating a function module according to an embodiment of the present application, where the flowchart includes the following steps:
step S202, receiving update information sent by a server, wherein the update information is used for indicating that a target function module to be updated exists in a plurality of function modules deployed on intelligent equipment;
step S204, responding to the update information, and sending a target acquisition request to the server, wherein the target acquisition request is used for requesting to acquire the update data corresponding to the target function module;
step S206, receiving target update data returned by the server responding to the target acquisition request;
and step S208, updating the target function module according to the target updating data.
Through the steps, when the target function module to be updated exists on the intelligent equipment, the server sends the updating information for indicating the target function module to be updated on the intelligent equipment to the intelligent equipment, the intelligent equipment sends a target acquisition request to the server according to the updating information after receiving the updating information to request to acquire target updating data corresponding to the target function module, the server returns the corresponding target updating data to the intelligent equipment according to the received target acquisition request, thereby realizing that the target updating data sent by the server to the intelligent device is sent after receiving the target acquisition request sent by the intelligent device, instead of directly sending the target data to the intelligent equipment when determining the functional module to be updated on the intelligent equipment, the phenomenon that the target functional module is updated wrongly due to the running state of the intelligent equipment after the intelligent equipment receives the target update data is avoided. By adopting the technical scheme, the problems of low updating efficiency of the functional module and the like in the related technology are solved, and the technical effect of improving the updating efficiency of the functional module is realized.
In the technical solution provided in step S202, the update information may be, but is not limited to, module information carrying a target function module, update data information of target update data for updating the target function module, and the like, for example, the module information may be, but is not limited to, a module name, a module identifier, and the like of the target function module, and the update data information may be, but is not limited to, a name, an identifier, a storage location, a download path, and the like of the target update data.
Optionally, in this embodiment, the function module is used to indicate a program element for implementing the function of the smart device, and may include, but is not limited to, a data description, an executable statement, and the like.
In the technical solution provided in step S204, the update data is data used for updating the function module as a whole or updating a local content, for example, taking the function module as a voice module corresponding to a voice module on the intelligent appliance, a version of the voice module needs to be updated, the update data may be parameter information that needs to be updated in the voice module, and the parameter information is used to update a corresponding parameter in the voice module, so as to obtain an updated voice module, or the update data may also be a file including the updated voice module, and the file corresponding to the voice module to be updated is updated by using the file, so as to update the voice module of the intelligent device to a required version.
Optionally, in this embodiment, the target acquisition request carries information that may be used to indicate the target update data, for example, the target acquisition request may carry a storage location of the target update data, so as to download the target update data stored in the storage location, and may also carry a data name of the target update data, and determine the requested target update data according to the name, or may also carry target function module information to be updated, and determine the target update data corresponding to the module information according to the module information, where the content carried in the target acquisition request is not limited in this scheme.
Optionally, in this embodiment, the target obtaining request may be sent after the intelligent device receives the update information, or may also be sent according to an operating state of the intelligent device, for example, when the current memory occupancy rate of the intelligent device is high, the target obtaining request is suspended to be sent, and when the intelligent device is in an idle state or a target function module to be updated is not occupied, the target sending request is sent to the server again.
In the technical solution provided in step S206, when the number of the target function modules is multiple, the server may return one target update data at a time, where each target update data is used to update one target function module, or according to the size of the storage space of the intelligent device for storing the target update data, the server returns the target update data matched with the storage space to the intelligent device every time, and this is not limited in this solution.
In the technical solution provided in step S208, when the target function module is updated by using the target update data, the intelligent device detects whether the version of the function module to be updated, which is applicable to the target update data, is consistent with the version of the target function module, and updates the target function module again when the versions are consistent, so as to avoid the problem of erroneous update of the function module.
Optionally, in this embodiment, the updating of the target function module may be, but is not limited to, upgrading the program version of the function module, degrading the program version of the function module, replacing the content of the function module, and the like, for example, to update the voice recognition module, the updating may be to upgrade the voice module of the 2.0 version to the 3.0 version, or downgrade the voice module of the 2.0 version to the 1.0 version, or upgrade the voice recognition module of the 2.0 version to a text recognition module of the 2.0 version, which is not limited in this embodiment.
The update method of the update module may be, but is not limited to, applied between an intelligent device and a server providing a scheduling service for the intelligent device, update data used for updating a function module of the intelligent device is stored in the server, and the intelligent device and the server perform information interaction operation to update the function module to be updated on the intelligent device by using the update data stored in the server, where fig. 3 is an optional information interaction diagram according to an embodiment of the present application, as shown in fig. 3, and may be, but is not limited to, including the following steps:
step S301, a plurality of functional modules are deployed on the intelligent equipment, each functional module is used for realizing different functions of the intelligent equipment, and the intelligent equipment detects the current version of the functional module deployed by the intelligent equipment and reports the current version to a server;
step S302, a plurality of reference updating data packets are stored in a server, each reference updating data packet comprises one or more updating data for updating the function module, the server matches the received current version with the reference updating data packet, so that the updating data packet matched with the current version is determined in the reference updating data packets, updating information is generated according to the updating data in the updating data packets, and the updating information is used for indicating a target function module to be updated in the function modules deployed on the intelligent equipment and sending the updating information to the intelligent equipment;
step S303, after receiving the update information, the intelligent device analyzes the update information to obtain data information of the target update data carried in the update information, wherein the data information may include, but is not limited to, a storage location of the target update data, an update data name, and the like, so as to generate a target acquisition request carrying the storage location information and/or the update data name according to the data information, and send the target acquisition request to the server;
step S304, after receiving the target acquisition request, the server determines corresponding target update data according to storage position information and/or update data name carried in the target acquisition request, and returns the target update data to the intelligent device;
in step S305, after receiving the target update data, the smart device updates the target function module on the smart device using the target update data.
Through the steps, the intelligent device actively initiates a request for obtaining the target update data to the server instead of passively receiving the target update data sent by the server when the functional module to be updated exists, so that the problem of update errors of the intelligent device caused by self reasons when the intelligent device receives the update data is solved.
As an optional embodiment, the sending a target obtaining request to the server includes:
generating a plurality of acquisition requests corresponding to the target function modules one to one when the number of the target function modules indicated by the update information is multiple, wherein the target acquisition requests include the plurality of acquisition requests;
and sequentially sending the plurality of acquisition requests to the server.
Optionally, in this embodiment, sending the multiple acquisition requests to the server may be sending according to a preset sending sequence, for example, multiple function modules on the intelligent device are set with priorities, and are sent sequentially according to the priorities among the target function modules when sending, and sending the multiple acquisition requests to the server may be sent according to a preset sending time, that is, the multiple acquisition requests are sent sequentially according to the target priorities of the target function modules, and each acquisition request is sent according to a preset sending time, for example, a target function module corresponding to a previous acquisition request is updated to a certain extent or a next acquisition request is sent after the previous acquisition request is updated.
Optionally, in this embodiment, sending a plurality of acquisition requests to the server at a time may be, but is not limited to, sending according to a device state of the smart device, sending one acquisition request to the server when the device state is used to indicate that one target function module can be updated, and sending a plurality of acquisition requests to the server simultaneously when the device state is used to indicate that the smart device can update a plurality of target function modules, which is not limited in this scheme.
As an optional embodiment, the sequentially sending the multiple obtaining requests to the server includes:
acquiring an updating sequence carried in the updating information;
and sending the plurality of acquisition requests one by one according to the updating sequence, wherein each acquisition request except the first acquisition request in the plurality of acquisition requests is sent after the target function module corresponding to the previous acquisition request of each acquisition request is updated.
Optionally, in this embodiment, the update sequence may be, but is not limited to, determined according to an operation frequency of the corresponding function module, a file size of the function module, a priority of the function module, and the like, which is not limited in this scheme.
Optionally, in this embodiment, the update information may, but is not limited to, carry an update sequence, update data information (for example, a name and a storage location of the update data, version information of a function module used by the update data, and the like), and this is not limited in this scheme.
As an optional embodiment, the generating a plurality of obtaining requests corresponding to a plurality of target function modules in a one-to-one manner includes:
acquiring target downloading information of each target function module in the plurality of target function modules from the updating information, wherein the target downloading information is used for indicating the storage position of the updating data of each target function module in an updating data packet of the plurality of target function modules, and the target function modules and the downloading information which have corresponding relations are recorded in the updating information;
and generating an acquisition request carrying the target downloading information corresponding to each target function module to obtain the plurality of acquisition requests.
Optionally, in this embodiment, the update package is a file package for storing target update data, for example, when there are a plurality of target update data, corresponding target update data may be sequentially stored in the update package according to an update sequence of the target function module, and a start position and an end position of each target update data stored in the update package are target download information for downloading the target update data.
As an optional embodiment, the updating the target function module according to the target update data includes:
matching an initial version carried in the target updating data with a current version of the target function module on the intelligent device, wherein the target updating data is used for updating the target function module from the initial version to a target version;
and under the condition that the initial version is matched with the current version consistently, updating the target function module by using an update file carried in the target update data.
Optionally, in this embodiment, the update file may be part or all of the program code of the updated target function module, and the update file is used to replace the corresponding content in the target function module, so as to update the target function module, and the update file may also be a program modification instruction for modifying a parameter of the target function module, and the update file is used to modify the corresponding parameter of the target function module, so as to update the target function module.
As an optional embodiment, the receiving the update information sent by the server includes:
reporting the current versions of the plurality of functional modules to the server;
receiving an update push sent by the server, wherein the update push is used for indicating to update the current versions of the plurality of functional modules;
responding to the update push, and sending a downloading request to the server;
and receiving the updating information returned by the server in response to the downloading request.
Optionally, in this embodiment, reporting the current version of the functional module to the server may be real-time reporting, or may also be fixed-time reporting.
Optionally, in this embodiment, the update push may be a push message carrying information of a function module to be updated, or may also be a push message used for indicating that a function module existing on the smart device needs to be updated.
The above-mentioned method for updating a functional module is applied to an intelligent device with a plurality of functional modules deployed, and the intelligent device actively obtains target update data for updating a target functional module from a server when the target functional module to be updated exists on the intelligent device through interaction with the server for managing the intelligent device, where fig. 4 is an optional functional module update flowchart according to an embodiment of the present application, and as shown in fig. 4, may include, but is not limited to, the following:
step S401, deploying a plurality of functional modules on intelligent equipment, and reporting the current versions of the deployed functional modules to a server by the intelligent equipment;
step S402, after receiving the current version of the intelligent device, the server can determine whether a target function module needing to be updated exists on the intelligent device currently, and generates an update push and sends the update push to the intelligent device under the condition that the target function module exists on the intelligent device, so that the intelligent device receives the update push generated by the server responding to the current version;
step S403, in the server, updating data for updating the functional module to be updated is packed into an updating data packet, header information is added to the head of the data packet, the number of target functional modules to be updated, the current version of the intelligent device, and the initial position and length of each updating data in the updating data packet are added to the header information, and after the intelligent device receives the updating push, the corresponding header information of the updating push is downloaded and updated;
step S404, after receiving the packet header information, the intelligent device rechecks the packet header information so as to determine whether the intelligent device has a target function module, if so, executing step S405, and if not, executing step S408;
step S405, after determining that the intelligent device has the target function module, generating a target acquisition request according to the number of the target function modules to be upgraded and the initial position and length of the target update data in the target update data packet, wherein the number is included in the packet header information, and the target acquisition request is used for requesting the server for the target update data, so that the target update data is downloaded to the intelligent device;
step S406, updating the target function module by using the downloaded target updating data;
step S407, detecting whether the target function module is updated successfully, executing step S408 when the update is successful, and executing step S404 when the update is failed;
step S408, reporting the update result of the target function module to a server.
In this embodiment, a method for updating a functional module is provided, and fig. 5 is a schematic diagram of another method for updating a functional module according to an embodiment of the present application, as shown in fig. 5, the method mainly includes the following steps:
step S501: sending update information to intelligent equipment, wherein the update information is used for indicating that target function modules to be updated exist in a plurality of function modules deployed on the intelligent equipment;
step S502: receiving a target acquisition request returned by the intelligent equipment in response to the update information, wherein the target acquisition request is used for requesting to acquire the update data corresponding to the target function module;
step S503: and responding to the target acquisition request, and sending target updating data to the intelligent equipment, wherein the target updating data is used for indicating the intelligent equipment to update the target function module.
Through the steps, when the target function module to be updated exists on the intelligent equipment, the server sends the updating information for indicating the target function module to be updated on the intelligent equipment to the intelligent equipment, the intelligent equipment sends a target acquisition request to the server according to the updating information after receiving the updating information to request to acquire target updating data corresponding to the target function module, the server returns the corresponding target updating data to the intelligent equipment according to the received target acquisition request, thereby realizing that the target updating data sent by the server to the intelligent device is sent after receiving the target acquisition request sent by the intelligent device, instead of directly sending the target data to the intelligent equipment when the functional module to be updated on the intelligent equipment is determined, the phenomenon that the target functional module is updated mistakenly due to the running state of the intelligent equipment after the intelligent equipment receives the target update data is avoided. By adopting the technical scheme, the problems of low updating efficiency of the functional module and the like in the related technology are solved, and the technical effect of improving the updating efficiency of the functional module is realized.
In the technical solution provided in step S502 above, the updating of the function module may include, but is not limited to, upgrading the version of the function module, downgrading the version of the function module, replacing the function module with a function module of another function, and the like, and this is not limited in this solution.
In the technical solution provided in step S504 above, when the number of target function modules to be updated on the smart device is multiple, the number of received target acquisition requests may be one or multiple, for example, when the number of received target acquisition requests is one, the target acquisition requests are used to request target update data for updating all target function modules, and when the number of target acquisition requests is multiple, each target acquisition request is used to request partial target update data for updating partial target function modules.
In the technical solution provided in step S504 above, the sending of the target update data to the smart device may be, but is not limited to, sending according to the state information of the smart device, for example, when there are a plurality of target function modules on the smart device, the server may send the target update data to the smart device according to the size of the storage space of the smart device or the operating load of the smart device.
As an optional embodiment, the sending the update information to the smart device includes:
receiving current versions of a plurality of functional modules reported by the intelligent equipment;
sending an update push to the smart device, wherein the update push is used for instructing the smart device to update the current versions of the plurality of functional modules;
receiving a downloading request returned by the intelligent equipment responding to the updating push;
and responding to the downloading request, and sending the updating information to the intelligent equipment.
Optionally, in this embodiment, the update push sent to the intelligent device may be generated according to a matching result of the received current versions of the plurality of function modules and the update data packet, where the update data packet stores update data for updating the function module to be updated, and for example, when the received current versions of the plurality of function modules are matched with the update data packet to determine that one or more target function modules to be updated exist in the plurality of function modules, update information carrying information indicating the update data is generated according to the update data packet.
As an optional embodiment, before the sending the update push to the smart device, the method further comprises:
acquiring an update data packet matched with the current version from a reference update data packet, wherein the reference update data packet is used for storing update data used for updating the functional module to be updated;
and generating the update push under the condition of acquiring the update data packet.
Optionally, in this embodiment, the update data is used to update the corresponding function module from the initial version to the target version, and when the initial version and the current version corresponding to the update data are consistent, it is determined that the update data matches the current version.
As an alternative embodiment, before the obtaining of the update package matching the current version from the reference update package, the method further includes:
acquiring the updating data corresponding to the functional module to be updated;
packing the update data into the reference update data packet;
generating header information for the reference update data packet, wherein the header information includes: the number of the functional modules to be updated and the storage location of the update data of each functional module to be updated in the reference update data packet, where the update information includes the packet header information.
Optionally, in this embodiment, the packaging of the update data into the reference update data package may be, but is not limited to, packaging the update data according to the update sequence of the functional modules, thereby ensuring accurate acquisition of the update data.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present application or portions thereof that contribute to the prior art may be embodied in the form of a software product, where the computer software product is stored in a storage medium (such as a ROM/RAM, a magnetic disk, and an optical disk), and includes several instructions for enabling a terminal device (which may be a mobile phone, a computer, a server, or a network device) to execute the method of the embodiments of the present application.
Fig. 6 is a block diagram of a structure of an updating apparatus for a functional module according to an embodiment of the present application, as shown in fig. 6, including: the first receiving module 62 is configured to receive update information sent by a server, where the update information is used to indicate that a target function module to be updated exists in a plurality of function modules deployed on an intelligent device; a first sending module 64, configured to send a target obtaining request to the server in response to the update information, where the target obtaining request is used to request to obtain update data corresponding to the target function module; a second receiving module 66, configured to receive target update data returned by the server in response to the target obtaining request; an updating module 68, configured to update the target function module according to the target updating data.
With the above-described embodiment, when a target function module to be updated exists on the smart device, the server transmits update information indicating the target function module to be updated on the smart device to the smart device, upon receiving the update information, transmits a target acquisition request to the server according to the update information, requesting acquisition of target update data corresponding to the target function module, the server returns the corresponding target update data to the smart device according to the received target acquisition request, thereby realizing that the target update data sent by the server to the intelligent device is sent after receiving the target acquisition request sent by the intelligent device, instead of directly sending the target data to the intelligent equipment when determining the functional module to be updated on the intelligent equipment, the phenomenon that the target functional module is updated wrongly due to the running state of the intelligent equipment after the intelligent equipment receives the target update data is avoided. By adopting the technical scheme, the problems of low updating efficiency of the functional module and the like in the related technology are solved, and the technical effect of improving the updating efficiency of the functional module is realized.
Optionally, the first sending module includes: a generating unit, configured to generate, when the number of the target function modules indicated by the update information is multiple, multiple acquisition requests in one-to-one correspondence with the multiple target function modules, where the target acquisition requests include the multiple acquisition requests; a first sending unit, configured to send the multiple acquisition requests to the server in sequence.
Optionally, the first sending unit is configured to: acquiring an updating sequence carried in the updating information; and sending the plurality of acquisition requests one by one according to the updating sequence, wherein each acquisition request except the first acquisition request in the plurality of acquisition requests is sent after the target function module corresponding to the previous acquisition request of each acquisition request is updated.
Optionally, the generating unit is configured to: acquiring target downloading information of each target function module in the plurality of target function modules from the updating information, wherein the target downloading information is used for indicating the storage position of the updating data of each target function module in an updating data packet of the plurality of target function modules, and the target function modules and the downloading information which have corresponding relations are recorded in the updating information; and generating an acquisition request carrying the target downloading information corresponding to each target function module to obtain the plurality of acquisition requests.
Optionally, the update module includes: a matching unit, configured to match an initial version carried in the target update data with a current version of the target function module on the smart device, where the target update data is used to update the target function module from the initial version to a target version; and the updating unit is used for updating the target function module by using an updating file carried in the target updating data under the condition that the initial version is matched with the current version.
Optionally, the first receiving module includes: a reporting unit, configured to report the current versions of the plurality of functional modules to the server; a first receiving unit, configured to receive an update push sent by the server, where the update push is used to instruct to update current versions of the plurality of function modules; the second sending unit is used for responding to the update push and sending a downloading request to the server; and the second receiving unit is used for receiving the updating information returned by the server in response to the downloading request.
Fig. 7 is a block diagram of another functional module updating apparatus according to an embodiment of the present application, and as shown in fig. 7, the apparatus includes: a second sending module 72, configured to send update information to the smart device, where the update information is used to indicate that a target function module to be updated exists in the plurality of function modules deployed on the smart device; a third receiving module 74, configured to receive a target obtaining request returned by the smart device in response to the update information, where the target obtaining request is used to request to obtain update data corresponding to the target function module; a third sending module 76, configured to send, in response to the target obtaining request, target update data to the intelligent device, where the target update data is used to instruct the intelligent device to update the target function module.
With the above-described embodiment, when a target function module to be updated exists on the smart device, the server transmits update information indicating the target function module to be updated on the smart device to the smart device, upon receiving the update information, transmits a target acquisition request to the server according to the update information, requesting acquisition of target update data corresponding to the target function module, the server returns the corresponding target update data to the smart device according to the received target acquisition request, thereby realizing that the target updating data sent by the server to the intelligent device is sent after receiving the target acquisition request sent by the intelligent device, instead of directly sending the target data to the intelligent equipment when the functional module to be updated on the intelligent equipment is determined, the phenomenon that the target functional module is updated mistakenly due to the running state of the intelligent equipment after the intelligent equipment receives the target update data is avoided. By adopting the technical scheme, the problems that the updating efficiency of the functional module is low and the like in the related technology are solved, and the technical effect of improving the updating efficiency of the functional module is realized.
Optionally, the second sending module includes: a third receiving unit, configured to receive current versions of the multiple functional modules reported by the intelligent device; a third sending unit, configured to send an update push to the smart device, where the update push is used to instruct the smart device to update the current versions of the plurality of function modules; a fourth receiving unit, configured to receive a download request returned by the smart device in response to the update push; and the fourth sending unit is used for responding to the downloading request and sending the updating information to the intelligent equipment.
Optionally, the apparatus further comprises: a first obtaining module, configured to obtain, before the update push is sent to the intelligent device, an update data packet matching the current version from a reference update data packet, where the reference update data packet is used to store update data used for updating a functional module to be updated; and the first generation module is used for generating the update push under the condition of acquiring the update data packet.
Optionally, the apparatus further comprises: a second obtaining module, configured to obtain the update data corresponding to the function module to be updated before obtaining the update data packet matching the current version from the reference update data packet; a packing module for packing the update data into the reference update data packet; a second generating module, configured to generate packet header information for the reference update data packet, where the packet header information includes: the number of the functional modules to be updated and the storage position of the update data of each functional module to be updated in the reference update data packet, where the update information includes the packet header information.
Embodiments of the present application also provide a storage medium including a stored program, where the program performs any one of the methods described above when executed.
Alternatively, in this embodiment, the storage medium may be configured to store program codes for performing the following steps: receiving update information sent by a server, wherein the update information is used for indicating that a target function module to be updated exists in a plurality of function modules deployed on intelligent equipment; responding to the update information, and sending a target acquisition request to the server, wherein the target acquisition request is used for requesting to acquire update data corresponding to the target function module; receiving target updating data returned by the server in response to the target acquisition request; and updating the target function module according to the target updating data.
Optionally, in this embodiment, the storage medium may be configured to store program codes further configured to perform the following steps: sending update information to intelligent equipment, wherein the update information is used for indicating that target function modules to be updated exist in a plurality of function modules deployed on the intelligent equipment; receiving a target acquisition request returned by the intelligent equipment in response to the update information, wherein the target acquisition request is used for requesting to acquire update data corresponding to the target function module; and responding to the target acquisition request, and sending target updating data to the intelligent equipment, wherein the target updating data is used for indicating the intelligent equipment to update the target function module.
Embodiments of the present application further provide an electronic device comprising a memory having a computer program stored therein and a processor configured to execute the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program: receiving update information sent by a server, wherein the update information is used for indicating that a target function module to be updated exists in a plurality of function modules deployed on intelligent equipment; responding to the update information, and sending a target acquisition request to the server, wherein the target acquisition request is used for requesting to acquire update data corresponding to the target function module; receiving target updating data returned by the server in response to the target acquisition request; and updating the target function module according to the target updating data.
Optionally, in this embodiment, the processor may be further configured to execute, by the computer program, the following steps: sending update information to intelligent equipment, wherein the update information is used for indicating that target function modules to be updated exist in a plurality of function modules deployed on the intelligent equipment; receiving a target acquisition request returned by the intelligent equipment in response to the update information, wherein the target acquisition request is used for requesting to acquire update data corresponding to the target function module; and responding to the target acquisition request, and sending target updating data to the intelligent equipment, wherein the target updating data is used for indicating the intelligent equipment to update the target function module.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing program codes, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present application described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (11)

1. A method for updating a functional module, comprising:
receiving update information sent by a server, wherein the update information is used for indicating that a target function module to be updated exists in a plurality of function modules deployed on intelligent equipment;
responding to the update information, and sending a target acquisition request to the server, wherein the target acquisition request is used for requesting to acquire update data corresponding to the target function module;
receiving target updating data returned by the server in response to the target acquisition request;
and updating the target function module according to the target updating data.
2. The method of claim 1, wherein sending a target acquisition request to the server comprises:
generating a plurality of acquisition requests corresponding to the target function modules one to one when the number of the target function modules indicated by the update information is multiple, wherein the target acquisition requests include the plurality of acquisition requests;
and sequentially sending the plurality of acquisition requests to the server.
3. The method of claim 2, wherein said sending the plurality of acquisition requests to the server in sequence comprises:
acquiring an updating sequence carried in the updating information;
and sending the plurality of acquisition requests one by one according to the updating sequence, wherein each acquisition request except the first acquisition request in the plurality of acquisition requests is sent after the target function module corresponding to the previous acquisition request of each acquisition request is updated.
4. The method according to claim 2 or 3, wherein the generating a plurality of obtaining requests corresponding to a plurality of target function modules in a one-to-one manner comprises:
acquiring target downloading information of each target function module in the plurality of target function modules from the updating information, wherein the target downloading information is used for indicating the storage position of the updating data of each target function module in an updating data packet of the plurality of target function modules, and the target function modules and the downloading information which have corresponding relations are recorded in the updating information;
and generating an acquisition request carrying the target downloading information corresponding to each target function module to obtain the plurality of acquisition requests.
5. The method according to any of claims 1-4, wherein said updating said target function module according to said target update data comprises:
matching an initial version carried in the target updating data with a current version of the target function module on the intelligent device, wherein the target updating data is used for updating the target function module from the initial version to a target version;
and under the condition that the initial version is matched with the current version consistently, updating the target function module by using an update file carried in the target update data.
6. The method according to any one of claims 1-4, wherein the receiving the update information sent by the server comprises:
reporting the current versions of the plurality of functional modules to the server;
receiving an update push sent by the server, wherein the update push is used for indicating to update the current versions of the plurality of functional modules;
responding to the update push, and sending a downloading request to the server;
and receiving the updating information returned by the server in response to the downloading request.
7. A method for updating a function module, comprising:
sending update information to intelligent equipment, wherein the update information is used for indicating that target function modules to be updated exist in a plurality of function modules deployed on the intelligent equipment;
receiving a target acquisition request returned by the intelligent equipment in response to the update information, wherein the target acquisition request is used for requesting to acquire update data corresponding to the target function module;
and responding to the target acquisition request, and sending target updating data to the intelligent equipment, wherein the target updating data is used for indicating the intelligent equipment to update the target function module.
8. The method of claim 7, wherein sending the update information to the smart device comprises:
receiving current versions of a plurality of functional modules reported by the intelligent equipment;
sending an update push to the smart device, wherein the update push is used for instructing the smart device to update the current versions of the plurality of functional modules;
receiving a downloading request returned by the intelligent equipment responding to the updating push;
and responding to the downloading request, and sending the updating information to the intelligent equipment.
9. The method of claim 8, wherein prior to the sending an update push to the smart device, the method further comprises:
acquiring an update data packet matched with the current version from a reference update data packet, wherein the reference update data packet is used for storing update data used for updating the functional module to be updated;
and generating the update push under the condition of acquiring the update data packet.
10. The method of claim 9, wherein prior to said retrieving the update package matching the current version from the reference update package, the method further comprises:
acquiring the updating data corresponding to the functional module to be updated;
packing the update data into the reference update data packet;
generating header information for the reference update data packet, wherein the header information includes: the number of the functional modules to be updated and the storage location of the update data of each functional module to be updated in the reference update data packet, where the update information includes the packet header information.
11. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 10 by means of the computer program.
CN202210269929.9A 2022-03-18 Function module updating method and device, storage medium and electronic device Active CN114938365B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210269929.9A CN114938365B (en) 2022-03-18 Function module updating method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210269929.9A CN114938365B (en) 2022-03-18 Function module updating method and device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN114938365A true CN114938365A (en) 2022-08-23
CN114938365B CN114938365B (en) 2024-06-25

Family

ID=

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115473809A (en) * 2022-08-27 2022-12-13 深圳市凯迪仕智能科技有限公司 Configuration processing method and device based on micro-service architecture and storage medium
WO2024093437A1 (en) * 2022-11-04 2024-05-10 中兴通讯股份有限公司 Information sending method and apparatus, information receiving method and apparatus, functional module updating methods and apparatus

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105592143A (en) * 2015-11-23 2016-05-18 杭州华三通信技术有限公司 File loading method and device
CN107357617A (en) * 2017-06-30 2017-11-17 广东欧珀移动通信有限公司 Using update method, device, storage medium and electronic equipment
CN108111331A (en) * 2017-11-06 2018-06-01 北京趣拿软件科技有限公司 Acquisition methods, device, storage medium, processor and the system of updated data package
CN110727454A (en) * 2019-10-24 2020-01-24 北京云迹科技有限公司 Updating method and device of intelligent equipment, electronic equipment and storage medium
CN111126572A (en) * 2019-12-26 2020-05-08 北京奇艺世纪科技有限公司 Model parameter processing method and device, electronic equipment and storage medium
CN112000355A (en) * 2020-08-21 2020-11-27 青岛海尔科技有限公司 Method and device for firmware upgrading and household appliance
CN112187531A (en) * 2020-09-17 2021-01-05 青岛海尔科技有限公司 Module upgrading method and system, storage medium and electronic device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105592143A (en) * 2015-11-23 2016-05-18 杭州华三通信技术有限公司 File loading method and device
CN107357617A (en) * 2017-06-30 2017-11-17 广东欧珀移动通信有限公司 Using update method, device, storage medium and electronic equipment
CN108111331A (en) * 2017-11-06 2018-06-01 北京趣拿软件科技有限公司 Acquisition methods, device, storage medium, processor and the system of updated data package
CN110727454A (en) * 2019-10-24 2020-01-24 北京云迹科技有限公司 Updating method and device of intelligent equipment, electronic equipment and storage medium
CN111126572A (en) * 2019-12-26 2020-05-08 北京奇艺世纪科技有限公司 Model parameter processing method and device, electronic equipment and storage medium
CN112000355A (en) * 2020-08-21 2020-11-27 青岛海尔科技有限公司 Method and device for firmware upgrading and household appliance
CN112187531A (en) * 2020-09-17 2021-01-05 青岛海尔科技有限公司 Module upgrading method and system, storage medium and electronic device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115473809A (en) * 2022-08-27 2022-12-13 深圳市凯迪仕智能科技有限公司 Configuration processing method and device based on micro-service architecture and storage medium
WO2024093437A1 (en) * 2022-11-04 2024-05-10 中兴通讯股份有限公司 Information sending method and apparatus, information receiving method and apparatus, functional module updating methods and apparatus

Similar Documents

Publication Publication Date Title
CN108491222B (en) Gateway equipment upgrading method and device, gateway equipment and storage medium
CN110417870A (en) configuration file management method, device, equipment and storage medium
CN104144118A (en) Communication device, management device, and processing method
JP2014179128A (en) Method for installing software component, system, terminal and device management server
CN105530323B (en) File upgrading method, related equipment and system
CN111683114A (en) Method and device for upgrading equipment program, terminal equipment and storage medium
CN112671572B (en) Method and device for intelligent equipment network distribution, storage medium and electronic device
CN107968725B (en) Method and device for returning and configuring configuration information of home gateway unit type terminal device
CN106293814B (en) Upgrading method and device
CN114938365A (en) Method and device for updating functional module, storage medium and electronic device
CN111885564A (en) Data transmission method, equipment upgrading method and computer readable storage medium
CN114938365B (en) Function module updating method and device, storage medium and electronic device
CN116107975A (en) Control method and device of equipment, storage medium and electronic device
CN115858007A (en) Loading method and device of extension assembly, storage medium and electronic device
CN116361155A (en) Method and device for testing software development kit, storage medium and electronic device
CN115457955A (en) Distributed awakening decision method and device, storage medium and electronic device
CN115309062A (en) Device control method, device, storage medium, and electronic apparatus
CN108964989B (en) Method and device for connecting with service platform and computer readable storage medium
CN113852489A (en) Upgrade package obtaining method and intelligent device
US11928454B2 (en) Method for managing equipment in order to update a firmware
CN115277412B (en) Edge gateway upgrading method and device, storage medium and electronic device
CN116248647A (en) Method and device for sending resource package, storage medium and electronic device
CN115296948B (en) Scene information updating method and device, storage medium and electronic device
CN115766448A (en) Application updating method and device, storage medium and electronic device
CN108259631B (en) Data processing method and system based on name service and related equipment

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
GR01 Patent grant