CN115277412A - Method and device for upgrading edge gateway, storage medium and electronic device - Google Patents

Method and device for upgrading edge gateway, storage medium and electronic device Download PDF

Info

Publication number
CN115277412A
CN115277412A CN202210742815.1A CN202210742815A CN115277412A CN 115277412 A CN115277412 A CN 115277412A CN 202210742815 A CN202210742815 A CN 202210742815A CN 115277412 A CN115277412 A CN 115277412A
Authority
CN
China
Prior art keywords
edge gateway
scene
gateway
edge
upgraded
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
CN202210742815.1A
Other languages
Chinese (zh)
Other versions
CN115277412B (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
Qingdao Haier Intelligent Home Appliance Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Qingdao Haier Intelligent Home Appliance 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, Qingdao Haier Intelligent Home Appliance Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202210742815.1A priority Critical patent/CN115277412B/en
Publication of CN115277412A publication Critical patent/CN115277412A/en
Application granted granted Critical
Publication of CN115277412B publication Critical patent/CN115277412B/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
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • 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 

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses an upgrading method and device of an edge gateway, a storage medium and an electronic device, which relate to the technical field of smart homes, and the upgrading method of the edge gateway comprises the following steps: receiving a registration request sent by an edge gateway, wherein the registration request carries version information to be upgraded of the edge gateway; under the condition that the version information to be upgraded is determined to be larger than the version information currently adopted by the edge gateway, acquiring historical scene information corresponding to the version information currently adopted by the edge gateway; generating a scene script according to the historical scene information and the version information to be upgraded, and sending the scene script to the edge gateway to indicate the edge gateway to upgrade according to the scene script; by adopting the technical scheme, the problems that the edge gateway cannot be upgraded on line through a cloud end and cannot provide rich edge capability in the related technology are solved.

Description

Method and device for upgrading edge gateway, storage medium and electronic device
Technical Field
The application relates to the technical field of smart homes, in particular to an upgrading method and device of an edge gateway, a storage medium and an electronic device.
Background
In the related art, an edge gateway H2 panel purchased by a user home supports intelligent touch, the panel can support local computing, message communication, and data caching, and can manually or automatically trigger a scene running thereon without connecting to a network, and control a device.
However, when a user just starts to purchase the edge gateway panel device, the 1.0 version of the firmware and software system integrated with the edge gateway panel may only support the loading operation of some simple scenarios, such as the control of the basic functions of the device, and the triggering of the device control based on the basic function scenario triggering conditions of the device; for example, when the current indoor temperature is too high, the cooling mode is automatically triggered to be started, and the device type only supports the ZigBee device.
Along with the abundant edge gateway of high in the clouds ability has promoted the 2.0 version gradually, this version not only supports based on equipment control scene, has still increased some timing function, music instant music function etc. still supports simultaneously and carries out loading and control scene on the edge gateway, and in addition, the equipment type of support is also abundanter, not only supports zigBee equipment, can also support other wifi equipment etc.. The cloud system pushes updates for the user, and the user can use new version functions after updating, such as functions of alarm clock based on the edge side, music playing and the like.
In the process of upgrading the gateway at the user end, the H2 panel proposed in the prior art can load and execute the local scene. The Smart device SDK is integrated on the H2 panel, the sub-devices are bound through the connection of the local area network, the cloud creates an edge scene and then issues a command to the edge gateway H2 panel, cloud scene information and an execution script can be acquired on the edge gateway, and a user can check, control and execute the scene on the edge gateway through the APP.
However, the edge gateway cannot be upgraded and updated through the cloud end through the technical scheme, and cannot provide rich edge capability.
Aiming at the problems that in the related art, an edge gateway cannot be upgraded on line through a cloud end, cannot provide rich edge capability and the like, an effective solution is not provided.
Therefore, there is a need for improvement of the related art to overcome the drawbacks of the related art.
Disclosure of Invention
The embodiment of the invention provides an upgrading method and device of an edge gateway, a storage medium and an electronic device, which at least solve the problems that the edge gateway cannot be upgraded on line through a cloud end and cannot provide rich edge capability in the related technology.
According to an aspect of the embodiments of the present invention, there is provided a method for upgrading an edge gateway, including: receiving a registration request sent by an edge gateway, wherein the registration request carries version information to be upgraded of the edge gateway; under the condition that the version information to be upgraded is determined to be larger than the version information currently adopted by the edge gateway, acquiring historical scene information corresponding to the version information currently adopted by the edge gateway; and generating a scene script according to the historical scene information and the version information to be upgraded, and sending the scene script to the edge gateway so as to instruct the edge gateway to upgrade according to the scene script.
In an exemplary embodiment, before receiving the registration request sent by the edge gateway, the method further includes: receiving an acquisition request sent by the edge gateway; and responding to the acquisition request, and sending all version information of the edge gateway to the edge gateway so as to indicate the edge gateway to allow the version information to be upgraded to be determined from all the version information according to the selection operation of the first object.
In an exemplary embodiment, before receiving the acquisition request sent by the edge gateway, the method further includes: acquiring a preset white list, wherein the white list comprises: and the designated edge gateway is a gateway which is allowed to obtain the latest resource packet issued by the second object and used for upgrading the edge gateway.
In an exemplary embodiment, after receiving the obtaining request sent by the edge gateway, the method further includes: acquiring identification information of the edge gateway, and determining whether a preset white list comprises the identification information of the edge gateway; sending the latest resource packet to the edge gateway under the condition that the white list comprises the identification information, so that the edge gateway can test the latest resource packet; and if the test is passed, sending the latest resource packet to a plurality of edge gateways, wherein the plurality of edge gateways do not comprise the edge gateway.
In an exemplary embodiment, generating a scenario script according to the historical scenario information and the version to be upgraded information includes: determining function information of the edge gateway of the version to be upgraded according to the version information to be upgraded, wherein the function information indicates functions supported by the edge gateway of the version to be upgraded; instantiating a scene according to the historical scene information and the function information to obtain the scene script.
In an exemplary embodiment, sending the scenario script to the edge gateway to instruct the edge gateway to upgrade according to the scenario script includes: under the condition that the scene script is generated, a preset synchronous command is forwarded to the edge gateway through a device access gateway to indicate the edge gateway to request to acquire the scene script from a cloud server, and upgrading is carried out according to the scene script, wherein the preset synchronous command carries the version information to be upgraded; and under the condition that the edge gateway is confirmed to acquire the scene script, whether the upgrading result of the edge gateway sent by the edge gateway is received or not is confirmed.
In an exemplary embodiment, after confirming whether an upgrade result of the edge gateway sent by the edge gateway is received, the method further includes: an upgrading step: under the condition that the received upgrading result of the edge gateway is failed, the preset synchronous command is forwarded to the edge gateway through the equipment access gateway again so as to upgrade the edge gateway again; and circularly executing the upgrading step, and stopping the re-upgrading under the condition that the number of times of executing the upgrading step exceeds a preset threshold value.
According to another aspect of the embodiments of the present invention, there is also provided an upgrade apparatus for an edge gateway, including: the system comprises a receiving module, a sending module and a judging module, wherein the receiving module is used for receiving a registration request sent by an edge gateway, and the registration request carries version information to be upgraded of the edge gateway; the acquisition module is used for acquiring historical scene information corresponding to the currently adopted version information of the edge gateway under the condition that the version information to be upgraded is determined to be larger than the currently adopted version information of the edge gateway; and the generating module is used for generating a scene script according to the historical scene information and the version information to be upgraded and sending the scene script to the edge gateway so as to indicate the edge gateway to upgrade according to the scene script.
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, where the computer program is configured to execute the above method for upgrading an edge gateway when running.
According to another aspect of the embodiments of the present invention, there is provided an electronic apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the method for upgrading the edge gateway through the computer program.
According to the invention, the registration request which is sent by the edge gateway and carries the version information to be upgraded of the edge gateway is received; under the condition that the version information to be upgraded is determined to be larger than the version information currently adopted by the edge gateway, acquiring historical scene information corresponding to the version information currently adopted by the edge gateway; generating a scene script according to the historical scene information and the version information to be upgraded, and sending the scene script to the edge gateway to indicate the edge gateway to upgrade according to the scene script; by adopting the technical scheme, the problems that the edge gateway cannot be upgraded on line through a cloud end and cannot provide rich edge capability in the related technology are solved; the edge gateway is upgraded on line through the cloud end, and the technical effect of providing rich edge capability is achieved.
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 schematic diagram of a hardware environment of an alternative method for upgrading an edge gateway according to an embodiment of the present application;
fig. 2 is a flowchart of an alternative method for upgrading an edge gateway according to an embodiment of the present application;
fig. 3 is an overall architecture diagram of an alternative method for upgrading an edge gateway according to an embodiment of the present application;
fig. 4 is an edge gateway function diagram of an alternative method for upgrading an edge gateway according to an embodiment of the present application;
fig. 5 is a schematic flowchart of an alternative method for upgrading an edge gateway according to an embodiment of the present application;
FIG. 6 is a timing diagram illustrating an alternative edge gateway grayscale upgrade test according to an embodiment of the present application;
fig. 7 is a block diagram of an alternative upgrading apparatus for an edge gateway 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, which can be derived by a person skilled in the art from the embodiments given herein 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 should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be implemented in sequences other than those illustrated or described herein. Furthermore, 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 one aspect of the embodiment of the application, a method for upgrading an edge gateway is provided. The upgrading method of the edge gateway is widely applied to full-house intelligent digital control application scenes such as intelligent homes (Smart Home), intelligent homes, intelligent household equipment ecology, intelligent house (Intellignee House) ecology and the like. Alternatively, in this embodiment, the method for upgrading the edge gateway may be applied to a hardware environment formed by the terminal device 102 and the 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 network, wireless network. 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 upgrading an edge gateway is provided, including but not limited to being applied to a server, and fig. 2 is a flowchart of a method for upgrading an edge gateway according to an embodiment of the present invention, where the flowchart includes the following steps:
step S202: receiving a registration request sent by an edge gateway, wherein the registration request carries version information to be upgraded of the edge gateway;
step S204: acquiring historical scene information corresponding to the currently adopted version information of the edge gateway under the condition that the version information to be upgraded is determined to be larger than the currently adopted version information of the edge gateway;
step S206: and generating a scene script according to the historical scene information and the version information to be upgraded, and sending the scene script to the edge gateway so as to instruct the edge gateway to upgrade according to the scene script.
Through the steps, a registration request which is sent by an edge gateway and carries the version information to be upgraded of the edge gateway is received; acquiring historical scene information corresponding to the currently adopted version information of the edge gateway under the condition that the version information to be upgraded is determined to be larger than the currently adopted version information of the edge gateway; generating a scene script according to the historical scene information and the version information to be upgraded, and sending the scene script to the edge gateway to indicate the edge gateway to upgrade according to the scene script; by adopting the technical scheme, the problems that the edge gateway cannot be upgraded on line through a cloud end and cannot provide rich edge capability in the related technology are solved; the edge gateway is upgraded on line through the cloud end, and the technical effect of providing rich edge capability is achieved.
In an exemplary embodiment, before receiving the registration request sent by the edge gateway, the method further includes: receiving an acquisition request sent by the edge gateway; and responding to the acquisition request, and sending all version information of the edge gateway to the edge gateway so as to indicate the edge gateway to determine the version information to be upgraded from all the version information according to the selection operation of the first object.
The method comprises the steps that an edge gateway sends an acquisition request to a cloud according to a preset period, and the acquisition request requests to acquire all version information of the edge gateway; after receiving the acquisition request, the edge gateway responds to the acquisition request and sends all version information of the edge gateway to the edge gateway; the user (corresponding to the first object) can check all latest version information of the edge gateway through the edge gateway, and the user (corresponding to the first object) can select one version for upgrading.
For example, the version currently used by the edge gateway is 2.0; the edge gateway already releases versions 3.0 and 4.0, and a user (equivalent to the first object) worrys about the unstable version and has many problems when the version 3.0 is just on line, and chooses not to upgrade the edge gateway temporarily; and after pushing the 4.0 version, the user (equivalent to the first object above) finally decides to upgrade the edge gateway to the 3.0 version to experience more functionality.
In order to solve the problem that the new version is not tested, before receiving the acquisition request sent by the edge gateway, the method further includes: acquiring a preset white list, wherein the white list comprises: and the identification information of the designated edge gateway is the gateway which is allowed to obtain the latest resource packet issued by the second object and used for upgrading the edge gateway.
In order to ensure the stability of the edge gateway of the new version, developers need to test the functions of the edge gateway before formal online, so that some specified test users need to obtain and upgrade the edge gateway of the latest version, experience the edge gateway and feed back the use experience and test the performance; therefore, before the latest version of the edge gateway is online, a developer sets a white list in advance to indicate the identification information of the edge gateway of the specified test user.
In an exemplary embodiment, after receiving the acquisition request sent by the edge gateway, the method further includes: acquiring the identification information of the edge gateway, and determining whether a preset white list comprises the identification information of the edge gateway or not; sending the latest resource packet to the edge gateway under the condition that the white list comprises the identification information, so that the edge gateway can test the latest resource packet; and if the test is passed, sending the latest resource packet to a plurality of edge gateways, wherein the plurality of edge gateways do not comprise the edge gateway.
After receiving an acquisition request sent by an edge gateway, a cloud end needs to acquire identification information of the edge gateway first and determine whether a preset white list determined in advance contains the identification information of the edge gateway or not; if yes, the edge gateway is the edge gateway of the specified internal test user (equivalent to the first object), and the latest resource packet of the edge gateway is sent to the edge gateway so that the edge gateway can perform performance test on the latest resource packet; under the condition that the test is passed, if the performance of the edge gateway of the version is proved to have no problem, the latest resource packet is formally online and is sent to other edge gateways; if the preset white list does not contain the identification information, the edge gateway is a common user, and only the version information of the edge gateway of all versions which are formally online is sent to the edge gateway.
Based on the steps, generating a scene script according to the historical scene information and the version information to be upgraded, wherein the method comprises the following steps: determining function information of an edge gateway of the version to be upgraded according to the version information to be upgraded, wherein the function information indicates functions supported by the edge gateway of the version to be upgraded; instantiating a scene according to the historical scene information and the function information to obtain the scene script.
The method comprises the steps that the capability supported by a version to be upgraded, namely the function of an edge gateway of the version, is obtained, a cloud re-instantiates a script of the scene according to the obtained function information and historical scene information of the edge gateway, whether the edge gateway of the version to be upgraded supports all functions of the scene is judged according to the composition information of the scene, if the edge gateway supports all functions of the scene, the instantiated script is used as a scene script, and the edge gateway of the version to be upgraded supports local control of using the scene; and if the edge gateway only supports partial functions of the scene, regenerating the scene script, and enabling the edge gateway of the version to be upgraded to acquire the partial functions which are not supported by the edge gateway from the cloud end on line.
In addition, sending the scenario script to the edge gateway to instruct the edge gateway to upgrade according to the scenario script includes: under the condition that the scene script is generated, a preset synchronous command is forwarded to the edge gateway through a device access gateway to indicate the edge gateway to request to acquire the scene script from a cloud server, and upgrading is carried out according to the scene script, wherein the preset synchronous command carries the version information to be upgraded; and under the condition that the edge gateway is confirmed to acquire the scene script, whether an upgrading result of the edge gateway sent by the edge gateway is received or not is confirmed.
After the scene script is generated, the cloud terminal issues a scene synchronization command (equivalent to the preset synchronization command) to the device access gateway, the device access gateway converts the format of the scene synchronization command (equivalent to the preset synchronization command) and then forwards the converted command to the edge gateway, so as to indicate that the edge gateway generates the scene script, and the edge gateway requests to acquire the scene script from the cloud terminal according to identification information carried in the scene synchronization command (equivalent to the preset synchronization command) and updates according to the scene script; and under the condition that the edge gateway is confirmed to acquire the scene script, the cloud end confirms whether the upgrading result of the edge gateway sent by the edge gateway is received or not.
In an exemplary embodiment, after confirming whether an upgrade result of the edge gateway sent by the edge gateway is received, the method further includes: an upgrading step: under the condition that the received upgrading result of the edge gateway is failed, the preset synchronous command is forwarded to the edge gateway through the equipment access gateway again so as to upgrade the edge gateway again; and circularly executing the upgrading step, and stopping the re-upgrading under the condition that the number of times of executing the upgrading step exceeds a preset threshold value.
And under the condition that the received upgrading result of the edge gateway is determined to be failure, the upgrading step is executed: transmitting a preset synchronous command to the edge gateway through the equipment access gateway again to indicate the edge gateway to upgrade again; if the received upgrading result is still failed, the upgrading step is continuously executed; if the execution times of the upgrading step exceed a preset threshold value, if the execution times exceed 3 times, the re-upgrading process is stopped.
It is to be understood that the above-described embodiments are only a few, and not all, embodiments of the present invention. In order to better understand the upgrade method of the edge gateway, the following describes the above process with reference to an embodiment, but is not limited to the technical solution of the embodiment of the present invention, specifically:
in an alternative embodiment, fig. 3 is a general architecture diagram of an alternative method for upgrading an edge gateway according to an embodiment of the present application, as shown in fig. 3, having the following steps:
step S31: a user (corresponding to the first object) initiates a gateway upgrade;
step S32: a scene SDK in the edge gateway pulls a latest js engine packet (equivalent to the latest resource packet) from the resource service;
step S33: a scene SDK in the edge gateway initiates an upgrade initialization registration (equivalent to the registration request) to a cloud end;
step S34: the cloud end sends a scene instantiation completion notice (equivalent to the preset synchronous command) to the equipment gateway (equivalent to the equipment access gateway);
step S35: the device gateway (equivalent to the device access gateway) sends a scene synchronization notification (equivalent to the preset synchronization command) to the SmartDevice of the edge gateway;
step S36: the Smartdevice of the edge gateway forwards the scene synchronization notice (equivalent to the preset synchronization command) to the scene SDK of the edge gateway;
step S37: the scene SDK of the edge gateway pulls scene and script information (corresponding to the above-mentioned scene script) from the cloud.
After a user (equivalent to the first object) initiates a gateway upgrading request, an edge gateway first pulls a latest js engine package (equivalent to the latest resource package) from a resource service, sends upgrading initialization registration (equivalent to the registration request) to a cloud, the cloud instantiates a scene, and forwards a scene synchronization notification (equivalent to the preset synchronization command) to the edge gateway through an equipment gateway (equivalent to the equipment access gateway) after the scene synchronization notification is completed, and after the edge gateway receives the scene synchronization notification (equivalent to the preset synchronization command), pulls a scene and script information (equivalent to the scene script) from the cloud; through the steps, the problems that the edge gateway cannot be upgraded on line through a cloud end and cannot provide rich edge capability in the related technology are solved; the edge gateway is upgraded on line through the cloud end, and the technical effect of providing rich edge capability is achieved.
The foregoing process is described below with reference to another embodiment, but is not limited to the technical solution of the embodiment of the present invention, specifically referring to fig. 4, where fig. 4 is an edge gateway functional diagram of an optional method for upgrading an edge gateway according to the embodiment of the present application, and specifically includes:
for edge gateways of different versions, the supported capabilities are different, for example, an edge gateway with a version number of 1.0.0 only supports scene conditions and scene actions of basic functions; the edge gateway with the version number of 2.0.0 can increase scene actions or conditions such as timing, time delay and the like on the basis of basic functions; the edge gateway with the version number of 3.0.0 can add more scene conditions and scene actions on the basis of the edge gateway with the version number of 2.0.0, that is, along with the upgrade of the version, the capability supported by the edge gateway and the scenes which can be realized are more and more abundant, and better use experience can be brought to a user (equivalent to the first object).
The upgrade process of the edge gateway is described below with reference to another embodiment, but is not limited to the technical solution of the embodiment of the present invention, specifically referring to fig. 5, fig. 5 is a schematic flowchart of an optional upgrade method of an edge gateway according to the embodiment of the present application; the method specifically comprises the following steps:
step S501: the method comprises the steps that a scene SDK of an edge gateway initiates upgrading, and sends the version number of the edge gateway to a cloud end;
step S502: judging whether the version number of the gateway is greater than the original version number, if so, inquiring whether a local scene exists under the gateway, and re-instantiating the local scene; if the version number is smaller than the original version number, the scene under the gateway is switched to a cloud end;
step S503: a scene script under a cloud instantiation gateway;
step S504: after all scenes are instantiated, transmitting a scene synchronization notice (equivalent to the preset synchronization command) to the equipment access gateway;
step S505: the device access gateway forwards the scene synchronization command (equivalent to the preset synchronization command) to the SmartDevice of the edge gateway;
step S506: the SmartDevice of the edge gateway sends a scene synchronization command (equivalent to the preset synchronization command) to a scene SDK of the edge gateway;
step S507: synchronizing scene instance script information (equivalent to the scene script) by a scene SDK of the edge gateway and updating;
step S508: updating local scene information;
step S509: reporting the synchronous end of the cloud scene;
step S510: if the scene synchronization fails, issuing a scene synchronization retry operation (which is equivalent to the step of circularly executing the upgrade);
step S511: retrying scene synchronization, and issuing a scene synchronization command (equivalent to the preset synchronization command) to the device access gateway again;
therefore, through the steps, the problems that the edge gateway cannot be upgraded on line through the cloud end and cannot provide rich edge capability in the related technology are solved; the edge gateway is upgraded on line through the cloud, and the technical effect of providing rich edge capability is achieved.
The method aims to solve the problems that the upgrading process in the related technology does not support the verification and use under the gray scale, and the use of all users can be influenced once the new version is released and fails; the upgrade process of the edge gateway is described below with reference to another embodiment, but is not limited to the technical solution of the embodiment of the present invention, specifically, see fig. 6, where fig. 6 is a flowchart of an optional edge gateway grayscale upgrade test according to the embodiment of the present application; the method specifically comprises the following steps:
step 1: a developer (equivalent to the second object) issues a scene SDK latest resource package (equivalent to the latest resource package) to a resource service;
step 1.1: the resource service appoints a gray gateway (equivalent to the preset white list);
step 1.2: packing the scene SDK;
and 2, step: a scene SDK (corresponding to the edge gateway) pulls version information of the scene SDK (corresponding to the edge gateway);
step 2.1: judging whether the edge gateway exists in a white list (equivalent to the preset white list) or not;
step 2.2: if the edge gateway is in the white list (equivalent to the preset white list), the resource service returns the SDK (equivalent to the latest resource packet) under the gray scale;
step 2.3: if the version information is not in the white list (which is equivalent to the preset white list), returning the version information of the edge gateway of other versions;
step 2.3.1: scene SDK (equivalent to the above edge gateway) update;
step 2.3.2: and (4) local reinitialization is carried out.
Through the steps, a gray gateway white list (equivalent to the preset white list) is appointed, whether the gray gateway white list is located in the white list (equivalent to the preset white list) is verified when a request of an edge gateway is received, if yes, the gray gateway is issued to the edge gateway, and if not, version information of edge gateways of other versions is returned; thereby realizing the gray scale upgrading test; the software system of the edge gateway to be upgraded is convenient to test and verify in the formal environment.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method according to the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may 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 invention or portions thereof contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, 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, etc.) to execute the method of the embodiments of the present invention.
In this embodiment, an upgrade apparatus for an edge gateway is further provided, where the upgrade apparatus is used to implement the foregoing embodiment and preferred embodiments, and details are not described again after the description. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the devices described in the embodiments below are preferably implemented in software, implementations in hardware, or a combination of software and hardware are also possible and contemplated.
Fig. 7 is a block diagram of an upgrade apparatus for an optional edge gateway according to an embodiment of the present invention, where the upgrade apparatus includes:
a receiving module 72, configured to receive a registration request sent by an edge gateway, where the registration request carries version information to be upgraded of the edge gateway;
an obtaining module 74, configured to obtain historical scene information corresponding to the version information currently used by the edge gateway when it is determined that the version information to be upgraded is greater than the version information currently used by the edge gateway;
and a generating module 76, configured to generate a scene script according to the historical scene information and the version information to be upgraded, and send the scene script to the edge gateway, so as to instruct the edge gateway to upgrade according to the scene script.
Receiving a registration request sent by an edge gateway through the device, wherein the registration request carries version information to be upgraded of the edge gateway; acquiring historical scene information corresponding to the currently adopted version information of the edge gateway under the condition that the version information to be upgraded is determined to be larger than the currently adopted version information of the edge gateway; generating a scene script according to the historical scene information and the version information to be upgraded, and sending the scene script to the edge gateway to indicate the edge gateway to upgrade according to the scene script; by adopting the technical scheme, the problems that the edge gateway cannot be upgraded on line through a cloud end and cannot provide rich edge capability in the related technology are solved; the edge gateway is upgraded on line through the cloud, and the technical effect of providing rich edge capability is achieved.
In an exemplary embodiment, the receiving module 72 is further configured to receive an obtaining request sent by the edge gateway; and responding to the acquisition request, and sending all version information of the edge gateway to the edge gateway so as to indicate the edge gateway to determine the version information to be upgraded from all the version information according to the selection operation of the first object.
The method comprises the steps that an edge gateway sends an acquisition request to a cloud according to a preset period, and the acquisition request requests to acquire all version information of the edge gateway; after receiving the acquisition request, the edge gateway responds to the acquisition request and sends all version information of the edge gateway to the edge gateway; the user (corresponding to the first object) can check all latest version information of the edge gateway through the edge gateway, and the user (corresponding to the first object) can select one version for upgrading.
For example, the version currently used by edge gateways is 2.0; the edge gateway already releases versions 3.0 and 4.0, and a user (equivalent to the first object) worrys about the unstable version and has many problems when the version 3.0 is just on line, and chooses not to upgrade the edge gateway temporarily; after the release of the 4.0 version, the user (corresponding to the first object) finally decides to upgrade the edge gateway to the 3.0 version to experience more functions.
In an exemplary embodiment, the obtaining module 74 is further configured to obtain a preset white list, where the white list includes: and the designated edge gateway is a gateway which is allowed to obtain the latest resource packet issued by the second object and used for upgrading the edge gateway.
In order to ensure the stability of the edge gateway of the new version, developers need to test the functions of the edge gateway before formal online, so that some specified test users need to obtain and upgrade the edge gateway of the latest version, experience the edge gateway and feed back the use experience and test the performance; therefore, before the latest version of the edge gateway is online, a developer sets a white list in advance to indicate the identification information of the edge gateway of the specified test user.
In an exemplary embodiment, the obtaining module 74 is further configured to obtain the identification information of the edge gateway, and determine whether a preset white list includes the identification information of the edge gateway; sending the latest resource packet to the edge gateway under the condition that the white list comprises the identification information, so that the edge gateway can test the latest resource packet; and if the test is passed, sending the latest resource packet to a plurality of edge gateways, wherein the edge gateways do not comprise the edge gateway.
In order to ensure the stability of the edge gateway of the new version, developers need to test the functions of the edge gateway before formal online, so that some specified test users need to obtain and upgrade the edge gateway of the latest version, experience the edge gateway and feed back the use experience and test the performance; therefore, before the latest version of the edge gateway is online, a developer sets a white list in advance to indicate the identification information of the edge gateway of the specified test user.
Based on the above steps, the generating module 76 is further configured to determine function information of the edge gateway of the version to be upgraded according to the version information to be upgraded, where the function information indicates a function supported by the edge gateway of the version to be upgraded; instantiating a scene according to the historical scene information and the function information to obtain the scene script.
The method comprises the steps that the capability supported by a version to be upgraded, namely the function of an edge gateway of the version, is obtained, a cloud re-instantiates a script of the scene according to the obtained function information and historical scene information of the edge gateway, whether the edge gateway of the version to be upgraded supports all functions of the scene is judged according to the composition information of the scene, if the edge gateway supports all functions of the scene, the instantiated script is used as a scene script, and the edge gateway of the version to be upgraded supports local control of using the scene; and if the edge gateway only supports partial functions of the scene, regenerating the scene script, and enabling the edge gateway of the version to be upgraded to acquire the partial functions which are not supported by the edge gateway from the cloud end on line.
In addition, the generating module 76 is further configured to forward a preset synchronization command to the edge gateway through the device access gateway when the scene script is generated, so as to instruct the edge gateway to request to acquire the scene script from the cloud server, and perform upgrading according to the scene script, where the preset synchronization command carries the version information to be upgraded; and under the condition that the edge gateway is confirmed to acquire the scene script, whether the upgrading result of the edge gateway sent by the edge gateway is received or not is confirmed.
After the scene script is generated, the cloud terminal issues a scene synchronization command (equivalent to the preset synchronization command) to the device access gateway, the device access gateway converts the format of the scene synchronization command (equivalent to the preset synchronization command) and then forwards the converted command to the edge gateway, so as to indicate that the edge gateway generates the scene script, and the edge gateway requests to acquire the scene script from the cloud terminal according to identification information carried in the scene synchronization command (equivalent to the preset synchronization command) and updates according to the scene script; and under the condition that the edge gateway is confirmed to acquire the scene script, the cloud confirms whether the upgrading result of the edge gateway sent by the edge gateway is received or not.
In an exemplary embodiment, the receiving module 72 is further configured to perform the upgrading step: under the condition that the received upgrading result of the edge gateway is failed, the preset synchronous command is forwarded to the edge gateway through the equipment access gateway again so as to upgrade the edge gateway again; and circularly executing the upgrading step, and stopping the re-upgrading under the condition that the number of times of executing the upgrading step exceeds a preset threshold value.
And under the condition that the received upgrading result of the edge gateway is determined to be failed, executing an upgrading step: transmitting a preset synchronous command to the edge gateway through the equipment access gateway again to indicate the edge gateway to upgrade again; if the received upgrading result is still failed, the upgrading step is continuously executed; if the execution times of the upgrading step exceed a preset threshold value, if the execution times exceed 3 times, the re-upgrading process is stopped.
An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
the method comprises the steps of S1, receiving a registration request sent by an edge gateway, wherein the registration request carries version information to be upgraded of the edge gateway;
s2, acquiring historical scene information corresponding to the currently adopted version information of the edge gateway under the condition that the version information to be upgraded is determined to be larger than the currently adopted version information of the edge gateway;
and S3, generating a scene script according to the historical scene information and the version information to be upgraded, and sending the scene script to the edge gateway to indicate the edge gateway to upgrade according to the scene script.
In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to: various media capable of storing computer programs, 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.
For specific examples in this embodiment, reference may be made to the examples described in the foregoing embodiments and exemplary implementations, and details of this embodiment are not repeated herein.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
the method comprises the steps of S1, receiving a registration request sent by an edge gateway, wherein the registration request carries version information to be upgraded of the edge gateway;
s2, under the condition that the version information to be upgraded is determined to be larger than the version information currently adopted by the edge gateway, acquiring historical scene information corresponding to the version information currently adopted by the edge gateway;
and S3, generating a scene script according to the historical scene information and the version information to be upgraded, and sending the scene script to the edge gateway to indicate the edge gateway to upgrade according to the scene script.
In an exemplary embodiment, 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.
For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary embodiments, and details of this embodiment are not repeated herein.
It will be apparent to those skilled in the art that the various modules or steps of the invention described above may be implemented using a general purpose computing device, they may be centralized on a single computing device or distributed across a network of computing devices, and they may be implemented using program code executable by the computing devices, such that they may be stored in a memory device and executed by the 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 various integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention 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, as will be apparent to those skilled in the art, numerous modifications and adaptations can be made without departing from the principles of the present application and such modifications and adaptations are intended to be considered within the scope of the present application.

Claims (10)

1. An upgrade method for an edge gateway, comprising:
receiving a registration request sent by an edge gateway, wherein the registration request carries version information to be upgraded of the edge gateway;
under the condition that the version information to be upgraded is determined to be larger than the version information currently adopted by the edge gateway, acquiring historical scene information corresponding to the version information currently adopted by the edge gateway;
and generating a scene script according to the historical scene information and the version information to be upgraded, and sending the scene script to the edge gateway so as to instruct the edge gateway to upgrade according to the scene script.
2. The method for upgrading an edge gateway according to claim 1, wherein before receiving the registration request sent by the edge gateway, the method further comprises:
receiving an acquisition request sent by the edge gateway;
and responding to the acquisition request, and sending all version information of the edge gateway to the edge gateway so as to indicate the edge gateway to determine the version information to be upgraded from all the version information according to the selection operation of the first object.
3. The method for upgrading the edge gateway according to claim 2, wherein before receiving the acquisition request sent by the edge gateway, the method further comprises:
acquiring a preset white list, wherein the white list comprises: and the identification information of the designated edge gateway is the gateway which is allowed to obtain the latest resource packet issued by the second object and used for upgrading the edge gateway.
4. The method for upgrading an edge gateway according to claim 3, wherein after receiving the acquisition request sent by the edge gateway, the method further comprises:
acquiring the identification information of the edge gateway, and determining whether a preset white list comprises the identification information of the edge gateway or not;
sending the latest resource packet to the edge gateway under the condition that the white list comprises the identification information, so that the edge gateway can test the latest resource packet;
and if the test is passed, sending the latest resource packet to a plurality of edge gateways, wherein the edge gateways do not comprise the edge gateway.
5. The method for upgrading an edge gateway according to claim 1, wherein generating a scenario script according to the historical scenario information and the version to be upgraded information comprises:
determining function information of the edge gateway of the version to be upgraded according to the version information to be upgraded, wherein the function information indicates functions supported by the edge gateway of the version to be upgraded;
instantiating a scene according to the historical scene information and the function information to obtain the scene script.
6. The method for upgrading an edge gateway according to claim 1, wherein sending the scenario script to the edge gateway to instruct the edge gateway to upgrade according to the scenario script comprises:
under the condition that the scene script is generated, a preset synchronous command is forwarded to the edge gateway through a device access gateway to indicate the edge gateway to request to acquire the scene script from a cloud server, and upgrading is carried out according to the scene script, wherein the preset synchronous command carries the version information to be upgraded;
and under the condition that the edge gateway is confirmed to acquire the scene script, whether an upgrading result of the edge gateway sent by the edge gateway is received or not is confirmed.
7. The method for upgrading an edge gateway according to claim 6, wherein after confirming whether the upgrade result of the edge gateway sent by the edge gateway is received, the method further comprises:
an upgrading step: under the condition that the received upgrading result of the edge gateway is failed, the preset synchronous command is forwarded to the edge gateway through the equipment access gateway again so as to upgrade the edge gateway again;
and circularly executing the upgrading step, and stopping the re-upgrading under the condition that the number of times of executing the upgrading step exceeds a preset threshold value.
8. An upgrade apparatus for an edge gateway, comprising:
the system comprises a receiving module, a sending module and a judging module, wherein the receiving module is used for receiving a registration request sent by an edge gateway, and the registration request carries version information to be upgraded of the edge gateway;
the acquisition module is used for acquiring historical scene information corresponding to the currently adopted version information of the edge gateway under the condition that the version information to be upgraded is determined to be larger than the currently adopted version information of the edge gateway;
and the generating module is used for generating a scene script according to the historical scene information and the version information to be upgraded and sending the scene script to the edge gateway so as to indicate the edge gateway to upgrade according to the scene script.
9. A computer-readable storage medium, comprising a stored program, wherein the program when executed performs the method of any of claims 1 to 7.
10. 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 7 by means of the computer program.
CN202210742815.1A 2022-06-28 2022-06-28 Edge gateway upgrading method and device, storage medium and electronic device Active CN115277412B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210742815.1A CN115277412B (en) 2022-06-28 2022-06-28 Edge gateway upgrading method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210742815.1A CN115277412B (en) 2022-06-28 2022-06-28 Edge gateway upgrading method and device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN115277412A true CN115277412A (en) 2022-11-01
CN115277412B CN115277412B (en) 2024-03-22

Family

ID=83762704

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210742815.1A Active CN115277412B (en) 2022-06-28 2022-06-28 Edge gateway upgrading method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN115277412B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108259231A (en) * 2017-12-27 2018-07-06 生迪智慧科技有限公司 Method for upgrading software, gateway, server and the system of smart machine
US10417115B1 (en) * 2018-04-27 2019-09-17 Amdocs Development Limited System, method, and computer program for performing production driven testing
CN110795121A (en) * 2019-09-27 2020-02-14 北京浪潮数据技术有限公司 Virtualization system upgrading method, device, equipment and computer readable storage medium
CN111324363A (en) * 2019-11-14 2020-06-23 杭州海康威视系统技术有限公司 Equipment upgrading method, upgrading terminal, equipment and storage medium
CN112486544A (en) * 2020-12-16 2021-03-12 网宿科技股份有限公司 Software upgrading method and device
CN114528064A (en) * 2020-11-23 2022-05-24 深圳Tcl新技术有限公司 Scene configuration method, storage medium and terminal equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108259231A (en) * 2017-12-27 2018-07-06 生迪智慧科技有限公司 Method for upgrading software, gateway, server and the system of smart machine
US10417115B1 (en) * 2018-04-27 2019-09-17 Amdocs Development Limited System, method, and computer program for performing production driven testing
CN110795121A (en) * 2019-09-27 2020-02-14 北京浪潮数据技术有限公司 Virtualization system upgrading method, device, equipment and computer readable storage medium
CN111324363A (en) * 2019-11-14 2020-06-23 杭州海康威视系统技术有限公司 Equipment upgrading method, upgrading terminal, equipment and storage medium
CN114528064A (en) * 2020-11-23 2022-05-24 深圳Tcl新技术有限公司 Scene configuration method, storage medium and terminal equipment
CN112486544A (en) * 2020-12-16 2021-03-12 网宿科技股份有限公司 Software upgrading method and device

Also Published As

Publication number Publication date
CN115277412B (en) 2024-03-22

Similar Documents

Publication Publication Date Title
KR101867813B1 (en) Server system and online service for device management
CN110365704B (en) Equipment binding method and device and electronic equipment
CN115167164A (en) Method and device for determining equipment scene, storage medium and electronic device
CN114697150B (en) Command issuing method and device, storage medium and electronic device
CN116016002A (en) Intelligent household appliance network distribution method and device and electronic device
CN115277412A (en) Method and device for upgrading edge gateway, storage medium and electronic device
CN116107975A (en) Control method and device of equipment, storage medium and electronic device
CN115982493A (en) Page jump method and device, storage medium and electronic device
CN115167160A (en) Device control method and apparatus, device control system, and storage medium
CN114938365B (en) Function module updating method and device, storage medium and electronic device
CN114697345B (en) Information updating method and device, storage medium and electronic device
CN115190018B (en) Method and device for playing upgrade prompt information, storage medium and electronic device
CN114938365A (en) Method and device for updating functional module, storage medium and electronic device
CN115484116B (en) Processing method and device of equipment data, storage medium and electronic device
CN115296947B (en) Control command response method and device, storage medium and electronic device
CN116248647A (en) Method and device for sending resource package, storage medium and electronic device
CN115460060B (en) Device upgrading method and device of intelligent device, storage medium and electronic device
CN115174383B (en) Equipment updating method, storage medium and electronic device
CN116257281A (en) Firmware upgrading method of intelligent household appliance, storage medium and electronic device
CN116628292A (en) Version set display method and device, storage medium and electronic device
CN115525309A (en) Version updating method and device, storage medium and electronic device
CN115297103A (en) Method and device for acquiring logic constraint file, storage medium and electronic device
CN115766448A (en) Application updating method and device, storage medium and electronic device
CN115167163A (en) Scene execution method and device, storage medium and electronic device
CN115473753A (en) Control method and device of gateway equipment, storage medium and electronic device

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