CN115277412B - Edge gateway upgrading method and device, storage medium and electronic device - Google Patents

Edge gateway upgrading method and device, storage medium and electronic device Download PDF

Info

Publication number
CN115277412B
CN115277412B CN202210742815.1A CN202210742815A CN115277412B CN 115277412 B CN115277412 B CN 115277412B CN 202210742815 A CN202210742815 A CN 202210742815A CN 115277412 B CN115277412 B CN 115277412B
Authority
CN
China
Prior art keywords
edge gateway
scene
gateway
edge
version information
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.)
Active
Application number
CN202210742815.1A
Other languages
Chinese (zh)
Other versions
CN115277412A (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

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 edge gateway upgrading method and device, a storage medium and an electronic device, and relates to the technical field of smart families, wherein the edge gateway upgrading method 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; acquiring historical scene information corresponding to the version information currently adopted by 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; 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 instruct the edge gateway to upgrade according to the scene script; by adopting the technical scheme, the problem that the edge gateway in the related technology cannot be upgraded online through the cloud and cannot provide abundant edge capability is solved.

Description

Edge gateway upgrading method and device, storage medium and electronic device
Technical Field
The application relates to the technical field of smart home, in particular to an edge gateway upgrading method and device, a storage medium and an electronic device.
Background
In the related art, an edge gateway H2 panel purchased in a user's home supports intelligent touch control, and the panel can support local computing, message communication and data caching, and can manually or automatically trigger a scene running on the panel and control equipment without connecting a network.
However, when the user just begins to purchase the edge gateway panel device, the 1.0 version of firmware and software system integrated by the edge gateway panel may only support loading operation of some simple scenes, for example, control of basic functions of the device, and trigger device control based on basic function scene triggering conditions of the device; for example, the on-cooling mode is automatically triggered when the current indoor temperature is too high, and the device type only supports ZigBee devices.
Along with the rich border gateway of high in the cloud end ability, 2.0 versions are gradually introduced, and the versions support not only equipment-based control scenes, but also some timing functions, music playing functions and the like, and simultaneously support loading and control of scenes on the border gateway, and in addition, supported equipment types are richer, not only ZigBee equipment, but also other wifi equipment and the like. The cloud system pushes the update for the user, and the user can use a new version function after updating, for example, the functions of an alarm clock based on the edge side, playing music and the like.
In the process of gateway upgrading at the user side, the H2 panel proposed in the prior art can load and execute a local scene. The Smart device SDK is integrated on the H2 panel, the sub-equipment is bound through the connection local area network, the cloud end creates an edge scene and then issues a command to the edge gateway H2 panel, cloud end scene information and an execution script can be acquired on the edge gateway, and a user can check and control the scene on the edge gateway through the equipment APP.
However, according to the technical scheme, the edge gateway cannot be updated through the cloud end, and cannot provide rich edge capability.
Aiming at the problems that in the related technology, an edge gateway cannot be updated on line through a cloud, rich edge capability cannot be provided, and the like, no effective solution is proposed yet.
Accordingly, there is a need for improvements in the related art to overcome the drawbacks of the related art.
Disclosure of Invention
The embodiment of the invention provides an edge gateway upgrading method and device, a storage medium and an electronic device, which at least solve the problem that the edge gateway cannot be upgraded online through a cloud in the related art and cannot provide abundant edge capability.
According to an aspect of the embodiment of the present invention, there is provided an upgrade method for 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; acquiring historical scene information corresponding to the version information currently adopted by 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; 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 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 transmitting all version information of the edge gateway to the edge gateway so as to instruct the edge gateway to allow the version information to be upgraded to be determined from all 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: obtaining a preset white list, wherein the white list comprises: and designating the identification information of the edge gateway, wherein the designated edge gateway is a gateway which allows the acquisition of the latest resource packet issued by the second object and used for upgrading the edge gateway.
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 as to test the latest resource packet by the edge gateway; and sending the latest resource packet to a plurality of edge gateways in the condition that the test is passed, wherein the 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 information to be upgraded includes: determining the 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 the functions supported by the edge gateway of the version to be upgraded; and instantiating a scene according to the historical scene information and the functional 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: forwarding a preset synchronous command to the edge gateway through the equipment access gateway under the condition that the scene script is generated, so as to instruct the edge gateway to request to acquire the scene script from a cloud server, and upgrading the scene script 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 acquires the scene script, confirming whether an upgrading result of the edge gateway sent by the edge gateway is received or not.
In an exemplary embodiment, after confirming whether the upgrade result of the edge gateway sent by the edge gateway is received, the method further includes: an upgrading step: if the received upgrading result of the edge gateway is failure, forwarding the preset synchronous command to the edge gateway through the equipment access gateway again so as to re-upgrade the edge gateway; and circularly executing the upgrading step, and stopping the re-upgrading when the number of times of executing the upgrading step exceeds a preset threshold value.
According to another aspect of the embodiment of the present invention, there is also provided an upgrade apparatus for an edge gateway, including: the receiving module is used for receiving a registration request sent by an edge gateway, wherein 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 version information currently adopted by 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; 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 instruct the edge gateway to upgrade according to the scene script.
According to yet another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium having a computer program stored therein, wherein the computer program is configured to execute the above-described edge gateway upgrade method when running.
According to still another aspect of the embodiment of the present invention, there is further provided an electronic device including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the method for upgrading an edge gateway through the computer program.
According to the invention, the registration request carrying the version information to be upgraded of the edge gateway, which is sent by the edge gateway, is received; acquiring historical scene information corresponding to the version information currently adopted by 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; 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 instruct the edge gateway to upgrade according to the scene script; by adopting the technical scheme, the problem that an edge gateway in the related technology cannot be upgraded on line through a cloud end and cannot provide abundant edge capability is solved; the technical effect of upgrading the edge gateway on line through the cloud and 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 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 that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic diagram of a hardware environment of an alternative method of upgrading an edge gateway according to an embodiment of the present application;
FIG. 2 is a flow chart of an alternative method of upgrading an edge gateway according to an embodiment of the present application;
FIG. 3 is an overall architecture diagram of an alternative edge gateway upgrade method according to embodiments of the present application;
FIG. 4 is an edge gateway functional diagram of an alternative method of upgrading an edge gateway according to an embodiment of the present application;
FIG. 5 is a flow chart of an alternative method of upgrading an edge gateway according to an embodiment of the present application;
FIG. 6 is a flow chart of an alternative edge gateway gray scale upgrade test according to embodiments of the present application;
Fig. 7 is a block diagram of an alternative edge gateway upgrade apparatus according to an embodiment of the present application.
Detailed Description
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise 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, an upgrading method of 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 Home (Smart Home), intelligent Home equipment ecology, intelligent Home (intelligent house) ecology and the like. Alternatively, in the present embodiment, the above-described method for upgrading an edge gateway may be applied to a hardware environment configured 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 used to provide services (such as application services and the like) for a terminal or a client installed on the terminal, a database may be set on the server or independent of the server, for providing data storage services for the server 104, and cloud computing and/or edge computing services may be configured on the server or independent of the server, for providing data computing services 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: a wide area network, a metropolitan area network, a local area network, and the wireless network may include, but is not limited to, at least one of: WIFI (Wireless Fidelity ), bluetooth. The terminal device 102 may not be limited to a PC, a mobile phone, a tablet computer, an intelligent air conditioner, an intelligent smoke machine, an intelligent refrigerator, an intelligent oven, an intelligent cooking range, an intelligent washing machine, an intelligent water heater, an intelligent washing device, an intelligent dish washer, an intelligent projection device, an intelligent television, an intelligent clothes hanger, an intelligent curtain, an intelligent video, an intelligent socket, an intelligent sound box, an intelligent fresh air device, an intelligent kitchen and toilet device, an intelligent bathroom device, an intelligent sweeping robot, an intelligent window cleaning robot, an intelligent mopping robot, an intelligent air purifying device, an intelligent steam box, an intelligent microwave oven, an intelligent kitchen appliance, an intelligent purifier, an intelligent water dispenser, an intelligent door lock, and the like. In this embodiment, an edge gateway upgrading method is provided, including but not limited to being applied to a server, and fig. 2 is a flowchart of an edge gateway upgrading method 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 version information currently adopted by 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;
step S206: 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 instruct the edge gateway to upgrade according to the scene script.
Through the steps, receiving a registration request which is sent by an edge gateway and carries version information to be upgraded of the edge gateway; acquiring historical scene information corresponding to the version information currently adopted by 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; 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 instruct the edge gateway to upgrade according to the scene script; by adopting the technical scheme, the problem that an edge gateway in the related technology cannot be upgraded on line through a cloud end and cannot provide abundant edge capability is solved; the technical effect of upgrading the edge gateway on line through the cloud and 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 transmitting all version information of the edge gateway to the edge gateway so as to instruct 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 edge gateway sends an acquisition request to the cloud end according to a preset period, and the acquisition request is used for acquiring 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 see all the 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 used by the current edge gateway is 2.0; while the edge gateway has already proposed versions 3.0 and 4.0, the user (corresponding to the first object) worries about unstable versions when the version 3.0 is just on line, and has more problems, and chooses not to upgrade the edge gateway temporarily; after pushing version 4.0, the user (corresponding to the first object) finally decides to upgrade the edge gateway to version 3.0 to experience more functions.
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: obtaining a preset white list, wherein the white list comprises: and designating the identification information of the edge gateway, wherein the designated edge gateway is a gateway which allows the acquisition of the latest resource packet issued by the second object and used for upgrading the edge gateway.
In order to ensure the stability of the new version edge gateway, the developer needs to test the function of the new version edge gateway before formally online, so that some appointed test users are required to acquire and upgrade the latest version edge gateway, experience the latest version edge gateway, feed back the use experience and test the performance; the developer sets a white list in advance before the last version of edge gateway is on line, so as to indicate the identification information of the edge gateway of the designated 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 as to test the latest resource packet by the edge gateway; and sending the latest resource packet to a plurality of edge gateways in the condition that the test is passed, wherein the edge gateways do not comprise the edge gateway.
After receiving an acquisition request sent by an edge gateway, the cloud end needs to acquire the identification information of the edge gateway first, and determines whether a preset white list determined in advance contains the identification information of the edge gateway or not; if the information is included, indicating that the edge gateway is an edge gateway of a designated internal test user (corresponding to the first object), and sending a latest resource packet of the edge gateway to the edge gateway so as to test the performance of the latest resource packet by the edge gateway; if the test passes, the performance of the edge gateway of the version is proved to be free of problems, and the latest resource package is formally online and sent to other edge gateways; if the preset white list does not contain the identification information, the edge gateway is indicated to be a common user, and only version information of all versions of the edge gateway 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, including: determining the 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 the functions supported by the edge gateway of the version to be upgraded; and instantiating a scene according to the historical scene information and the functional information to obtain the scene script.
Acquiring the capability supported by the version to be upgraded, namely the function of the version edge gateway, re-instantiating the script of the scene according to the acquired function information and the historical scene information of the edge gateway by the cloud, judging whether the edge gateway of the version to be upgraded supports all functions of the scene according to the composition information of the scene, and taking the instantiated script as the scene script if the edge gateway supports all functions of the scene, so that the edge gateway of the version to be upgraded supports the use of the scene under the control of the local control; if the edge gateway only supports part of the functions of the scene, the scene script is regenerated, so that the edge gateway of the version to be upgraded acquires part of the functions which are not supported by the edge gateway from the cloud on line.
In addition, the scene script is sent to the edge gateway to instruct the edge gateway to upgrade according to the scene script, including: forwarding a preset synchronous command to the edge gateway through the equipment access gateway under the condition that the scene script is generated, so as to instruct the edge gateway to request to acquire the scene script from a cloud server, and upgrading the scene script 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 acquires the scene script, confirming whether an upgrading result of the edge gateway sent by the edge gateway is received or not.
After generating the scene script, the cloud end transmits a scene synchronous command (corresponding to the preset synchronous command) to the equipment access gateway, the equipment access gateway converts the format of the scene synchronous command (corresponding to the preset synchronous command) and then forwards the converted command to the edge gateway, so that the edge gateway is indicated to generate the scene script, the edge gateway requests to acquire the scene script from the cloud end according to the identification information carried in the scene synchronous command (corresponding to the preset synchronous command), and upgrades according to the scene script; and under the condition that the edge gateway acquires 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, after confirming whether the upgrade result of the edge gateway sent by the edge gateway is received, the method further includes: an upgrading step: if the received upgrading result of the edge gateway is failure, forwarding the preset synchronous command to the edge gateway through the equipment access gateway again so as to re-upgrade the edge gateway; and circularly executing the upgrading step, and stopping the re-upgrading when 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, executing an upgrading step: forwarding a preset synchronous command to the edge gateway through the equipment access gateway again to instruct the edge gateway to upgrade again; if the received upgrading result still fails, continuing to execute the upgrading step; if the number of times of execution of the upgrade step exceeds a preset threshold, for example, 3 times, stopping the process of re-upgrade.
It will be apparent that the embodiments described above are merely some, but not all, embodiments of the invention. In order to better understand the above-mentioned edge gateway upgrading method, the following description will explain the above-mentioned process with reference to the embodiments, but is not used to limit the technical solution of the embodiments of the present invention, specifically:
in an alternative embodiment, fig. 3 is an overall architecture diagram of an alternative method for upgrading an edge gateway according to an embodiment of the present application, as shown in fig. 3, with the following steps:
step S31: a user (corresponding to the first object) initiates gateway upgrade;
step S32: the scene SDK in the edge gateway pulls the latest js engine packet (corresponding to the latest resource packet) from the resource service;
Step S33: the scene SDK in the edge gateway initiates upgrade initialization registration (corresponding to the registration request) to the cloud;
step S34: the cloud sends a scene instantiation completion notification (corresponding to the preset synchronous command) to the equipment gateway (corresponding to the equipment access gateway);
step S35: the device gateway (corresponding to the device access gateway) sends a scene synchronization notification (corresponding to the preset synchronization command) to the SmartDevice of the edge gateway;
step S36: smartDevice of the edge gateway forwards the scene synchronization notification (corresponding 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 scene script) from the cloud.
After a user (corresponding to the first object) initiates a gateway upgrading request, the edge gateway firstly pulls the latest js engine packet (corresponding to the latest resource packet) from a resource service, sends upgrading initialization registration (corresponding to the registration request) to the cloud, instantiates a scene, forwards a scene synchronization notification (corresponding to the preset synchronous command) to the edge gateway through the equipment gateway (corresponding to the equipment access gateway) after the scene is completed, and pulls scene and script information (corresponding to the scene script) from the cloud after the edge gateway receives the scene synchronization notification (corresponding to the preset synchronous command); through the steps, the problem that an edge gateway cannot be updated on line through a cloud in the related technology and cannot provide rich edge capability is solved; the technical effect of upgrading the edge gateway on line through the cloud and providing rich edge capability is achieved.
The foregoing process is described below in connection with another embodiment, but is not limited to the technical solution of the embodiment of the present invention, and specifically, see fig. 4, where 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, and specifically includes:
for edge gateways of different versions, the supported capability is different, for example, the edge gateway with the version number of 1.0.0 only supports the scene condition and scene action of the basic function; the edge gateway with the version number of 2.0.0 can increase scene actions or conditions such as timing, delay and the like on the basis of basic functions; the edge gateway with version number of 3.0.0 can add more scene conditions and scene actions based on the 2.0.0 version edge gateway, that is, along with the upgrading of the version, the capability supported by the edge gateway and the realized scene are more and more abundant, and can bring better use experience for the user (equivalent to the first object).
The foregoing process of upgrading an 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, and specifically, fig. 5 is a schematic flow diagram of an alternative method of upgrading an edge gateway according to an embodiment of the present application; the method specifically comprises the following steps:
Step S501: the scene SDK of the edge gateway initiates upgrading and sends the version number of the edge gateway to the cloud;
step S502: judging whether the version number of the gateway is larger than the original version number, if so, inquiring whether a local scene exists under the gateway, and re-instantiating the local scene; if the number is smaller than the original version number, the scene under the gateway changes to the cloud;
step S503: the cloud instantiates a scene script under the gateway;
step S504: after all the scene instantiations are completed, a scene synchronization notification (equivalent to the preset synchronization command) is issued to the device access gateway;
step S505: the device access gateway forwards a scene synchronization command (corresponding to the preset synchronization command) to a SmartDevice of the edge gateway;
step S506: the SmartDevice of the edge gateway issues a scene synchronous command (corresponding to the preset synchronous command) to the scene SDK of the edge gateway;
step S507: the scene SDK of the edge gateway synchronizes scene instance script information (corresponding to the scene script) and updates;
step S508: updating local scene information;
step S509: reporting the synchronous end of the cloud scene;
step S510: if the scene synchronization fails, issuing scene synchronization retry operation (equivalent to the step of circularly executing upgrading);
Step S511: retry scene synchronization, and issue a scene synchronization command (corresponding to the preset synchronization command) to the device access gateway again;
therefore, through the steps, the problem that the edge gateway in the related technology cannot be upgraded online through the cloud and cannot provide rich edge capability is solved; the technical effect of upgrading the edge gateway on line through the cloud and providing rich edge capability is achieved.
In order to solve the problem that the upgrading process in the related art does not support verification use under gray scale, once the new version is released, the use of all users can be influenced; the following describes the upgrading process of the edge gateway with reference to another embodiment, but is not limited to the technical solution of the embodiment of the present invention, specifically, see fig. 6, and fig. 6 is a flowchart of an optional grayscale upgrading test of the edge gateway according to an embodiment of the present application; the method specifically comprises the following steps:
step 1: a developer (corresponding to the second object) issues a scene SDK latest resource package (corresponding to the latest resource package) to the resource service;
step 1.1: a resource service designating gray level gateway (corresponding to the preset white list);
Step 1.2: packing a scene SDK;
step 2: the 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 (corresponding to the preset white list);
step 2.2: if the edge gateway is in the white list (corresponding to the preset white list), the resource service returns an SDK (corresponding to the latest resource package) under gray scale;
step 2.3: if the edge gateway is not in the white list (corresponding to the preset white list), returning version information of other versions of edge gateways;
step 2.3.1: scene SDK (equivalent to the edge gateway described above) update;
step 2.3.2: and (5) local reinitialization.
Through the steps, a gray gateway white list (corresponding to the preset white list) is designated, when a request of an edge gateway is received, whether the gray gateway is located in the white list (corresponding to the preset white list) is verified, if yes, the gray gateway is issued to the edge gateway, and if not, version information of other versions of the edge gateway is returned; thereby realizing the gray scale upgrade test; and the software system of the edge gateway to be upgraded is conveniently tested and verified in a formal environment.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method of the various embodiments of the present invention.
The embodiment also provides an upgrade device for an edge gateway, which is used for implementing the foregoing embodiments and preferred embodiments, and is not described in detail. 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 following embodiments 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 alternative edge gateway upgrade apparatus according to an embodiment of the present invention, the apparatus comprising:
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 version information currently adopted by the edge gateway when it is determined that the version information to be upgraded is greater than the version information currently adopted by the edge gateway;
and a generating module 76, configured to generate a scenario script according to the historical scenario information and the version information to be upgraded, and send the scenario script to the edge gateway, so as to instruct the edge gateway to upgrade according to the scenario 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 version information currently adopted by 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; 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 instruct the edge gateway to upgrade according to the scene script; by adopting the technical scheme, the problem that an edge gateway in the related technology cannot be upgraded on line through a cloud end and cannot provide abundant edge capability is solved; the technical effect of upgrading the edge gateway on line through the cloud and providing rich edge capability is achieved.
In an exemplary embodiment, the receiving module 72 is further configured to receive an acquisition request sent by the edge gateway; and responding to the acquisition request, and transmitting all version information of the edge gateway to the edge gateway so as to instruct 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 edge gateway sends an acquisition request to the cloud end according to a preset period, and the acquisition request is used for acquiring 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 see all the 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 used by the current edge gateway is 2.0; while the edge gateway has already proposed versions 3.0 and 4.0, the user (corresponding to the first object) worries about unstable versions when the version 3.0 is just on line, and has more problems, and chooses not to upgrade the edge gateway temporarily; after pushing version 4.0, the user (corresponding to the first object) finally decides to upgrade the edge gateway to version 3.0 to experience more functions.
In an exemplary embodiment, the obtaining module 74 is further configured to obtain a preset whitelist, where the whitelist includes: and designating the identification information of the edge gateway, wherein the designated edge gateway is a gateway which allows the acquisition of the latest resource packet issued by the second object and used for upgrading the edge gateway.
In order to ensure the stability of the new version edge gateway, the developer needs to test the function of the new version edge gateway before formally online, so that some appointed test users are required to acquire and upgrade the latest version edge gateway, experience the latest version edge gateway, feed back the use experience and test the performance; the developer sets a white list in advance before the last version of edge gateway is on line, so as to indicate the identification information of the edge gateway of the designated 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 the 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 as to test the latest resource packet by the edge gateway; and sending the latest resource packet to a plurality of edge gateways in the condition that the test is passed, wherein the edge gateways do not comprise the edge gateway.
In order to ensure the stability of the new version edge gateway, the developer needs to test the function of the new version edge gateway before formally online, so that some appointed test users are required to acquire and upgrade the latest version edge gateway, experience the latest version edge gateway, feed back the use experience and test the performance; the developer sets a white list in advance before the last version of edge gateway is on line, so as to indicate the identification information of the edge gateway of the designated test user.
Based on the above steps, the generating module 76 is further configured to determine, according to the version information to be upgraded, function information of an edge gateway of the version to be upgraded, where the function information indicates functions supported by the edge gateway of the version to be upgraded; and instantiating a scene according to the historical scene information and the functional information to obtain the scene script.
Acquiring the capability supported by the version to be upgraded, namely the function of the version edge gateway, re-instantiating the script of the scene according to the acquired function information and the historical scene information of the edge gateway by the cloud, judging whether the edge gateway of the version to be upgraded supports all functions of the scene according to the composition information of the scene, and taking the instantiated script as the scene script if the edge gateway supports all functions of the scene, so that the edge gateway of the version to be upgraded supports the use of the scene under the control of the local control; if the edge gateway only supports part of the functions of the scene, the scene script is regenerated, so that the edge gateway of the version to be upgraded acquires part of the functions which are not supported by the edge gateway from the cloud on line.
In addition, the generating module 76 is further configured to forward, through the device access gateway, a preset synchronization command to the edge gateway to instruct the edge gateway to request to obtain 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 acquires the scene script, confirming whether an upgrading result of the edge gateway sent by the edge gateway is received or not.
After generating the scene script, the cloud end transmits a scene synchronous command (corresponding to the preset synchronous command) to the equipment access gateway, the equipment access gateway converts the format of the scene synchronous command (corresponding to the preset synchronous command) and then forwards the converted command to the edge gateway, so that the edge gateway is indicated to generate the scene script, the edge gateway requests to acquire the scene script from the cloud end according to the identification information carried in the scene synchronous command (corresponding to the preset synchronous command), and upgrades according to the scene script; and under the condition that the edge gateway acquires 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 step of upgrading: if the received upgrading result of the edge gateway is failure, forwarding the preset synchronous command to the edge gateway through the equipment access gateway again so as to re-upgrade the edge gateway; and circularly executing the upgrading step, and stopping the re-upgrading when 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, executing an upgrading step: forwarding a preset synchronous command to the edge gateway through the equipment access gateway again to instruct the edge gateway to upgrade again; if the received upgrading result still fails, continuing to execute the upgrading step; if the number of times of execution of the upgrade step exceeds a preset threshold, for example, 3 times, stopping the process of re-upgrade.
Embodiments of the present invention also provide a computer readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
Alternatively, in the present embodiment, the above-described storage medium may be configured to store a computer program for performing 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;
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 instruct the edge gateway to upgrade according to the scene script.
In one exemplary embodiment, the computer readable storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
Specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the exemplary implementation, and this embodiment is not described herein.
An embodiment of the invention also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
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;
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 instruct the edge gateway to upgrade according to the scene script.
In an exemplary embodiment, the electronic apparatus may further include a transmission device connected to the processor, and an input/output device connected to the processor.
Specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the exemplary implementation, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may be implemented in program code executable by computing devices, so that they may be stored in a storage device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps 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 merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application and are intended to be comprehended within the scope of the present application.

Claims (9)

1. An edge gateway upgrading method is characterized by comprising 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;
acquiring historical scene information corresponding to the version information currently adopted by 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;
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 instruct the edge gateway to upgrade according to the scene script;
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 transmitting all version information of the edge gateway to the edge gateway so as to instruct 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.
2. The method for upgrading an edge gateway according to claim 1, wherein before receiving the acquisition request sent by the edge gateway, the method further comprises:
obtaining a preset white list, wherein the white list comprises: and designating the identification information of the edge gateway, wherein the designated edge gateway is a gateway which allows the acquisition of the latest resource packet issued by the second object and used for upgrading the edge gateway.
3. The method for upgrading an edge gateway according to claim 2, 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 as to test the latest resource packet by the edge gateway;
and sending the latest resource packet to a plurality of edge gateways in the condition that the test is passed, wherein the edge gateways do not comprise the edge gateway.
4. The method for upgrading an edge gateway according to claim 1, wherein generating a scene script according to the history scene information and the version information to be upgraded comprises:
Determining the 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 the functions supported by the edge gateway of the version to be upgraded;
and instantiating a scene according to the historical scene information and the functional information to obtain the scene script.
5. 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:
forwarding a preset synchronous command to the edge gateway through the equipment access gateway under the condition that the scene script is generated, so as to instruct the edge gateway to request to acquire the scene script from a cloud server, and upgrading the scene script 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 acquires the scene script, confirming whether an upgrading result of the edge gateway sent by the edge gateway is received or not.
6. The method for upgrading an edge gateway according to claim 5, wherein after confirming whether the upgrading result of the edge gateway sent by the edge gateway is received, the method further comprises:
An upgrading step: if the received upgrading result of the edge gateway is failure, forwarding the preset synchronous command to the edge gateway through the equipment access gateway again so as to re-upgrade the edge gateway;
and circularly executing the upgrading step, and stopping the re-upgrading when the number of times of executing the upgrading step exceeds a preset threshold value.
7. An upgrade apparatus for an edge gateway, comprising:
the receiving module is used for receiving a registration request sent by an edge gateway, wherein 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 version information currently adopted by 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;
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 instruct the edge gateway to upgrade according to the scene script;
the receiving module is further configured to send all version information of the edge gateway to the edge gateway in response to the obtaining request, so as to instruct the edge gateway to determine the version information to be upgraded from all version information according to a selection operation of the first object.
8. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored program, wherein the program when run performs the method of any one of claims 1 to 6.
9. 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 according to any of claims 1 to 6 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 CN115277412A (en) 2022-11-01
CN115277412B true 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
CN115277412A (en) 2022-11-01

Similar Documents

Publication Publication Date Title
CN114697150B (en) Command issuing method and device, storage medium and electronic device
CN115277412B (en) Edge gateway upgrading method and device, storage medium and electronic device
CN114938365A (en) Method and device for updating functional module, storage medium and electronic device
CN115309062A (en) Device control method, device, storage medium, and electronic apparatus
CN115167160A (en) Device control method and apparatus, device control system, and storage medium
CN116360584A (en) Virtual target product generation method and device, storage medium and electronic device
CN115297103B (en) Method and device for acquiring logic constraint file, storage medium and electronic device
CN114697345B (en) Information updating method and device, storage medium and electronic device
CN115001885B (en) Equipment control method and device, storage medium and electronic device
CN115296948B (en) Scene information updating method and device, storage medium and electronic device
CN115296947B (en) Control command response method and device, storage medium and electronic device
CN115484116B (en) Processing method and device of equipment data, storage medium and electronic device
CN116248647A (en) Method and device for sending resource package, storage medium and electronic device
CN114826899B (en) Debugging method and device for equipment control service, storage medium and electronic device
CN109884907A (en) Household appliance state broadcasting method, device and equipment
CN115174513B (en) Message pushing method and device, storage medium and electronic device
CN115190018B (en) Method and device for playing upgrade prompt information, storage medium and electronic device
CN115484119B (en) Control method and device of equipment, storage medium and electronic device
CN115460060B (en) Device upgrading method and device of intelligent device, storage medium and electronic device
CN114928645B (en) Resource package processing method and device, storage medium and electronic device
CN115002014B (en) Method and device for determining test result, storage medium and electronic device
CN115473753A (en) Control method and device of gateway equipment, storage medium and electronic device
CN116541012A (en) Basic parameter modification method and device, storage medium and electronic device
CN116257281A (en) Firmware upgrading method of intelligent household appliance, storage medium and electronic device
CN116436861A (en) Message sending method and device, 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