CN115174382A - Equipment upgrading method, storage medium and electronic device - Google Patents

Equipment upgrading method, storage medium and electronic device Download PDF

Info

Publication number
CN115174382A
CN115174382A CN202210599919.1A CN202210599919A CN115174382A CN 115174382 A CN115174382 A CN 115174382A CN 202210599919 A CN202210599919 A CN 202210599919A CN 115174382 A CN115174382 A CN 115174382A
Authority
CN
China
Prior art keywords
access
gateway node
access gateway
equipment
node
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
CN202210599919.1A
Other languages
Chinese (zh)
Other versions
CN115174382B (en
Inventor
李京涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202210599919.1A priority Critical patent/CN115174382B/en
Publication of CN115174382A publication Critical patent/CN115174382A/en
Application granted granted Critical
Publication of CN115174382B publication Critical patent/CN115174382B/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
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses an equipment upgrading method, a storage medium and an electronic device, and relates to the technical field of smart families, wherein the equipment upgrading method comprises the following steps: under the condition of receiving a offline instruction sent by a first access gateway node, sending a network access address allocation request to a main gateway of equipment, wherein a network channel is established between the first access gateway node and the equipment; acquiring a target address sent by a device main gateway responding to the network access address allocation request, and accessing a second access gateway node according to the target address, wherein the target address is used for indicating that the gateway state is an upgraded access gateway node; and under the condition that the second access gateway node is successfully accessed, closing a network channel between the equipment and the first access gateway node according to the offline instruction so as to finish upgrading the equipment.

Description

Equipment upgrading method, storage medium and electronic device
Technical Field
The application relates to the technical field of smart homes, in particular to an equipment upgrading method, a storage medium and an electronic device.
Background
At present, with the development of the era of the internet of things, services provided by intelligent equipment are beneficial to thousands of households, and people can enjoy the convenience brought by the intelligent equipment all the time, so that people need equipment capable of stably running all the time, but in the related technology, the equipment gateway service of the internet of things platform needs to be stopped at the cloud end when being upgraded and updated, and the gateway service is restarted after the upgraded and updated new version is on line. In the process that the cloud end stops providing the device gateway service, the problems that the device cannot be used normally, such as device drop, unstable device cloud connection and the like, exist, the risk of service interruption exists under the condition that the device cannot be used normally due to restarting operation during platform service upgrading, the normal use of the device by a user is influenced, the experience feeling of the user is reduced, even the complaint of the user is caused, and the reputation of an enterprise is influenced.
Therefore, no effective solution has been proposed for the problem of how to upgrade the device in the case of normal use of the device in the related art.
Disclosure of Invention
The embodiment of the application provides an equipment upgrading method, a storage medium and an electronic device, so as to at least solve the problem of how to upgrade equipment under the condition that the equipment is normally used in the related art.
According to an embodiment of the present application, there is provided an apparatus upgrade method including: under the condition of receiving a offline instruction sent by a first access gateway node, sending a network access address allocation request to a main gateway of equipment, wherein a network channel is established between the first access gateway node and the equipment; acquiring a target address sent by the device main gateway responding to the network access address allocation request, and accessing a second access gateway node according to the target address, wherein the target address is used for indicating that the gateway state is an upgraded access gateway node; and under the condition that the second access gateway node is successfully accessed, closing a network channel between the equipment and the first access gateway node according to the offline instruction, thereby finishing upgrading the equipment.
In one exemplary embodiment, before sending the network access address assignment request to the device host gateway, the method further comprises: and determining that the first access gateway node receives an offline indication sent by a Gateway Management Service (GMS), wherein the GMS issues the offline indication when monitoring that the connection number of the first access gateway node is smaller than a first number.
In one exemplary embodiment, before sending the network access address assignment request to the device host gateway, the method further comprises: determining an execution progress of the execution task in case it is determined that the device accessing the first access gateway node has an execution task; and under the condition that the execution progress is completed, sending a network access address allocation request to the equipment main gateway by one of the following modes: sending a request to the device primary gateway by the device accessing the first access gateway node; determining a proxy device from the plurality of devices accessing the first access gateway node, and sending a request to the device master gateway through the proxy device.
In one exemplary embodiment, the method further comprises: receiving a plurality of target addresses sent by the device master gateway, where the target addresses are sent by the device master gateway in response to the network access address allocation requests, and each of the target addresses corresponds to a device address of each of the devices in the plurality of devices; and respectively sending the target addresses to equipment with equipment addresses in one-to-one correspondence.
According to another embodiment of the present application, there is also provided an apparatus upgrading method, including: receiving a network access address allocation request sent by equipment, and determining a second access gateway node corresponding to the equipment; and sending a target address corresponding to the second access gateway node to the device to instruct the device to access the second access gateway node according to the target address, and closing a network channel between the device and the first access gateway node according to a offline instruction under the condition that the second access gateway node is successfully accessed, so as to complete the upgrade of the device, wherein the target address is used for instructing that the gateway state is the address of the upgraded access gateway node.
In one exemplary embodiment, determining the second access gateway node to which the device corresponds includes: acquiring a plurality of third access gateway nodes with the updated gateway states from the gateway management service GMS; and determining a second access gateway node corresponding to the device from the third access gateway node according to a preset configuration relationship, wherein the preset configuration relationship represents a corresponding relationship between access gateway nodes connected with the same logical node in the gateway management service GMS, and the access gateway nodes connected with the same logical node at least include the first access gateway node and the second access gateway node.
In an exemplary embodiment, before sending the destination address corresponding to the second access network joint point to the device, the method includes: determining the number of the devices which support the access of the second access gateway node as a first preset threshold value, and determining a second number of the devices which send the network access address allocation request; determining a target address corresponding to the second access network joint point under the condition that the second number of the equipment is smaller than the first preset threshold value; and under the condition that the second quantity of the equipment is greater than the first preset threshold value, locking the second access gateway node, and determining a target address corresponding to the second access gateway node from the target addresses of the access gateway nodes with the other gateway states being upgraded.
In an exemplary embodiment, determining a destination address corresponding to the second access gateway node from destination addresses of access gateway nodes whose other gateway states are upgraded includes: determining a fourth access gateway node from the access gateway node with the upgraded state of the other gateways, and determining the number of devices which are supported by the fourth access gateway node to be accessed as a second preset threshold; determining a target address corresponding to the fourth access network joint point as a target address corresponding to the second access network joint point under the condition that the second number of the devices is smaller than the second preset threshold; or, when the second number of the devices is greater than the first preset threshold, locking the second access gateway node, determining a fifth access gateway node from the other gateway state to the upgraded access gateway node, and determining the number of devices that the fifth access gateway node supports access as a third preset threshold; and under the condition that the difference value between the second number and the first preset threshold is smaller than a third preset threshold, sending the target address corresponding to the second access network joint point to the second number of equipment, and determining the target address corresponding to the fifth access network joint point as the target address corresponding to the second access network joint point.
In an exemplary embodiment, sending the destination address corresponding to the second access network joint point to the device includes: determining a sending sequence number for sending the target address to the device according to the receiving time of the network access address allocation request, wherein the smallest sending sequence number corresponds to the earliest receiving time; sending the target address corresponding to the second access network joint point to the equipment according to the sending sequence number; under the condition that the number of the instructions to be processed of the equipment is larger than a fourth preset threshold value, the sending sequence number of the equipment is adjusted to be minimum; or, under the condition that the equipment grade of the equipment is determined to be greater than a fifth preset threshold value, the sending sequence number of the equipment is adjusted to be the minimum; or, in the case that it is determined that the transmission priority of the device address of the device is higher than a sixth preset threshold, the transmission sequence number of the device is adjusted to be minimum.
In one exemplary embodiment, the method further comprises: determining whether a gateway service of the second access gateway node is operating normally, in the event that successful access to the second access gateway node is determined; and under the condition that the gateway service is determined to be abnormally operated, switching a second access gateway node bound by the logic node corresponding to the target equipment into the first access gateway node.
According to another embodiment of the present application, there is also provided an apparatus upgrade system including: the first access gateway node is used for sending a offline instruction to the equipment; the device is connected with the first access gateway node and used for sending a network access address allocation request to a device main gateway under the condition of receiving a offline instruction sent by the first access gateway node; the device main gateway is connected with the device and used for receiving a network access address allocation request sent by the device and determining a second access gateway node corresponding to the device; sending the target address corresponding to the second access network joint point to the equipment; wherein, the target address is used for indicating that the gateway state is the upgraded access gateway node; the device is further configured to access the second access gateway node according to the target address, and close a network channel between the device and the first access gateway node according to the offline instruction when it is determined that the second access gateway node is successfully accessed.
In one exemplary embodiment, the system further comprises: a gateway management service GMS for providing a plurality of gateway states to the device master gateway as upgraded access gateway nodes; controlling the first access gateway node to send a offline instruction to the device; and obtaining a correspondence between the first access gateway node and the second access gateway node by connecting the first access gateway node and the second access gateway node to the same logical node, wherein the logical node has a binding relationship with the device; and acquiring that the node state of the device under the first access gateway node is occupied.
In an exemplary embodiment, the GMS is further configured to monitor a connection number of devices connected to the first access gateway node; and under the condition that the connection quantity is smaller than the third quantity, acquiring uplink flow values between the plurality of devices and the first access gateway node, and if the uplink flow values are smaller than a preset value and the logical node is successfully unbundled with the first access gateway node, closing the network service of the first access gateway node.
According to another aspect of the embodiments of the present application, there is also provided a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned device upgrading method when running.
According to another aspect of the embodiments of the present application, there is also provided an electronic apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the device upgrade method through the computer program.
In the embodiment of the application, a network access address allocation request is sent to a main gateway of a device under the condition that a offline instruction sent by a first access gateway node is received, wherein the first access gateway node and the device already establish a network channel; acquiring a target address sent by the device main gateway responding to the network access address allocation request, and accessing a second access gateway node according to the target address, wherein the target address is used for indicating that the gateway state is an upgraded access gateway node; and under the condition that the second access gateway node is successfully accessed, closing a network channel between the equipment and the first access gateway node according to the offline instruction, thereby finishing upgrading the equipment. By adopting the technical scheme, the problem of how to upgrade the equipment under the condition that the equipment is normally used in the related technology is solved, and then the equipment can be upgraded when the equipment is normally used, so that the user experience is improved.
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 a device upgrade method according to an embodiment of the present application;
FIG. 2 is a flow chart (one) of a device upgrade method according to an embodiment of the present application;
FIG. 3 is a flow chart of a device upgrade method according to an embodiment of the present application (II);
FIG. 4 is a schematic diagram (one) of a device upgrade process according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a device upgrade process according to an embodiment of the present application (two);
fig. 6 is a schematic structural diagram of a device upgrade system according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the accompanying drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. 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 an embodiment of the present application, a device upgrade method is provided. The equipment upgrading method is widely applied to full-House intelligent digital control application scenes such as intelligent homes (Smart Home), intelligent homes, intelligent Home equipment ecology, intelligent residence (Intelligent House) ecology and the like. Alternatively, in this embodiment, the device upgrade method 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, provide a database on or independent of the server for providing a data storage service for the server 104, and configure a cloud computing and/or edge computing service on or independent of the server for providing a data operation service for the server 104.
The network may include, but is not limited to, at least one of: wired networks, wireless networks. The wired network may include, but is not limited to, at least one of: wide area networks, metropolitan area networks, local area networks, which may include, but are not limited to, at least one of the following: WIFI (Wireless Fidelity), bluetooth. Terminal equipment 102 can be but not limited to be PC, the cell-phone, the panel computer, intelligent air conditioner, intelligent cigarette machine, intelligent refrigerator, intelligent oven, intelligent kitchen range, intelligent washing machine, intelligent water heater, intelligent washing equipment, intelligent dish washer, intelligent projection equipment, intelligent TV, intelligent clothes hanger, intelligent (window) curtain, intelligence audio-visual, smart jack, intelligent stereo set, intelligent audio amplifier, intelligent new trend equipment, intelligent kitchen guarding equipment, intelligent bathroom equipment, intelligence robot of sweeping the floor, intelligence robot of wiping the window, intelligence robot of mopping the ground, intelligent air purification equipment, intelligent steam ager, intelligent microwave oven, intelligent kitchen is precious, intelligent clarifier, intelligent water dispenser, intelligent lock etc..
In this embodiment, an apparatus upgrading method using an apparatus as an execution main body is provided, and is applied to the computer terminal, and fig. 2 is a flowchart of the apparatus upgrading method according to the embodiment of the present application, where the flowchart includes the following steps:
step S202: under the condition of receiving a offline instruction sent by a first access gateway node, sending a network access address allocation request to a main gateway of equipment, wherein a network channel is established between the first access gateway node and the equipment;
step S204: acquiring a target address sent by the device main gateway responding to the network access address allocation request, and accessing a second access gateway node according to the target address, wherein the target address is used for indicating that the gateway state is an upgraded access gateway node;
step S206: and under the condition that the second access gateway node is successfully accessed, closing a network channel between the equipment and the first access gateway node according to the offline instruction, thereby finishing upgrading the equipment.
Through the steps, a network access address allocation request is sent to the equipment main gateway under the condition that a offline instruction sent by a first access gateway node is received, wherein the first access gateway node and the equipment establish a network channel; acquiring a target address sent by the device main gateway responding to the network access address allocation request, and accessing a second access gateway node according to the target address, wherein the target address is used for indicating that the gateway state is an upgraded access gateway node; and under the condition that the second access gateway node is successfully accessed, closing a network channel between the equipment and the first access gateway node according to the offline instruction, thereby completing the upgrading of the equipment, solving the problem of how to upgrade the equipment under the condition that the equipment is normally used in the related technology, upgrading the equipment while the equipment is normally used, and improving the user experience.
It should be noted that the access gateway node whose gateway status is updated may be a preset updated gateway node, or may be a gateway node obtained by performing device gateway service update on a first access gateway node that closes a network channel between a device and the first access gateway node after closing the network channel between the device and the first access gateway node according to an offline instruction.
In an exemplary embodiment, it may be further determined that the first access gateway node receives an offline indication sent by a gateway management service GMS before sending a network access address allocation request to a device main gateway, where the GMS issues the offline indication when monitoring that the number of connections of the first access gateway node is smaller than a first number.
In an exemplary embodiment, a technical solution before sending a network access address assignment request to a device main gateway is further provided, specifically: determining an execution progress of the execution task in case it is determined that the device accessing the first access gateway node has an execution task; and under the condition that the execution progress is completed, sending a network access address allocation request to the equipment main gateway by one of the following modes: sending a request to the device host gateway through the device accessing the first access gateway node; determining a proxy device from the plurality of devices accessing the first access gateway node, and sending a request to the device master gateway through the proxy device.
In one embodiment, in the event that it is determined that the execution progress is incomplete and is an executing task, continuing to execute the incomplete and executing task until it is determined that the execution progress of the executing task of the device accessing the first access gateway node is incomplete and updated to complete for execution.
In one embodiment, when it is determined that the execution progress is incomplete and is an execution task to be executed, the processing of all the execution progress as incomplete and is a task to be executed is suspended, all the execution progress as incomplete and is a task to be executed list, and after it is determined that the device successfully accesses the second access gateway node, the execution task of the task to be executed list is continuously executed.
In one exemplary embodiment, the method further comprises: receiving a plurality of target addresses sent by the master device gateway, where the plurality of target addresses are sent by the master device gateway in response to the plurality of network access address allocation requests, and each of the plurality of target addresses corresponds to a device address of each of the plurality of devices one to one; and respectively sending the target addresses to equipment with equipment addresses in one-to-one correspondence.
In this embodiment, a device upgrade method using a device main gateway as an execution main body is further provided, as shown in fig. 3, fig. 3 is a flowchart of the device upgrade method according to the embodiment of the present application, where the flowchart includes the following steps:
step S302: receiving a network access address allocation request sent by equipment, and determining a second access gateway node corresponding to the equipment;
step S304: and sending a target address corresponding to the second access gateway node to the device to indicate the device to access the second access gateway node according to the target address, and closing a network channel between the device and the first access gateway node according to a offline instruction under the condition that the successful access of the second access gateway node is determined, so as to finish the upgrading of the device, wherein the target address is used for indicating that the gateway state is the address of the upgraded access gateway node.
Through the steps, a second access gateway node corresponding to the equipment is determined by receiving a network access address allocation request sent by the equipment; and sending a target address corresponding to the second access gateway node to the device to instruct the device to access the second access gateway node according to the target address, and closing a network channel between the device and the first access gateway node according to a offline instruction under the condition that the second access gateway node is successfully accessed, so as to complete upgrading of the device, wherein the target address is used for instructing the gateway state to be the address of the upgraded access gateway node, so that the problem of how to upgrade the device under the condition that the device is normally used in the related technology is solved, the device can be upgraded while the device is normally used, the user experience is improved, and the continuity of providing gateway service of the device is improved.
In one exemplary embodiment, determining the second access gateway node to which the device corresponds includes: acquiring a plurality of third access gateway nodes with the gateway states being updated from the gateway management service GMS; and determining a second access gateway node corresponding to the device from the third access gateway node according to a preset configuration relationship, wherein the preset configuration relationship represents a corresponding relationship between access gateway nodes connected with the same logical node in the gateway management service GMS, and the access gateway nodes connected with the same logical node at least include the first access gateway node and the second access gateway node.
In an exemplary embodiment, before sending the destination address corresponding to the second access network joint point to the device, the method includes: determining the number of the devices which are supported to be accessed by the second access gateway node as a first preset threshold value, and determining a second number of the devices which send the network access address allocation request; determining a target address corresponding to the second access network joint point under the condition that the second number of the equipment is smaller than the first preset threshold value; and under the condition that the second number of the equipment is greater than the first preset threshold value, locking the second access gateway node, and determining a target address corresponding to the second access gateway node from the target addresses of the access gateway nodes with other gateway states being upgraded.
For example, the number of devices that the second access gateway node supports to access is 10, and the second number of devices that send the network access address allocation request is 5, it may be determined that the number of devices that send the network access address allocation request is currently within the tolerable range of the second access gateway node, so that the target address corresponding to the second access gateway node is directly sent to the devices.
If the second number of the devices sending the network access address allocation request is determined to be 20, the current number of the devices sending the network access address allocation request exceeds the bearable range of the second access gateway node, the second access gateway node needs to be locked, and the destination address corresponding to the second access gateway node is determined from the destination addresses of the access gateway nodes which can bear the current number of the devices sending the network access address allocation request and are selected from the access gateway nodes with the updated gateway states.
In an exemplary embodiment, determining a destination address corresponding to the second access gateway node from destination addresses of access gateway nodes whose other gateway states are upgraded includes: determining a fourth access gateway node from the access gateway node with the upgraded state of the other gateways, and determining the number of devices which are supported by the fourth access gateway node to be accessed as a second preset threshold; determining a target address corresponding to the fourth access network joint point as a target address corresponding to the second access network joint point under the condition that the second number of the devices is smaller than the second preset threshold; or, when the second number of the devices is greater than the first preset threshold, locking the second access gateway node, determining a fifth access gateway node from the other gateway state to the upgraded access gateway node, and determining the number of devices that the fifth access gateway node supports access as a third preset threshold; and under the condition that the difference value between the second number and the first preset threshold is smaller than a third preset threshold, sending the target address corresponding to the second access network joint point to the second number of devices, and determining the target address corresponding to the fifth access network joint point as the target address corresponding to the second access network joint point.
For example, the number of the devices that the second access gateway node supports to access is 10, the second number of the devices that send the network access address allocation request is 20, the number of the devices that the fourth access gateway node supports to access is 40, and a target address corresponding to the fourth access gateway node may be determined as a target address corresponding to the second access gateway node. If the number of the devices which support the access by the fourth access gateway node is 15, and the number of the devices which support the access by the fifth access gateway node is determined to be 20, the target address corresponding to the second access gateway node is sent to the devices with the second number, and the target address corresponding to the fifth access gateway node is determined to be the target address corresponding to the second access gateway node.
In an exemplary embodiment, sending the destination address corresponding to the second access network joint point to the device includes: determining a sending sequence number for sending the target address to the device according to the receiving time of the network access address allocation request, wherein the smallest sending sequence number corresponds to the earliest receiving time; sending the target address corresponding to the second access network joint point to the equipment according to the sending sequence number; under the condition that the number of the instructions to be processed of the equipment is larger than a fourth preset threshold value, the sending sequence number of the equipment is adjusted to be minimum; or, under the condition that the equipment grade of the equipment is determined to be greater than a fifth preset threshold value, the sending sequence number of the equipment is adjusted to be the minimum; or, in the case that it is determined that the transmission priority of the device address of the device is higher than a sixth preset threshold, the transmission sequence number of the device is adjusted to be minimum.
In one exemplary embodiment, the method further comprises: determining whether a gateway service of the second access gateway node is operating normally, in the event that successful access to the second access gateway node is determined; and under the condition that the gateway service is determined to be abnormally operated, switching a second access gateway node bound by the logic node corresponding to the target equipment into the first access gateway node.
By the method and the device, whether the operation of the upgraded equipment gateway service is normal can be monitored, if the operation is abnormal, the equipment gateway service before the upgrade can be backed up urgently, and the usability of the equipment gateway service can be guaranteed.
In order to better understand the process of the device upgrading method, the following describes a flow of the device upgrading method with reference to an optional embodiment, but the flow is not limited to the technical solution of the embodiment of the present application.
In this embodiment, an apparatus upgrading method is provided, and before upgrading an apparatus, the following preparation work is required:
1) Determining that the device can normally receive and process a offline instruction issued by a cloud (equivalent to the first access gateway node), actively sending a network access address allocation request to the device main gateway, accessing a second access gateway node according to a target address sent by the device main gateway responding to the network access address allocation request, and closing a network channel between the device and the first access gateway node by the offline instruction, namely disconnecting the network connection with the first access gateway node.
2) As shown in fig. 4, fig. 4 is a schematic diagram (i) of an apparatus upgrading method according to an embodiment of the present application, where a correspondence between a gateway logical node (equivalent to the logical node) and a gateway physical node (equivalent to the access gateway node) is configured in advance in a GMS database, that is, a physical node table and a logical node table having a one-to-one correspondence in fig. 4:
(1) the gateway logical node is a virtual service layer concept, and service processing (such as service distribution) is more flexible through one virtual node.
(2) The gateway physical node, i.e. the gateway process (e.g. the first access gateway node) that is actually running. The new physical node, the old physical node in fig. 4 may be included.
3) A server is prepared in advance as a streaming server, and an upgraded access gateway node is configured on the streaming server.
Through the preparation work, the problem that the device is accessed to the first access gateway node and the second access gateway node at the same time, but the destination addresses of the first access gateway node and the second access gateway node are different, so that the consistent hash value distribution of the device is changed can be solved. The method can also realize the 'replacement' of gateway service nodes one by one, namely after all gateway service nodes on one server are replaced, the vacant servers are continuously used as the circulation servers and are sequentially operated one by one until all servers are updated.
Fig. 5 is a schematic diagram (ii) of an apparatus upgrading method according to an embodiment of the present application, as shown in fig. 5, specifically including the following steps:
step S1, a new access gateway node (equivalent to the second access gateway node) is deployed through the GMS:
a1, deploying a new version of equipment access gateway service on a streaming server.
And A2, updating the new access gateway node association to the gateway logical node.
A3, GMS adjusts the access strategy of the old equipment access gateway (equivalent to the first access gateway node) and carries out offline processing.
Step S2, sending an offline notification (namely the offline instruction) to the equipment through the old equipment access gateway:
b1, the old equipment access gateway stops receiving the new equipment connection;
and B2, the old equipment access gateway adopts a mode of actively sending a notification to notify the equipment that the gateway needs to be offline.
Step S3, the offline notification is processed through the equipment:
c1, after the device receives the offline notification, processing the ongoing instruction;
c2, requesting the main gateway of the equipment to acquire the address (namely the destination address) of a new access gateway node;
c3, starting address connection of the new gateway node, and connecting the gateway node to the online;
and C4, disconnecting the address connection of the old equipment access gateway.
Step S4, the gateway service of the old equipment access gateway is closed through the GMS:
d1, GMS monitors the device connection number of the old device access gateway, and when all the devices are monitored to be offline and no new flow enters any more, the gateway service of the old device access gateway is stopped and closed.
Through the steps, the new and old physical service nodes are used for replacing an upgrading scheme, and at least one effective and available connecting channel is realized in the equipment gateway service version-issuing upgrading process, so that the equipment can normally run in the period, and the use experience of a user is improved.
In one embodiment, two or more physical nodes can be prepared to maintain and update the logical nodes, and the logical nodes can be updated in parallel, so that the updating time efficiency is improved.
In one embodiment, under the condition of gray release upgrading for a new version of gateway service, only a physical node corresponding to one logical node can be upgraded, and the service abnormal risk brought by upgrading is reduced.
In one embodiment, after the device accesses a new access gateway node and finishes upgrading, the GMS may monitor whether the device gateway service of the new access gateway node is normal, and if not, the GMS may urgently fallback the device gateway service of the old access gateway node.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present application or portions thereof that contribute to the prior art may be embodied in the form of a software product, where the computer software product is stored in a storage medium (such as a ROM/RAM, a magnetic disk, and an optical disk), and includes several instructions for enabling a terminal device (which may be a mobile phone, a computer, a server, or a network device) to execute the method of the embodiments of the present application.
Fig. 6 is a schematic structural diagram of a device upgrade system according to an embodiment of the present application. As shown in fig. 6, includes:
a first access gateway node 602, configured to send a logoff instruction to a device;
the device 604, connected to the first access gateway node, is configured to send a network access address allocation request to a device host gateway when receiving a logoff instruction sent by the first access gateway node;
the device main gateway 606 is connected to the device, and configured to receive a network access address allocation request sent by the device, and determine a second access gateway node 608 corresponding to the device; sending the target address corresponding to the second access network joint point to the equipment;
the target address is used for indicating that the gateway state is the upgraded access gateway node; the device is further configured to access the second access gateway node according to the target address, and close a network channel between the device and the first access gateway node according to the offline instruction when it is determined that the second access gateway node is successfully accessed.
Through the system, under the condition of receiving a offline instruction sent by the first access gateway node, sending a network access address allocation request to the equipment main gateway through equipment, receiving the network access address allocation request sent by the equipment main gateway, and determining a second access gateway node corresponding to the equipment; and sending the target address corresponding to the second access gateway node to the device, accessing the second access gateway node by the device according to the target address, and closing a network channel between the device and the first access gateway node according to the offline instruction under the condition that the second access gateway node is successfully accessed, so that the problem of how to upgrade the device under the condition that the device is normally used in the related art is solved, the device can be upgraded while the device is normally used, and the user experience is improved.
In one exemplary embodiment, the system further comprises: a gateway management service GMS for providing a plurality of access gateway nodes with an updated gateway status to the device host gateway; controlling the first access gateway node to send a offline instruction to the device; and obtaining a correspondence between the first access gateway node and the second access gateway node by connecting the first access gateway node and the second access gateway node to the same logical node, wherein the logical node has a binding relationship with the device; and acquiring that the node state of the device under the first access gateway node is occupied.
In an exemplary embodiment, the GMS is further configured to monitor a number of connections of devices connected to the first access gateway node; and under the condition that the connection quantity is smaller than the third quantity, acquiring uplink flow numerical values between the plurality of devices and the first access gateway node, and if the uplink flow numerical values are smaller than a preset numerical value and the logical node and the first access gateway node are successfully unbound, closing the network service of the first access gateway node.
Embodiments of the present application also provide a storage medium including a stored program, where the program performs any one of the methods described above when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store program codes for performing the following steps:
s1, under the condition that a offline instruction sent by a first access gateway node is received, sending a network access address allocation request to a main gateway of equipment, wherein a network channel is established between the first access gateway node and the equipment;
s2, acquiring a target address sent by the main gateway of the equipment responding to the network access address allocation request, and accessing a second access gateway node according to the target address, wherein the target address is used for indicating that the gateway state is the upgraded access gateway node;
and S3, under the condition that the second access gateway node is successfully accessed, closing a network channel between the equipment and the first access gateway node according to the offline instruction, thereby finishing upgrading the equipment.
Optionally, in another embodiment, the storage medium may be further configured to store program codes for performing the following steps:
s1, receiving a network access address allocation request sent by equipment, and determining a second access gateway node corresponding to the equipment;
s2, sending a target address corresponding to the second access gateway node to the device to indicate the device to access the second access gateway node according to the target address, and closing a network channel between the device and the first access gateway node according to a offline instruction under the condition that the successful access of the second access gateway node is determined, so as to complete the upgrade of the device, wherein the target address is used for indicating that the gateway state is the address of the upgraded access gateway node.
Embodiments of the present application further provide an electronic device, comprising a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the method embodiments described above.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, under the condition that a offline instruction sent by a first access gateway node is received, sending a network access address allocation request to a main gateway of equipment, wherein a network channel is established between the first access gateway node and the equipment;
s2, acquiring a target address sent by the main gateway of the equipment in response to the network access address allocation request, and accessing a second access gateway node according to the target address, wherein the target address is used for indicating that the gateway state is the upgraded access gateway node;
and S3, under the condition that the second access gateway node is successfully accessed, closing a network channel between the equipment and the first access gateway node according to the offline instruction, thereby finishing upgrading the equipment.
Optionally, in other embodiments, the processor may be further configured to execute the following steps by a computer program:
s1, receiving a network access address allocation request sent by equipment, and determining a second access gateway node corresponding to the equipment;
s2, sending a target address corresponding to the second access gateway node to the device to indicate the device to access the second access gateway node according to the target address, and closing a network channel between the device and the first access gateway node according to a offline instruction under the condition that the successful access of the second access gateway node is determined, so as to complete the upgrade of the device, wherein the target address is used for indicating that the gateway state is the address of the upgraded access gateway node.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing program codes, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present application described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
The foregoing is only a preferred embodiment of the present application and it should be noted that, 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 (15)

1. A method for upgrading a device, comprising:
under the condition of receiving a offline instruction sent by a first access gateway node, sending a network access address allocation request to a main gateway of equipment, wherein a network channel is established between the first access gateway node and the equipment;
acquiring a target address sent by the device main gateway responding to the network access address allocation request, and accessing a second access gateway node according to the target address, wherein the target address is used for indicating that the gateway state is an upgraded access gateway node;
and under the condition that the second access gateway node is successfully accessed, closing a network channel between the equipment and the first access gateway node according to the offline instruction, thereby finishing upgrading the equipment.
2. The device upgrade method according to claim 1, wherein before sending the network access address assignment request to the device host gateway, the method further comprises:
and determining that the first access gateway node receives an offline indication sent by a Gateway Management Service (GMS), wherein the GMS issues the offline indication when monitoring that the connection number of the first access gateway node is smaller than a first number.
3. The device upgrade method according to claim 1, wherein before sending the network access address assignment request to the device host gateway, the method further comprises:
determining an execution progress of the execution task in case it is determined that the device accessing the first access gateway node has an execution task;
and under the condition that the execution progress is completed, sending a network access address allocation request to the equipment main gateway by one of the following modes:
sending a request to the device host gateway through the device accessing the first access gateway node;
determining a proxy device from the plurality of devices accessing the first access gateway node, and sending a request to the device master gateway through the proxy device.
4. The device upgrade method according to claim 3, further comprising:
receiving a plurality of target addresses sent by the master device gateway, where the plurality of target addresses are sent by the master device gateway in response to the plurality of network access address allocation requests, and each of the plurality of target addresses corresponds to a device address of each of the plurality of devices one to one;
and respectively sending the target addresses to equipment with equipment addresses in one-to-one correspondence.
5. A method for upgrading a device, comprising:
receiving a network access address allocation request sent by equipment, and determining a second access gateway node corresponding to the equipment;
and sending a target address corresponding to the second access gateway node to the device to indicate the device to access the second access gateway node according to the target address, and closing a network channel between the device and the first access gateway node according to a offline instruction under the condition that the successful access of the second access gateway node is determined, so as to finish the upgrading of the device, wherein the target address is used for indicating that the gateway state is the address of the upgraded access gateway node.
6. The device upgrade method of claim 5, wherein determining the second access gateway node to which the device corresponds comprises:
acquiring a plurality of third access gateway nodes with the updated gateway states from the gateway management service GMS;
and determining a second access gateway node corresponding to the device from the third access gateway node according to a preset configuration relationship, wherein the preset configuration relationship represents a corresponding relationship between access gateway nodes connected with the same logical node in the gateway management service GMS, and the access gateway nodes connected with the same logical node at least include the first access gateway node and the second access gateway node.
7. The device upgrade method according to claim 5, wherein before sending the destination address corresponding to the second access network node point to the device, the method includes:
determining the number of the devices which support the access of the second access gateway node as a first preset threshold value, and determining a second number of the devices which send the network access address allocation request;
determining a target address corresponding to the second access network joint point under the condition that the second number of the equipment is smaller than the first preset threshold value;
and under the condition that the second quantity of the equipment is greater than the first preset threshold value, locking the second access gateway node, and determining a target address corresponding to the second access gateway node from the target addresses of the access gateway nodes with the other gateway states being upgraded.
8. The device upgrade method according to claim 7, wherein determining a destination address corresponding to the second access network node from destination addresses of access network nodes whose other gateway states are upgraded comprises:
determining a fourth access gateway node from the access gateway node with the upgraded state of the other gateways, and determining the number of the devices which are supported by the fourth access gateway node to access as a second preset threshold;
determining a target address corresponding to the fourth access network joint point as a target address corresponding to the second access network joint point under the condition that the second number of the devices is smaller than the second preset threshold;
or, when the second number of the devices is greater than the first preset threshold, locking the second access gateway node, determining a fifth access gateway node from the other gateway state to the upgraded access gateway node, and determining the number of devices that the fifth access gateway node supports access as a third preset threshold;
and under the condition that the difference value between the second number and the first preset threshold is smaller than a third preset threshold, sending the target address corresponding to the second access network joint point to the second number of devices, and determining the target address corresponding to the fifth access network joint point as the target address corresponding to the second access network joint point.
9. The device upgrade method according to claim 5, wherein sending the target address corresponding to the second access network joint point to the device comprises:
determining a sending sequence number for sending the target address to the device according to the receiving time of the network access address allocation request, wherein the smallest sending sequence number corresponds to the earliest receiving time;
sending the target address corresponding to the second access network joint point to the equipment according to the sending sequence number;
under the condition that the number of the instructions to be processed of the equipment is larger than a fourth preset threshold value, the sending sequence number of the equipment is adjusted to be minimum;
or, under the condition that the equipment grade of the equipment is determined to be greater than a fifth preset threshold value, the sending sequence number of the equipment is adjusted to be the minimum;
or, in a case that it is determined that the transmission priority of the device address of the device is higher than a sixth preset threshold, adjusting the transmission sequence number of the device to be the minimum.
10. The device upgrade method according to claim 5, further comprising:
determining whether gateway services of the second access gateway node operate normally in the case of determining successful access to the second access gateway node;
and under the condition that the gateway service is determined to be abnormally operated, switching a second access gateway node bound with the logic node corresponding to the target device into the first access gateway node.
11. An equipment upgrade system, comprising:
the first access gateway node is used for sending a offline instruction to the equipment;
the device is connected with the first access gateway node and used for sending a network access address allocation request to a device main gateway under the condition of receiving a offline instruction sent by the first access gateway node;
the device main gateway is connected with the device and used for receiving a network access address allocation request sent by the device and determining a second access gateway node corresponding to the device; sending the target address corresponding to the second access network joint point to the equipment; wherein, the target address is used for indicating that the gateway state is the upgraded access gateway node;
the device is further configured to access the second access gateway node according to the target address, and close a network channel between the device and the first access gateway node according to the offline instruction when it is determined that the second access gateway node is successfully accessed.
12. The device upgrade system according to claim 11, further comprising:
a gateway management service GMS for providing a plurality of gateway states to the device master gateway as upgraded access gateway nodes; controlling the first access gateway node to send a offline instruction to the device;
and obtaining a correspondence between the first access gateway node and the second access gateway node by connecting the first access gateway node and the second access gateway node to the same logical node, wherein the logical node has a binding relationship with the device; and acquiring that the node state of the device under the first access gateway node is occupied.
13. The device upgrade system according to claim 12, wherein the GMS is further configured to monitor a connection number of devices connected to the first access gateway node; and under the condition that the connection quantity is smaller than the third quantity, acquiring uplink flow numerical values between the plurality of devices and the first access gateway node, and if the uplink flow numerical values are smaller than a preset numerical value and the logical node and the first access gateway node are successfully unbound, closing the network service of the first access gateway node.
14. A computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to carry out the method of any one of claims 1 to 10 when executed.
15. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 10.
CN202210599919.1A 2022-05-27 2022-05-27 Equipment upgrading method, storage medium and electronic device Active CN115174382B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210599919.1A CN115174382B (en) 2022-05-27 2022-05-27 Equipment upgrading method, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210599919.1A CN115174382B (en) 2022-05-27 2022-05-27 Equipment upgrading method, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN115174382A true CN115174382A (en) 2022-10-11
CN115174382B CN115174382B (en) 2024-01-26

Family

ID=83484106

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210599919.1A Active CN115174382B (en) 2022-05-27 2022-05-27 Equipment upgrading method, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN115174382B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080298363A1 (en) * 2007-05-29 2008-12-04 Bela Ban Message handling multiplexer
WO2009111929A1 (en) * 2008-03-12 2009-09-17 中兴通讯股份有限公司 A method and system for user to obtain home link information
CN101729452A (en) * 2009-05-13 2010-06-09 中兴通讯股份有限公司 Control system and method of home gateway strategy
US20100235825A1 (en) * 2009-03-12 2010-09-16 Barak Azulay Mechanism for Staged Upgrades of a Virtual Machine System
CN103888277A (en) * 2012-12-19 2014-06-25 中国移动通信集团公司 Gateway disaster recovery backup method, apparatus and system
CN106096743A (en) * 2016-06-24 2016-11-09 北京智慧云行科技有限责任公司 A kind of battery assigned spot recovery Internet of things system
WO2021017919A1 (en) * 2019-07-31 2021-02-04 中兴通讯股份有限公司 Ota update diagnostic method and apparatus, wireless routing device, and terminal device
CN113381938A (en) * 2021-06-30 2021-09-10 北京字节跳动网络技术有限公司 Data packet sending method and device, storage medium and electronic equipment
WO2021197214A1 (en) * 2020-03-30 2021-10-07 北京金山云网络技术有限公司 Method and apparatus for upgrading cloud platform, and server
WO2022026012A1 (en) * 2020-07-28 2022-02-03 Vmware, Inc. Route advertisement to support distributed gateway services architecture

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080298363A1 (en) * 2007-05-29 2008-12-04 Bela Ban Message handling multiplexer
WO2009111929A1 (en) * 2008-03-12 2009-09-17 中兴通讯股份有限公司 A method and system for user to obtain home link information
US20100235825A1 (en) * 2009-03-12 2010-09-16 Barak Azulay Mechanism for Staged Upgrades of a Virtual Machine System
CN101729452A (en) * 2009-05-13 2010-06-09 中兴通讯股份有限公司 Control system and method of home gateway strategy
CN103888277A (en) * 2012-12-19 2014-06-25 中国移动通信集团公司 Gateway disaster recovery backup method, apparatus and system
CN106096743A (en) * 2016-06-24 2016-11-09 北京智慧云行科技有限责任公司 A kind of battery assigned spot recovery Internet of things system
WO2021017919A1 (en) * 2019-07-31 2021-02-04 中兴通讯股份有限公司 Ota update diagnostic method and apparatus, wireless routing device, and terminal device
WO2021197214A1 (en) * 2020-03-30 2021-10-07 北京金山云网络技术有限公司 Method and apparatus for upgrading cloud platform, and server
WO2022026012A1 (en) * 2020-07-28 2022-02-03 Vmware, Inc. Route advertisement to support distributed gateway services architecture
CN113381938A (en) * 2021-06-30 2021-09-10 北京字节跳动网络技术有限公司 Data packet sending method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN115174382B (en) 2024-01-26

Similar Documents

Publication Publication Date Title
CN108491222B (en) Gateway equipment upgrading method and device, gateway equipment and storage medium
WO2018177417A1 (en) Method of upgrading distributed system, distributed system, and upgrade management device
CN114697150B (en) Command issuing method and device, storage medium and electronic device
CN110365524B (en) Mirror image upgrading method and system for server node firmware
CN116155911A (en) Version upgrading method and device
CN115174382A (en) Equipment upgrading method, storage medium and electronic device
CN116107975A (en) Control method and device of equipment, storage medium and electronic device
CN116260827A (en) Election method, election system and related device of leader in cluster
CN114938365A (en) Method and device for updating functional module, storage medium and electronic device
KR20230103777A (en) System for upgrading of home appliances and method thereof
CN108234215B (en) Gateway creating method and device, computer equipment and storage medium
CN108964989B (en) Method and device for connecting with service platform and computer readable storage medium
CN114697345B (en) Information updating method and device, storage medium and electronic device
CN116521192A (en) Plug-in updating method and device, storage medium and electronic device
CN115174297A (en) Attribute information updating method and device, storage medium and electronic device
CN115174383B (en) Equipment updating method, storage medium and electronic device
CN115525309A (en) Version updating method and device, storage medium and electronic device
CN115484116B (en) Processing method and device of equipment data, storage medium and electronic device
CN115484119B (en) Control method and device of equipment, storage medium and electronic device
CN115695182A (en) Network connection method, device, storage medium and electronic device
CN115277412A (en) Method and device for upgrading edge gateway, storage medium and electronic device
CN208299812U (en) A kind of active-standby switch system based on ZooKeeper cluster
CN115484163A (en) System switching method and device, storage medium and electronic device
CN115296947A (en) Control command response method and device, storage medium and electronic device
CN115296948A (en) Scene information updating 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