CN114518891A - A single-board upgrade method, single-board device and computer-readable storage medium - Google Patents

A single-board upgrade method, single-board device and computer-readable storage medium Download PDF

Info

Publication number
CN114518891A
CN114518891A CN202011302415.6A CN202011302415A CN114518891A CN 114518891 A CN114518891 A CN 114518891A CN 202011302415 A CN202011302415 A CN 202011302415A CN 114518891 A CN114518891 A CN 114518891A
Authority
CN
China
Prior art keywords
upgrade
board
upgraded
upgrading
single board
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
CN202011302415.6A
Other languages
Chinese (zh)
Other versions
CN114518891B (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN202011302415.6A priority Critical patent/CN114518891B/en
Publication of CN114518891A publication Critical patent/CN114518891A/en
Application granted granted Critical
Publication of CN114518891B publication Critical patent/CN114518891B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/658Incremental updates; Differential updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention provides a single board upgrading method, single board equipment and a computer readable storage medium, wherein the single board upgrading method is used for activating an obtained patch package; analyzing the patch package to obtain a single board parameter corresponding to the patch package; confirming a setting slot position of the single board to be upgraded corresponding to the patch package according to the single board parameters; and upgrading the single board to be upgraded according to the setting slot position, accurately identifying the effective range of the patch package, and executing upgrading operation.

Description

一种单板升级方法、单板设备及计算机可读存储介质A single-board upgrade method, single-board device and computer-readable storage medium

技术领域technical field

本发明实施例涉及但不限于通信设备领域,具体而言,涉及但不限于一种单板升级方法、单板设备及计算机可读存储介质。The embodiments of the present invention relate to, but are not limited to, the field of communication devices, and specifically relate to, but are not limited to, a single-board upgrade method, a single-board device, and a computer-readable storage medium.

背景技术Background technique

随着通信技术的不断发展,各行各业对于通信服务的稳定性和运维操作的友好性要求也随之提高。相关技术中,通信设备的整体软件版本升级流程能够实现无损或微损的升级,对于业务功能的影响较小。然而在实际应用中,整个网元基础软件版本的升级周期还是比较长的,更频繁的升级场景是通过打补丁方式来修补网元基础版本的问题,但是相关技术中,打补丁升级对现场升级操作人员有较高的专业要求,同时冷补丁生效确认工作比较复杂,尤其是工程环境上存在多个冷补丁时,每个冷补丁涉及的单板可能不同但都需要维护,因而需要工程人员保证实际操作的运维水平。With the continuous development of communication technology, all walks of life have higher requirements for the stability of communication services and the friendliness of operation and maintenance operations. In the related art, the overall software version upgrade process of the communication device can achieve a lossless or slight loss upgrade, which has less impact on business functions. However, in practical applications, the upgrade cycle of the entire NE basic software version is still relatively long. The more frequent upgrade scenario is to patch the basic version of the NE by patching. Operators have high professional requirements, and the confirmation of cold patch validity is complicated, especially when there are multiple cold patches in the engineering environment. The boards involved in each cold patch may be different but all require maintenance. Therefore, engineering personnel are required to ensure Operational level of actual operation.

发明内容SUMMARY OF THE INVENTION

本发明实施例提供的单板升级方法、单板设备及计算机可读存储介质,主要解决的技术问题是相关技术中补丁升级对现场升级操作人员有较高的专业要求且升级过程复杂的问题。The single-board upgrade method, single-board device, and computer-readable storage medium provided by the embodiments of the present invention mainly solve the technical problem that the patch upgrade in the related art has high professional requirements for field upgrade operators and the upgrade process is complicated.

为解决上述技术问题,本发明实施例提供一种单板升级方法,包括:To solve the above technical problem, an embodiment of the present invention provides a method for upgrading a single board, including:

激活获取到的补丁包;Activate the obtained patch package;

解析所述补丁包,获取所述补丁包所对应的单板参数;Parse the patch package, and obtain the board parameters corresponding to the patch package;

根据所述单板参数,确认出所述补丁包所对应的待升级单板的设置槽位;According to the board parameters, confirm the setting slot of the to-be-upgraded board corresponding to the patch package;

根据所述设置槽位对所述待升级单板进行升级。The board to be upgraded is upgraded according to the set slot.

本发明实施例还提供一种单板设备,处理器、存储器及通信总线;Embodiments of the present invention also provide a single-board device, a processor, a memory, and a communication bus;

所述通信总线用于实现处理器和存储器之间的连接通信;The communication bus is used to realize the connection communication between the processor and the memory;

所述处理器用于执行存储器中存储的一个或者多个计算机程序,以实现如上所述的单板升级方法的步骤The processor is used to execute one or more computer programs stored in the memory to realize the steps of the above-mentioned method for upgrading a single board

本发明实施例还提供一种计算机可读存储介质,所述计算机可读存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现如上所述的单板升级方法方法的步骤。Embodiments of the present invention further provide a computer-readable storage medium, where one or more programs are stored in the computer-readable storage medium, and the one or more programs can be executed by one or more processors to implement the above The steps of the above-mentioned method for upgrading the board.

根据本发明实施例提供的单板升级方法、单板设备及计算机可读存储介质,通过激活获取到的补丁包;解析补丁包,获取补丁包所对应的单板参数;根据单板参数,确认出补丁包所对应的待升级单板的设置槽位,并对待升级单板进行升级;精准识别补丁包的生效范围,并执行升级操作,在某些实施过程中可实现包括但不限于提高了补丁包升级的自动化程度,减少现场升级操作人员的操作工作的技术效果。According to the single-board upgrade method, single-board device, and computer-readable storage medium provided by the embodiments of the present invention, the obtained patch package is activated; the patch package is parsed to obtain single-board parameters corresponding to the patch package; Output the setting slot of the board to be upgraded corresponding to the patch package, and upgrade the board to be upgraded; accurately identify the effective range of the patch package, and perform the upgrade operation. In some implementation processes, it can be achieved including but not limited to improved The degree of automation of the patch package upgrade reduces the technical effect of the field upgrade operator's operation work.

本发明其他特征和相应的有益效果在说明书的后面部分进行阐述说明,且应当理解,至少部分有益效果从本发明说明书中的记载变的显而易见。Other features of the present invention and corresponding benefits are set forth in later parts of the specification, and it should be understood that at least some of the benefits will become apparent from the description of the present specification.

附图说明Description of drawings

图1为本发明实施例一的单板升级方法的流程示意图;FIG. 1 is a schematic flowchart of a method for upgrading a board according to Embodiment 1 of the present invention;

图2为本发明实施例二的网元设备内安装的版本目录示意图;2 is a schematic diagram of a version directory installed in a network element device according to Embodiment 2 of the present invention;

图3为本发明实施例二的网元设备当前激活并运行在内存中的版本目录示意图;3 is a schematic diagram of a version directory currently activated and running in a memory of a network element device according to Embodiment 2 of the present invention;

图4为本发明实施例二的网元设备激活冷补丁包后内存中的版本目录示意图;4 is a schematic diagram of a version directory in a memory after a network element device activates a cold patch package according to Embodiment 2 of the present invention;

图5为本发明实施例二的各槽位单板的配置信息示意图;5 is a schematic diagram of configuration information of boards in each slot according to Embodiment 2 of the present invention;

图6为本发明实施例二的单板升级方法的细化流程示意图;6 is a schematic diagram of a refinement process of a method for upgrading a board according to Embodiment 2 of the present invention;

图7为本发明实施例二的获取并安装冷补丁的流程示意图;7 is a schematic flowchart of obtaining and installing a cold patch according to Embodiment 2 of the present invention;

图8为本发明实施例二的各槽位的单板中业务保护组关系示意图;FIG. 8 is a schematic diagram of the relationship between service protection groups in a single board in each slot according to Embodiment 2 of the present invention;

图9为本发明实施例二的各槽位的单板升级优先级配置示意图;FIG. 9 is a schematic diagram of a board upgrade priority configuration of each slot according to Embodiment 2 of the present invention;

图10为本发明实施例二的剩余预估时间的计算示意图;10 is a schematic diagram of calculation of the remaining estimated time in Embodiment 2 of the present invention;

图11为本发明实施例二的启动时升级进度显示示意图;FIG. 11 is a schematic diagram showing an upgrade progress during startup according to Embodiment 2 of the present invention;

图12为本发明实施例二的升级中升级进度显示示意图;FIG. 12 is a schematic diagram showing the progress of the upgrade in the upgrade according to the second embodiment of the present invention;

图13为本发明实施例二的升级完成后升级进度显示示意图;FIG. 13 is a schematic diagram showing the upgrade progress after the upgrade is completed according to the second embodiment of the present invention;

图14为本发明实施例三的单板设备的结构示意图。FIG. 14 is a schematic structural diagram of a single-board device according to Embodiment 3 of the present invention.

具体实施方式Detailed ways

为了使本发明的目的、技术方案及优点更加清楚明白,下面通过具体实施方式结合附图对本发明实施例作进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the objectives, technical solutions and advantages of the present invention clearer, the embodiments of the present invention will be further described in detail below through specific embodiments in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.

实施例一:Example 1:

为了减小在对单板进行升级时的复杂操作。本发明实施例提供一种单板升级方法,请参见图1,包括:In order to reduce the complicated operation when the board is upgraded. An embodiment of the present invention provides a method for upgrading a board, as shown in FIG. 1 , including:

S101、激活获取到的补丁包;S101. Activate the obtained patch package;

应当说明的是,本实施例中的补丁包,在其他实施方式中也可以是包括但不限于增量包以及全量包或其他可应用本实施例的单板升级方法进行升级的补丁包。It should be noted that the patch package in this embodiment may also include, but is not limited to, an incremental package, a full package, or other patch packages that can be upgraded by applying the board upgrade method of this embodiment in other implementations.

补丁包可以是提前下载好的,补丁包包括可以用于对单板设备中的部分或全部单板中运行的版本软件进行升级的软件包。作为一种具体的示例,补丁包可被存储入主控单板的硬盘中,在该示例中,补丁包传入的目录是独立的目录,与基础版本包的存放目录并列;在一些实施方式中,若存在备机(即备用的主控单板),则可以使得主控单板与备用的主控单板之间进行补丁包文件的同步,保证在主备倒换后补丁包依旧能够正常生效。The patch package may be downloaded in advance, and the patch package includes a software package that can be used to upgrade version software running on some or all of the single-board devices. As a specific example, the patch package can be stored in the hard disk of the main control board. In this example, the directory passed in by the patch package is an independent directory, which is parallel to the storage directory of the basic version package; in some embodiments If there is a standby machine (that is, the standby main control board), the patch package file can be synchronized between the main control board and the standby main control board to ensure that the patch package can still be normal after the main control board is switched. effective.

应当说明的是,本实施例中的激活补丁包是指将当前单板设备的系统中生效的版本包的文件替换为补丁包中的文件,在一具体的示例中替换指当前系统预期生效的版本文件软链接为补丁包中的文件,即激活的操作,仅仅是将版本服务端的版本文件全部软链接为补丁包中的文件。应当理解的是,补丁包激活后,并未实际更新入对应的单板中,在将补丁包激活后,通常需要将单板进行复位重启,单板复位重启的过程中会请求当前激活的版本文件进行加载,此时被激活的补丁包中的文件被单板加载,该补丁包的更新才相当于实际进行了应用。It should be noted that the activation of the patch package in this embodiment refers to replacing the file of the version package that takes effect in the system of the current single-board device with the file in the patch package. The version file soft link is the file in the patch package, that is, the activation operation is only to soft link all the version files of the version server to the files in the patch package. It should be understood that after the patch package is activated, it is not actually updated to the corresponding board. After the patch package is activated, the board usually needs to be reset and restarted. During the reset and restart process of the board, the currently activated version will be requested. The file is loaded. At this time, the files in the activated patch package are loaded by the board, and the update of the patch package is equivalent to the actual application.

S102、解析补丁包,获取补丁包所对应的单板参数;S102. Parse the patch package, and obtain board parameters corresponding to the patch package;

在实际应用中,补丁包中可能携带配置文件,则解析补丁包可包括读取配置文件中的配置信息,通过解析补丁包,能够获取到单板参数。本实施例中,单板参数能够反应出本次补丁包对针对的单板的信息,示例性的,单板参数包括但不限于单板的CPU(centralprocessing unit,中央处理器)型号。In practical applications, the patch package may carry a configuration file, and parsing the patch package may include reading configuration information in the configuration file, and by parsing the patch package, board parameters can be obtained. In this embodiment, the board parameters can reflect the information of the board targeted by the patch package. Exemplarily, the board parameters include but are not limited to the CPU (central processing unit, central processing unit) model of the board.

S103、根据单板参数,确认出补丁包所对应的待升级单板的设置槽位;S103. According to the board parameters, confirm the setting slot of the board to be upgraded corresponding to the patch package;

在实际应用中,单板的槽位配置是有记录的,例如可通过读取单板的柜框槽静态配置信息,了解到各个柜框槽中所设置的单板的信息。通过解析补丁包获得的单板参数,可从柜框槽静态配置中查找出与单板参数所匹配的单板以及其设置的槽位信息,在本实施例中,这些单板即是该补丁包所对应的待升级单板。示例性的,单板参数为单板的CPU型号,从柜框槽静态配置中查找使用这些CPU型号的单板,并得知其设置的槽位。In practical applications, the slot configuration of the board is recorded. For example, by reading the static configuration information of the cabinet slot of the board, you can learn the information of the board set in each cabinet slot. By parsing the board parameters obtained from the patch package, the board matching the board parameters and the slot information of the board can be found from the static configuration of the cabinet slot. In this embodiment, these boards are the patch. The board to be upgraded corresponding to the package. Exemplarily, the board parameters are the CPU models of the boards, and the boards using these CPU models are searched from the static configuration of the slots in the cabinet, and the slot positions of the boards are obtained.

S104、根据设置槽位对待升级单板进行升级。S104, upgrade the board to be upgraded according to the set slot.

在通常情况下,对这些待升级单板进行复位重启即可实现补丁包文件的加载完成升级。本实施例中,可通过对待升级单板发出指令的方式使其复位重启,由于在前述步骤S103中已经确认出了待升级单板以及其设置的槽位,因此,本实施例中能够实现准确的升级控制,可以仅对这些槽位的单板(即待升级单板)发出复位重启的指令,进行升级。Under normal circumstances, after resetting and restarting the boards to be upgraded, the patch package file can be loaded to complete the upgrade. In this embodiment, the board to be upgraded can be reset and restarted by issuing an instruction. Since the board to be upgraded and its slot have been confirmed in the foregoing step S103, this embodiment can achieve accurate The upgrade control can be performed only by issuing reset and restart instructions to the boards in these slots (that is, the boards to be upgraded).

应当理解的是,本发明实施例的单板升级方法可以应用在包括不但不限于主控单板或单板设备的其他控制模块或专用于对单板设备进行升级的装置中,在进行单板升级的过程中,通过解析补丁包获取单板参数,并确认出补丁包对应的待升级单板的设置槽位,并对该槽位的单板进行升级,在一些实施过程中能够实现对于补丁包生效范围的自动准确的识别和升级控制,从而减少现场升级操作人员的操作工作,提高补丁包升级的自动化程度。It should be understood that the method for upgrading a single board in this embodiment of the present invention can be applied to other control modules including but not limited to a main control single board or single-board equipment, or an apparatus dedicated to upgrading single-board equipment. During the upgrade process, the board parameters are obtained by parsing the patch package, and the setting slot of the board to be upgraded corresponding to the patch package is confirmed, and the board in the slot is upgraded. Automatic and accurate identification and upgrade control of the effective range of the package, thereby reducing the operation work of field upgrade operators and improving the automation degree of patch package upgrade.

在一些实施方式中,对待升级单板进行升级包括:In some embodiments, upgrading the board to be upgraded includes:

若补丁包中的更新文件中不包括进程更新文件以外的更新文件,也即该次升级仅涉及待升级单板中的进程文件,可不重启待升级单板,仅使待升级单板中对应于该次升级的进程或虚拟进程组重启以完成升级,若补丁包中的更新文件包括对应于进程文件以外的文件,则使待升级单板复位重启以完成升级。应当说明的是,这里所指的进程更新文件即是仅与待升级单板中的进程相关的更新文件。这里的该次升级指的是一个补丁包中的升级,也即一个补丁包中的所有升级文件均是针对于待升级单板中的进程文件的升级,则可以仅仅将相应的进程进行重启。与待升级单板重启的方式类似,可以通过下发进程重启的指令使待升级单板中的进程的重启,进行升级。进程在重启的过程中,重新加载激活的相关进程文件,更新文件中的进程更新文件在此过程被加载激活。若该次升级不仅仅涉及进程文件的替换(替换为进程更新文件),还涉及了例如一些XML(Extensible Markup Language,可扩展标记语言)格式的资源文件,则仅仅是进程或虚拟进程组的重启无法完整的实现升级,应当对待升级单板进行重启。If the update files in the patch package do not include update files other than the process update files, that is, the upgrade only involves the process files of the board to be upgraded, the board to be upgraded may not be restarted, and only the update files corresponding to the board to be upgraded will be updated. The process or virtual process group of this upgrade is restarted to complete the upgrade. If the update files in the patch package include files other than the corresponding process files, the board to be upgraded is reset and restarted to complete the upgrade. It should be noted that the process update file referred to here is the update file only related to the process in the board to be upgraded. The upgrade here refers to an upgrade in a patch package, that is, all upgrade files in a patch package are for the upgrade of process files in the board to be upgraded, and only the corresponding process can be restarted. Similar to the way of restarting the board to be upgraded, the process of the board to be upgraded can be restarted by issuing a process restart instruction to perform the upgrade. During the process of restarting the process, the activated related process file is reloaded, and the process update file in the update file is loaded and activated in this process. If the upgrade involves not only the replacement of process files (replacement with process update files), but also some resource files in XML (Extensible Markup Language) format, it is only the restart of the process or virtual process group. If the upgrade cannot be completely implemented, the board to be upgraded should be restarted.

在一些实施方式中,使待升级单板中对应于该次升级的进程或虚拟进程组重启以完成升级包括:In some embodiments, restarting the process or virtual process group corresponding to the upgrade in the single board to be upgraded to complete the upgrade includes:

获取补丁包中的配置信息;Get the configuration information in the patch package;

根据配置信息确认出该次升级所涉及进程文件名;Confirm the file name of the process involved in the upgrade according to the configuration information;

使待升级单板在获取到补丁包中的进程文件后重启对应的进程或虚拟进程组。Enables the board to be upgraded to restart the corresponding process or virtual process group after obtaining the process file in the patch package.

一种示例中,读取补丁包中的配置文件,从配置文件中能够确认到该补丁包具体涉及哪些进程文件,在单板获取到补丁包中对应的升级的进程文件后,能够通过相应的指令重启这些进程或虚拟进程组。In one example, the configuration file in the patch package is read, and the specific process files involved in the patch package can be confirmed from the configuration file. After the board obtains the corresponding upgraded process file in the patch package, it can pass the corresponding The command restarts these processes or virtual process groups.

本实施例中还可以对虚拟进程组进行重启,在实际应用中,对进程还是虚拟进程组进行重启,可以灵活的选择,例如在一种示例中,若某一虚拟进程组中的多个进程均需要进行更新,则可以选择直接对虚拟进程组全部进行重启,此时只需要发送一条重启虚拟进程组的指令即可,避免针对该虚拟进程组中的每个需要更新的进程都发送一条重启的指令。In this embodiment, the virtual process group can also be restarted. In practical applications, whether to restart the process or the virtual process group can be flexibly selected. For example, in an example, if multiple processes in a virtual process group If both need to be updated, you can choose to restart all the virtual process groups directly. In this case, you only need to send an instruction to restart the virtual process group to avoid sending a restart for each process in the virtual process group that needs to be updated. instruction.

由于对于补丁包中的文件的解析,不仅能够确认升级所涉及的待升级单板,还在一些实施过程中使得该次升级涉及的相关进程能够被准确的识别出来,因而在这些场景中,能够在升级仅涉及待升级单板中的进程文件时,仅通过上述的重启进程或虚拟进程组的方式就完成了待升级单板的升级过程中,实现了更小的升级粒度,提升升级的效率。且重启进程或虚拟进程组的过程中,待升级单板中仍可能存在未升级的进程或虚拟进程组能够正常运行,有利于降低升级过程中的影响。Because the analysis of the files in the patch package can not only confirm the boards to be upgraded involved in the upgrade, but also enable the related processes involved in the upgrade to be accurately identified in some implementation processes. Therefore, in these scenarios, it is possible to When the upgrade only involves the process files in the board to be upgraded, the upgrade process of the board to be upgraded is completed only by the above-mentioned restarting process or virtual process group, which achieves a smaller upgrade granularity and improves the efficiency of the upgrade . In addition, during the process of restarting the process or virtual process group, there may still be unupgraded processes or virtual process groups on the board to be upgraded that can run normally, which is beneficial to reduce the impact of the upgrade process.

在一些实施方式中,激活获取到的补丁包之前,还包括:In some embodiments, before activating the acquired patch package, it further includes:

当校验到当前的单板配置不满足无损升级条件,则提示用户当前的单板配置不满足无损升级条件;When it is verified that the current board configuration does not meet the conditions for non-destructive upgrade, it will prompt the user that the current board configuration does not meet the conditions for non-destructive upgrade;

若校验到当前的单板配置满足无损升级条件,或在提示用户当前的单板配置不满足无损升级条件后接收到用户下发的继续升级指令,则继续对待升级单板进行升级;若没有接收到继续升级的指令,不对待升级单板进行升级。If it is verified that the current board configuration satisfies the conditions for the non-destructive upgrade, or after the user is prompted that the current board configuration does not meet the conditions for the non-destructive upgrade and receives an instruction to continue the upgrade from the user, the board to be upgraded will continue to be upgraded; if not After receiving the instruction to continue the upgrade, the board to be upgraded will not be upgraded.

可以理解的是,用户在接收到当前的单板配置不满足无损升级条件的提示后,可以选择下发继续升级指令(例如用户认为当前的升级对业务带来的影响在可接受范围内),此时,若继续升级,则可能在升级的过程中导致业务的损失或者中断等情况出现;在一些场景中,用户还可以在接收到当前的单板配置不满足无损升级条件的提示后,选择调整单板的配置,将单板配置调整为能够实现无损升级的状态,而后可以再次执行升级的操作,此时能够通过校验,并开始进行后续的升级过程。It is understandable that, after receiving the prompt that the current board configuration does not meet the conditions for the non-destructive upgrade, the user can choose to issue an instruction to continue the upgrade (for example, the user believes that the impact of the current upgrade on the business is within an acceptable range), At this point, if you continue to upgrade, it may cause service loss or interruption during the upgrade process. In some scenarios, the user can also choose to select the Adjust the configuration of the board, and adjust the configuration of the board to a state that can achieve non-destructive upgrade, and then perform the upgrade operation again. At this time, the verification can be passed, and the subsequent upgrade process can be started.

在一些实施方式中,无损升级条件包括:In some embodiments, the lossless upgrade conditions include:

各有业务的待升级单板存在主备单板关系和/或存在保护组关系;The boards to be upgraded with services each have an active/standby board relationship and/or a protection group relationship;

对待升级单板进行补丁包括:Patching the board to be upgraded includes:

根据主备单板关系和/或保护组关系,生成升级优先级;Generate upgrade priorities based on the relationship between the active and standby boards and/or the protection group;

按照升级优先级由高至低依次使待升级单板完成升级,升级过程中通过当前没有正在执行升级的单板执行业务;According to the upgrade priority from high to low, the boards to be upgraded are upgraded. During the upgrade process, services are performed on the boards that are not currently being upgraded;

若主控单板需要升级,则主控单板的升级优先级为最高优先级,备用主控单板的升级优先级仅次于主控单板;If the main control board needs to be upgraded, the upgrade priority of the main control board is the highest priority, and the upgrade priority of the standby main control board is second only to the main control board;

若非主控单板需要升级,基于保护组关系对非主控单板生成升级优先级,具备直接保护组关系的非主控单板中的至少两个设置为不同的升级优先级;If the non-main control boards need to be upgraded, an upgrade priority is generated for the non-main control boards based on the protection group relationship, and at least two of the non-main control boards with direct protection group relationships are set to different upgrade priorities;

当前没有正在执行升级的单板执行的业务包括以下至少一种:The services performed by the boards that are not currently being upgraded include at least one of the following:

当前没有正在执行升级的单板所对应的业务;There is currently no service corresponding to the board being upgraded;

与当前没有正在执行升级的单板具有主备单板关系和/或保护组关系的正在执行升级的单板所对应的业务。A service corresponding to a board that is being upgraded and has a master-standby board relationship and/or a protection group relationship with a board that is not currently being upgraded.

在实际应用中,是否能够无损升级主要考虑当前有业务的待升级单板,因而在一些实施方式中判断各个有业务的待升级单板是否可被暂时或完全地替代,例如存在备用单板和/或与其他单板存在保护组关系。可见,本实施例中的待升级单板可以是主控单板(包括备用主控单板)以及非主控单板。应当说明的是,本实施例中所指的无损升级条件,仅仅是一种预设的可能实现无损或低损升级的判断条件,但在实际应用中,满足该无损升级条件并不意味着一定可无损升级,例如,部分待升级单板虽然存在保护组关系,但保护组关系仅覆盖了其中的部分业务,还有部分业务并不存在有效的保护组关系(即部分业务无法被替代);或升级过程中可能存在难以预料的影响。且在其他一些实施方式中,该无损升级条件也可根据实际情况调整为其他条件,并不局限于本实施例中所示出的。In practical applications, whether a non-destructive upgrade is possible mainly considers the boards to be upgraded that currently have services. Therefore, in some embodiments, it is determined whether each board to be upgraded with services can be temporarily or completely replaced. For example, there are spare boards and / Or there is a protection group relationship with other boards. It can be seen that the board to be upgraded in this embodiment may be a main control board (including a standby main control board) and a non-main control board. It should be noted that the lossless upgrade condition referred to in this embodiment is only a preset judgment condition that may realize lossless or low-loss upgrade, but in practical applications, satisfying the lossless upgrade condition does not mean that It can be upgraded without loss. For example, although some boards to be upgraded have a protection group relationship, the protection group relationship only covers some of the services, and some services do not have an effective protection group relationship (that is, some services cannot be replaced); Or there may be unforeseen effects during the upgrade process. And in some other implementation manners, the lossless upgrade condition can also be adjusted to other conditions according to the actual situation, and is not limited to what is shown in this embodiment.

同时,上述升级过程中通过当前没有正在执行升级的单板执行业务,不仅包括还未进行升级的待升级单板,本次不进行升级的单板也可以在有条件的情况下继续执行相应的业务。At the same time, during the above upgrade process, services are performed on the boards that are not currently being upgraded, including not only the boards to be upgraded that have not been upgraded, but also the boards that are not being upgraded this time. business.

若存在备用单板关系,例如主控单板和备用主控单板,则二者被设置为不同的升级优先级;若待升级单板之间存在直接保护组关系,则这些待升级单板不全为同一升级优先级。本实施例中,同一升级优先级的待升级单板同时进行重启复位等升级的操作,在当前升级优先级的待升级单板均升级完成后,依次进行下一升级优先级的待升级单板的升级操作。通过划分升级优先级的方式,使得升级的执行能够分批次的进行,可以理解的是,分批次对单板进行升级,未进行升级的单板中有条件的可以继续执行其配置的业务,在一定程度上降低升级对业务的影响。同时,通过将主备关系的单板或具备直接保护组关系的非主控单板中的至少两个设置为不同的升级优先级,使得在升级过程中,至少一部分业务或功能能够始终保持工作,进一步降低对业务的影响,且在单板配置合理的情况下,能够实现无损升级。作为一种示例,主控单板和备用主控单板进行升级时,先升级其中一个(如备用主控单板),升级过程中,通过还未升级的一者继续进行主控,先升级的单板升级完成后,由升级完成的单板进行主控,另一个单板开始进行升级,在此过程中,始终存在单板执行主控的功能,业务不受影响。当然,还作为一种示例,主控单板和备用主控单板可以同设为一个升级优先级(最高升级优先级),但在升级过程中对于主控单板和备用主控单板进行特殊处理,按照上一示例的顺序进行升级,可以理解的是,本示例中虽然可以在参数设置上使得主控单板和备用主控单板均为最高优先级,但在实际处理中仍先对备用主控单板进行了升级,也即备用主控单板的实际升级优先级仍是最高的。可见,本申请中所提及的升级优先级,并不应当局限于在实施过程中配置的软件参数等数据,而应当考虑实际执行升级的顺序。If there is a relationship between the standby boards, such as the main control board and the standby main control board, the two are set to different upgrade priorities; if there is a direct protection group relationship between the boards to be upgraded, the boards to be upgraded have a direct protection group relationship. Not all of the same upgrade priority. In this embodiment, upgrade operations such as restarting and resetting are performed simultaneously on the boards to be upgraded with the same upgrade priority. After the upgrade of the boards to be upgraded with the current upgrade priority is completed, the boards to be upgraded with the next upgrade priority are sequentially performed. upgrade operation. By dividing the priority of the upgrade, the execution of the upgrade can be carried out in batches. It is understandable that when the boards are upgraded in batches, the boards that have not been upgraded can continue to execute their configured services. , to a certain extent, reduce the impact of the upgrade on the business. At the same time, by setting at least two of the boards in the master-standby relationship or the non-master boards with the direct protection group relationship to different upgrade priorities, at least some services or functions can always keep working during the upgrade process. , further reducing the impact on services, and under the condition of reasonable board configuration, non-destructive upgrade can be achieved. As an example, when the main control board and the standby main control board are upgraded, one of them (such as the standby main control board) is upgraded first. During the upgrade process, the main control board is continued through the one that has not been upgraded, and the upgrade is performed first. After the upgrade of one board is completed, the upgraded board is the main control board, and the other board starts to be upgraded. During this process, there is always a board that performs the main control function, and services are not affected. Of course, as an example, the main control board and the standby main control board can both be set to the same upgrade priority (the highest upgrade priority), but during the upgrade process, the main control board and the standby main control board are For special processing, upgrade according to the order of the previous example. It can be understood that although the parameter settings in this example can make the main control board and the standby main control board have the highest priority, in the actual processing, it is still the first. The standby main control board has been upgraded, that is, the actual upgrade priority of the standby main control board is still the highest. It can be seen that the upgrade priority mentioned in this application should not be limited to data such as software parameters configured in the implementation process, but should consider the order in which the upgrade is actually performed.

在一些实施方式中,对待升级单板进行升级还包括:In some embodiments, upgrading the board to be upgraded further includes:

若升级过程中,出现待升级单板升级失败,则向用户发出提示;If the upgrade of the board to be upgraded fails during the upgrade process, a prompt will be sent to the user;

向用户发出待升级单板升级失败的提示后,当接收到继续升级的指令,则继续进行补丁升级,若没有接收到继续升级的指令则将已升级的单板回退至升级前的状态。应当注意的是,上述无损升级过程为校验到当前的单板配置满足无损升级条件后进行升级的过程,由于存在主备单板和/或保护组关系,因而可以由用户选择是否进行继续升级,例如用户认为当前待升级单板升级失败导致的影响是可接受的。当然,用户也可以选择不继续升级,若没有接收到继续升级的指令,则停止升级,并将已升级的单板回退至升级前的状态,可以等到将导致待升级单板升级失败的问题解决后,再次进行升级。After sending a notification to the user that the upgrade of the board to be upgraded has failed, when receiving the instruction to continue the upgrade, continue to perform the patch upgrade, and if no instruction to continue the upgrade is received, the upgraded board will be rolled back to the state before the upgrade. It should be noted that the above non-destructive upgrade process is a process of upgrading after verifying that the current board configuration satisfies the non-destructive upgrade conditions. Since there is a relationship between the active and standby boards and/or the protection group, the user can choose whether to continue the upgrade or not. For example, the user thinks that the impact caused by the failure of the upgrade of the board to be upgraded is acceptable. Of course, the user can also choose not to continue the upgrade. If the instruction to continue the upgrade is not received, the upgrade will be stopped, and the upgraded board will be returned to the state before the upgrade. It can wait for the problem that will cause the upgrade of the board to be upgraded to fail. Once resolved, perform the upgrade again.

在一些实施方式中,对升级的进度进行显示。例如可以在接收到用户的指令后进行进度的显示,通过对外呈现升级过程的进展和/或预期升级剩余时间等信息,实现升级操作的可视化,提升用户对升级结果的预期,提高升级过程中的体验。作为一种较具体的示例,显示的内容可包括但不限于:升级的版本,升级开始时间,升级结束时间,剩余预估时间,各批次升级优先级单板的升级状态(等待升级、升级中、升级完成,以及升级成功或升级失败等)。In some implementations, the progress of the upgrade is displayed. For example, the progress can be displayed after receiving the user's instruction, and by presenting the information such as the progress of the upgrade process and/or the expected upgrade remaining time to the outside world, the visualization of the upgrade operation can be realized, the user's expectation of the upgrade result can be improved, and the upgrade process can be improved. experience. As a specific example, the displayed content may include, but is not limited to: the upgraded version, the upgrade start time, the upgrade end time, the remaining estimated time, and the upgrade status of each batch of upgrade priority boards (waiting for upgrade, upgrade in progress, the upgrade is complete, and the upgrade succeeds or fails, etc.).

在一些实施方式中,在完成针对补丁包的升级之前,停止新业务的接入。这里所指的针对补丁包的升级是指该补丁包涉及的所有待升级单板的升级,若待升级单板有升级优先级,则所有升级优先级的待升级单板均完成更新后,表示该补丁包的升级完成。避免在升级过程中接入新业务,从而保证升级过程的稳定性,避免新接入的业务出现中断或导致原有的业务中断。In some embodiments, the access to new services is stopped before the upgrade for the patch package is completed. The upgrade for the patch package here refers to the upgrade of all the boards to be upgraded involved in the patch package. If the board to be upgraded has an upgrade priority, after all the boards to be upgraded with the upgrade priority have been updated, it means The upgrade of the patch package is complete. Avoid accessing new services during the upgrade process, thereby ensuring the stability of the upgrade process and avoiding interruption of newly accessed services or interruption of existing services.

本发明实施例提供的单板升级方法,通过激活获取到的补丁包,解析该补丁包以获取补丁包所对应的单板参数,并根据单板参数确认出补丁包所对应的待升级单板的设置槽位,对待升级单板进行升级;精准的识别出补丁包的生效范围,并执行升级操作,提高了补丁包升级的自动化程度,减少现场升级操作人员的操作工作。In the method for upgrading a board provided by the embodiment of the present invention, by activating the obtained patch package, parsing the patch package to obtain the board parameters corresponding to the patch package, and confirming the to-be-upgraded board corresponding to the patch package according to the board parameters Set the slot, and upgrade the board to be upgraded; accurately identify the effective scope of the patch package, and perform the upgrade operation, which improves the automation degree of the patch package upgrade and reduces the operation work of the on-site upgrade operators.

进一步的,在一些实施方式中,可以识别出升级涉及的进程,并仅对进程或虚拟进程组重启,实现了更小的升级粒度,提升升级的效率,有利于降低升级过程中的影响。Further, in some embodiments, the processes involved in the upgrade can be identified, and only the process or virtual process group can be restarted, thereby realizing a smaller upgrade granularity, improving the efficiency of the upgrade, and helping to reduce the impact on the upgrade process.

进一步的,还在一些实施方式中,能够通过划分升级优先级进行分批次升级,实现无损或低损升级,且自动化程度高。Further, in some embodiments, batch upgrades can be performed by dividing upgrade priorities, so as to achieve lossless or low-loss upgrades with a high degree of automation.

实施例二:Embodiment 2:

为了更好的说明本发明实施例的单板升级方法,本实施例中以一种具体的无损自动升级流程为示例作进一步说明,本实施例的示例中,补丁包为冷补丁包(以下简称冷补丁),单板设备为一种网元(或者说网元设备)。In order to better illustrate the board upgrade method according to the embodiment of the present invention, a specific non-destructive automatic upgrade process is used as an example for further description in this embodiment. In the example of this embodiment, the patch package is a cold patch package (hereinafter referred to as the Cold patch), the single-board device is a kind of network element (or network element device).

请参见图2,示意出该网元中的目录,网元中安装的版本包括:网元基础版本(baseset1,baseset2)、冷补丁版本(coldpatch),其中,网元基础版本是网元系统运行的基础;冷补丁版本用于修复网元运行软件版本的部分功能,且必须是重新加载方式才能生效;如图2所示,冷补丁版本目录是跟网元基础版本目录是并列目录,但是冷补丁是依赖特定网元基础版本的,并且冷补丁生效必须要求跟网元基础版本匹配。Please refer to FIG. 2 , which shows the directory in the network element. The versions installed in the network element include: basic network element version (baseset1, baseset2) and cold patch version (coldpatch), wherein the basic network element version is the network element system running The cold patch version is used to repair some functions of the running software version of the NE, and must be reloaded to take effect; as shown in Figure 2, the cold patch version directory is parallel to the NE basic version directory, but the cold patch version The patch depends on the basic version of a specific NE, and the cold patch must match the basic version of the NE to take effect.

请参见图3,示意出当前网元激活并运行基础版本包baseset1时,网元内存中使用的版本目录下文件情况,该目录是对应硬盘目录基础版本包baseset1的软链接。Please refer to FIG. 3 , which shows the files in the version directory used in the memory of the network element when the current network element activates and runs the basic version package baseset1. This directory is a soft link corresponding to the basic version package baseset1 of the hard disk directory.

请参见图4,示意出当前网元激活冷补丁coldpatch时,网元内存中使用的版本目录下文件情况,此时,该目录中跟冷补丁目录同名的文件都是对应硬盘中冷补丁coldpatch的软链接。Please refer to Figure 4, which shows the files in the version directory used in the memory of the NE when the cold patch is activated on the current NE. At this time, the files with the same name as the cold patch directory in this directory are corresponding to the cold patch in the hard disk. soft link.

请参见图5,本发明实施例中,网元中实际运行的各个槽位单板,除了主控单板是基础版本最小版本缺省配置外,其他单板都是通过用户配置的,从配置可以看出各个槽位实际运行的物理单板的CPU型号等唯一信息。Referring to FIG. 5 , in the embodiment of the present invention, for each slot board actually running in the network element, except for the main control board, which is the default configuration of the minimum version of the basic version, other boards are configured by the user. You can see unique information such as the CPU model of the physical board actually running in each slot.

请参见图6,本实施例的示例中,单板升级方法包括:Referring to FIG. 6 , in the example of this embodiment, the method for upgrading a board includes:

S201、获取并安装冷补丁;S201. Obtain and install a cold patch;

请参见图7,步骤S201具备可包括:Referring to FIG. 7, step S201 may include:

S2011、构建冷补丁,配置冷补丁对应的版本信息;S2011. Build a cold patch and configure the version information corresponding to the cold patch;

其中,冷补丁可以是离线本地制作的,冷补丁的制作包括但不限于以下关键信息:Among them, the cold patch can be produced offline and locally, and the production of the cold patch includes but is not limited to the following key information:

网元基础版本信息,可用于匹配冷补丁在指定基础版本生效;NE basic version information, which can be used to match the cold patch to take effect in the specified basic version;

单板CPU型号信息,可用于匹配冷补丁在指定单板生效;The CPU model information of the board, which can be used to match the cold patch to take effect on the specified board;

本实施例中,网元打冷补丁,可以是包含多个单补丁的补丁包,也可以是单个补丁,不同CPU类型对应的单个补丁不同。In this embodiment, the cold patch applied to the network element may be a patch package containing multiple single patches, or may be a single patch, and the single patches corresponding to different CPU types are different.

S2012、校验冷补丁的版本信息,若校验成功则执行步骤S2013;S2012, verify the version information of the cold patch, and if the verification is successful, perform step S2013;

S2013、下载及安装冷补丁;S2013, download and install the cold patch;

冷补丁在本地制作完成后,通过网元版本安装操作,将冷补丁在当前网元环境中加载,冷补丁加载前,需要对冷补丁进行合法校验,主要包括:当前系统是否存在重名冷补丁,冷补丁格式是否合法等。After the cold patch is created locally, load the cold patch in the current NE environment through the NE version installation operation. Before the cold patch is loaded, the legality of the cold patch needs to be verified, including: whether the current system has a cold patch with the same name Patch, whether the cold patch format is legal, etc.

冷补丁加载到网元,并不要求冷补丁依赖的基础版本一定在网元存在或运行,理论上冷补丁也是一种特殊的版本,但是冷补丁的激活生效,必须要求冷补丁依赖的基础版本处于运行态。Cold patches are loaded to NEs, and the basic version that the cold patches depend on does not necessarily exist or run on the NEs. In theory, cold patches are also a special version, but the activation of the cold patches takes effect, and the basic versions that the cold patches depend on must be required. is running.

示例性的,在冷补丁安装完成后,可通过指令触发后续的无损升级,在触发后,可进行自动化的升级操作。Exemplarily, after the installation of the cold patch is completed, a subsequent non-destructive upgrade can be triggered through an instruction, and after the trigger, an automated upgrade operation can be performed.

S202、校验是否满足无损升级条件,若不满足,则执行步骤S203,若满足,则执行步骤S204;S202, verifying whether the lossless upgrade condition is met, if not, go to step S203, if so, go to step S204;

本示例中,主要校验内容包括:涉及主控单板的冷补丁升级,是否存在正常运行的备用主控单板;涉及普通单板(非主控单板)的冷补丁升级,同一CPU类型的待升级单板是否存在保护组关系或存在类似保护组关系。若涉及主控单板的冷补丁升级时,存在正常运行的备用主控单板,涉及普通单板的冷补丁升级时,普通单板存在保护组关系或存在类似保护组关系,则满足无损升级条件。若待升级单板不满足上述条件,则该待升级单板的升级优先级属于无效优先级(在一些实施过程中,这些无效优先级可以默认配置为最低优先级),还应当说明的是,在一些实施过程中,当前没有业务的待升级单板的升级优先级也可以设置为无效优先级。In this example, the main verification contents include: a cold patch upgrade involving the main control board, whether there is a normal running standby main control board; a cold patch upgrade involving a common board (non-main control board), the same CPU type Whether the board to be upgraded has a protection group relationship or a similar protection group relationship. If a cold patch upgrade involving the main control board exists, there is a normal running standby main control board, and when a cold patch upgrade involving a common board exists, the common board has a protection group relationship or a similar protection group relationship, and the non-destructive upgrade is satisfied. condition. If the board to be upgraded does not meet the above conditions, the upgrade priority of the board to be upgraded is an invalid priority (in some implementation processes, these invalid priorities can be configured as the lowest priority by default). It should also be noted that, In some implementation processes, the upgrade priority of the to-be-upgraded board that currently has no service may also be set to an invalid priority.

S203、向用户弹出提示当前的单板配置不满足无损升级条件;S203. A pop-up prompt is displayed to the user that the current board configuration does not meet the condition for non-destructive upgrade;

如果用户确认这些无效优先级升级的待升级单板同一批复位升级无影响或影响可接收,用户也是可以选择继续升级的。若接收到用户下发的继续升级指令,则继续进行升级,执行步骤S204。If the user confirms that the same batch of resetting and upgrading of the boards to be upgraded with invalid priorities has no effect or the effect is acceptable, the user can also choose to continue the upgrade. If an instruction for continuing the upgrade issued by the user is received, the upgrade is continued, and step S204 is executed.

S204、激活获取到的冷补丁;S204. Activate the acquired cold patch;

可以理解的是,冷补丁激活是一个单独流程,可以理解的是,冷补丁激活仅仅是硬盘版本运行文件软链接的更新。It is understandable that the cold patch activation is a separate process, and it is understandable that the cold patch activation is only an update of the soft link of the hard disk version running file.

应当注意的是,如果冷补丁修改变动比较大时,基础版本跟冷补丁版本可能存在兼容性问题,同时由于本示例在冷补丁进行无损升级是网元中的待升级单板按照升级优先级顺序分批进行的,或者存在不需要升级冷补丁的单板,这些情况都导致存在运行基础版本单板跟运行基础版本+冷补丁运行的单板共存情况,此时,不兼容的冷补丁应当要包含跨版本消息的兼容列表白名单(即跨版本消息ID以及消息新旧结构对应关系的列表),确保在升级过程中,整个网元运行的单板都能按照该兼容列表白名单进行消息兼容处理。此时应当检查冷补丁是否存在兼容列表,如果存在,首先将兼容列表下发到网元各单板,用于各单板进行兼容列表白名单白名单的兼容处理。It should be noted that if the cold patch modification changes are relatively large, there may be compatibility problems between the basic version and the cold patch version. At the same time, since the non-destructive upgrade of the cold patch in this example is performed on the NEs to be upgraded, the upgrade priority is followed. This is done in batches, or there are boards that do not need to be upgraded with cold patches. These situations lead to the coexistence of boards running the basic version and boards running the basic version + cold patch. In this case, incompatible cold patches should be installed. Contains the compatibility list whitelist of cross-version messages (that is, the list of cross-version message IDs and the corresponding relationship between the old and new message structures), to ensure that during the upgrade process, the boards running on the entire NE can perform message compatibility processing according to the compatibility list whitelist . At this point, you should check whether the cold patch has a compatibility list. If it exists, first deliver the compatibility list to each board of the NE, so that each board can perform compatibility processing on the whitelist and whitelist of the compatibility list.

S205、解析冷补丁,获取冷补丁对应的单板的CPU型号;S206、获取网元中单板的柜框槽静态配置,确认出该冷补丁涉及哪些槽位单板以及设置槽位;S205, analyze the cold patch, and obtain the CPU model of the board corresponding to the cold patch; S206, obtain the static configuration of the rack slot of the single board in the network element, and confirm which slot boards are involved in the cold patch and set the slot;

根据上述步骤S205中获取的单板的CPU型号以及柜框槽静态配置中的记录,能得知冷补丁涉及哪些槽位单板以及设置槽位。According to the CPU model of the board obtained in the above step S205 and the record in the static configuration of the cabinet frame slot, it can be known which slot boards involved in the cold patch and the set slot positions.

S207、生成升级优先级;S207. Generate an upgrade priority;

为了更好的理解本示例中升级优先级的设置方式。请参见图8所示,网元环境中,主控单板和备用主控单板都在各自位置正常运行,并且主控单板是跟各个单板之间通信的中枢,由于主控单板的特殊存在,应当优先升级主控单板和备用主控单板,本示例中,优先升级备用主控单板,在主备倒换后(即主控单板和备用主控单板的主备关系互换),升级原主控单板,应当注意的是,在主备倒换后,可以进行主控单板和备用主控单板之间的冷补丁文件的同步,保证主备倒换后冷补丁仍能够正常生效。示例性的,可设置数值表示升级优先级。例如数值范围0-255,本示例中数值越小即升级优先级越高,即越早进行升级操作。在一种示例中,可将主控单板的升级优先级默认设置为0,并按照上述方式完成主控单板和备用主控单板的升级,普通非主控单板的范围在1-254之间选取,对于无业务的单板或存在业务,但是没有配置业务保护组关系的单板,升级优先级可默认设置为255。To better understand how the escalation priority is set in this example. As shown in Figure 8, in the network element environment, the main control board and the standby main control board are running normally in their respective positions, and the main control board is the communication center with each board. The special existence of the main control board and the standby main control board should be upgraded first. In this example, the standby main control board is upgraded first. After the active-standby switchover (that is, the active and standby It should be noted that after the active/standby switchover, you can synchronize the cold patch files between the active control board and the standby main control board to ensure the cold patch file after the active/standby switchover. Patches still work normally. Exemplarily, a numerical value can be set to indicate an upgrade priority. For example, the value range is 0-255. In this example, the smaller the value, the higher the upgrade priority, that is, the earlier the upgrade operation is performed. In an example, the upgrade priority of the main control board can be set to 0 by default, and the upgrade of the main control board and the backup main control board can be completed in the above-mentioned manner. The range of common non-main control boards is 1- Select between 254. For a board with no service or a board with services but no service protection group relationship is configured, the upgrade priority can be set to 255 by default.

图8中,槽1的单板上的A业务与槽5的单板上的A业务是保护组关系,槽3的单板上的B业务跟槽5的单板上的B业务是保护组关系,槽3的单板上的C业务跟槽7的单板上的C业务是保护组关系,这三者之间是直接的保护组关系。互为直接的保护组关系的多块单板,不能全部配置为用一升级优先级,若单板之间没直接保护组关系的,可以配置为同一个升级优先级。在实际应用中,考虑到多个不同升级优先级的批次之间是完全串行升级的,所以为了确保升级尽早完成,可以尽量保证配置的升级优先级数量是最少的。In Figure 8, the service A on the board in slot 1 and the service A on the board in slot 5 are in a protection group relationship, and the service B on the board in slot 3 and the service B on the board in slot 5 are in a protection group The C service on the board in slot 3 and the C service on the board in slot 7 are in a protection group relationship, and the three are in a direct protection group relationship. Multiple boards with a direct protection group relationship cannot all be configured to use the same upgrade priority. If the boards do not have a direct protection group relationship, they can be configured to use the same upgrade priority. In practical applications, considering that multiple batches with different upgrade priorities are completely serialized, in order to ensure that the upgrade is completed as soon as possible, try to ensure that the number of configured upgrade priorities is the least.

本示例中,槽1、槽5的单板不配置为同一个升级优先级,槽3、槽7的单板不配置为同一个升级优先级,槽3、槽5的单板不配置为同一个升级优先级。所以在业务存在这种保护组关系时,计算出的一种升级优先级结果可以为,槽1的单板优先级为1时,直接保护组关系的槽5的单板优先级为2,由于槽3、槽5的单板也是直接保护组关系,所以槽3的单板不能配置为2,在为尽量保证配置升级优先级数量最小,优先配置为1,此时只剩槽7的单板优先级没有配置,由于槽7的单板仅跟槽3的单板是直接保护组关系,所以槽7的单板优先级配置为2即可满足要求.当第一批同时复位升级槽1、槽3的单板时,业务A、B、C可以正常运行在槽5、槽7的单板上而不中断,当槽1、槽3的单板升级冷补丁启动完成后,第二批复位升级槽5、槽7的单板时,业务A、B、C可以正常运行在槽1、槽3的单板上而不中断。可见,按照上述升级优先级分批依次进行升级,实现了无损升级。In this example, the boards in slot 1 and slot 5 are not configured with the same upgrade priority, the boards in slot 3 and slot 7 are not configured with the same upgrade priority, and the boards in slot 3 and slot 5 are not configured with the same upgrade priority. An upgrade priority. Therefore, when the service has such a protection group relationship, an upgrade priority result can be calculated as follows: when the priority of the board in slot 1 is 1, the priority of the board in slot 5 in the direct protection group relationship is 2. The boards in slot 3 and slot 5 are also in a direct protection group relationship. Therefore, the board in slot 3 cannot be configured as 2. In order to ensure the minimum number of configuration upgrade priorities, the priority is set to 1. At this time, only the board in slot 7 is left. The priority is not configured. Since the board in slot 7 is only in a direct protection group relationship with the board in slot 3, the priority of the board in slot 7 is set to 2 to meet the requirements. When the boards in slot 3 are installed, services A, B, and C can run normally on the boards in slots 5 and 7 without interruption. After the upgrade and cold patch of the boards in slots 1 and 3 are completed, the second batch of resets is performed. When upgrading boards in slots 5 and 7, services A, B, and C can run normally on boards in slots 1 and 3 without interruption. It can be seen that the upgrades are performed in batches according to the above-mentioned upgrade priorities, and a lossless upgrade is realized.

应当说明的是,在类似于本示例中根据保护组关系或主备关系进行的无损升级场景中,升级优先级是根据实际情况动态计算而得到的,一般而言不预先进行静态的配置或将升级优先级写盘。It should be noted that, in a scenario similar to the lossless upgrade based on the protection group relationship or the master/standby relationship in this example, the upgrade priority is dynamically calculated according to the actual situation. Upgrade the priority write disk.

S208、按照升级优先级由高至低依次完成升级;S208. Complete the upgrades in descending order according to the upgrade priority;

请参见图9,本实施例中,网元携带业务运行时,可以查看各个单板的升级优先级配置情况,各个槽位的升级优先级的生成是根据业务的保护组关系动态计算出来的,一般不通过静态配置,也不能将各个槽位动态计算的升级优先级写盘,各个槽位基于保护组关系生成的升级优先级是进行冷补丁无损升级的必要条件,对于无业务的单板,缺省的升级优先级都是默认255配置,但是这个缺省优先级也可能是单板存在业务,但是没有配置业务保护组关系,这种情况下,在进行冷补丁升级时,所有涉及升级的单板升级优先级不全是有效时,一键式升级会进行提示,如果用户确认这些无效优先级升级的单板同一批复位升级无影响或微损影响可接收,用户也是可以选择继续升级的。Referring to Fig. 9, in this embodiment, when the network element is running with services, the configuration of the upgrade priority of each board can be viewed. The generation of the upgrade priority of each slot is dynamically calculated according to the protection group relationship of the service. Generally, neither static configuration nor the dynamically calculated upgrade priority of each slot can be written to the disk. The upgrade priority generated by each slot based on the protection group relationship is a necessary condition for non-destructive cold patch upgrade. The default upgrade priority is the default configuration of 255, but this default priority may also be that the board has services, but no service protection group relationship is configured. In this case, when performing a cold patch upgrade, all upgrade-related When the upgrade priorities of the boards are not all valid, the one-click upgrade will prompt. If the user confirms that the upgrade of the boards with invalid priorities has no effect on the same batch of reset upgrades or the slight loss effect is acceptable, the user can also choose to continue the upgrade.

若涉及主控单板的升级,则按照上述S207中的策略对主控单板和备用主控单板进行升级。其余待升级单板按照升级优先级批次串行进行,同一批次升级优先级的多块待升级单板是同时升级的。If the upgrade of the main control board is involved, the main control board and the standby main control board are upgraded according to the strategy in S207 above. The remaining veneers to be upgraded are carried out serially in batches according to the upgrade priority, and multiple veneers to be upgraded of the same batch of upgrade priorities are upgraded at the same time.

对于非主控单板的冷补丁升级时,还可以判断冷补丁中的文件是不是仅存在进程软件的文件(即此次更新是否仅涉及进程),例如,在本示例中的判断方法是检查冷补丁文件的后缀是不是均为so类型文件(或其他进程特征的文件类型)。For the cold patch upgrade of the non-main control board, you can also judge whether the files in the cold patch only contain process software files (that is, whether the update only involves processes). For example, in this example, the judgment method is to check Are the suffixes of the cold patch files all so-type files (or other process-specific file types).

如果当前冷补丁都是进程的冷补丁,则非主控单板冷补丁升级可以仅仅通过重加载相应进程来实现,示例性的,一种具体处理方法可包括:读取冷补丁文件中配置文件,确认该冷补丁涉及的具体进程文件名,然后获取最小升级优先级批次的待升级单板的槽位,下发进程升级通知消息到这些待升级单板,消息内容携带需要请求的进程文件列表,待升级单板收到通知消息后,待升级单板通过文件传输协议(FileTransferProtocol,简称FTP)或其他传输协议将对应的进程文件下载到本地,待升级单板下载成功后,各自应答给主控单板,主控单板收到应答后,下发对应待升级单板的指定进程重启消息,待升级单板进行进程重启动作。更进一步的,如果冷补丁涉及的进程较多,这些进程逻辑上属于一个或几个虚拟进程组,此时主控单板在收到待升级单板冷补丁文件下载成功应答后,主控单板可以下发对应待升级单板的虚拟进程组进行重启一条消息,不用对同一虚拟进程组的多个进程分别发送进程重启消息。If the current cold patches are all cold patches of the process, the cold patch upgrade of the non-main control board can be implemented only by reloading the corresponding process. Exemplarily, a specific processing method may include: reading the configuration file in the cold patch file , confirm the specific process file name involved in the cold patch, obtain the slot of the board to be upgraded in the batch with the minimum upgrade priority, and send a process upgrade notification message to these boards to be upgraded. The content of the message carries the process file to be requested. List, after the board to be upgraded receives the notification message, the board to be upgraded downloads the corresponding process file to the local through the file transfer protocol (FileTransferProtocol, FTP for short) or other transmission protocols. After the board to be upgraded is successfully downloaded, each responds to the The main control board. After receiving the response, the main control board sends a specified process restart message corresponding to the board to be upgraded, and the board to be upgraded performs the process restart action. Furthermore, if the cold patch involves many processes, these processes logically belong to one or several virtual process groups. At this time, after the main control board receives the response that the cold patch file of the board to be upgraded is successfully downloaded, the main control board The board can send a message to restart the virtual process group of the board to be upgraded, instead of sending a process restart message to multiple processes in the same virtual process group.

可见,本步骤中的依次完成升级,不仅包括对单板的复位完成升级,也可包括仅对单板中的部分或全部进程、虚拟进程组的重加载完成升级。在实际应用中,上述步骤S202至S208中的至少一部分可以自动化的执行,且能够自动识别冷补丁的生效范围执行精准控制,用户仅需要根据提示进行决策并下发简单的指令,极大的简化了现场升级的操作,降低了对现场升级人员的要求。It can be seen that completing the upgrade sequentially in this step includes not only resetting the board to complete the upgrade, but also reloading only part or all of the processes and virtual process groups in the board to complete the upgrade. In practical applications, at least a part of the above steps S202 to S208 can be performed automatically, and can automatically identify the effective range of the cold patch and perform precise control. The user only needs to make decisions according to the prompts and issue simple instructions, which greatly simplifies The operation of field upgrade is reduced, and the requirements for field upgrade personnel are reduced.

当主控单板确认到当前升级优先级批次全部待升级单板重启正常后,主控单板才开始进行下一升级优先级批次的处理,直至升级优先级批次全部处理完成。或者,当主控单板收齐当前升级优先级批次的所有待升级单板的进程重启应答消息,并且进程全部重启正常后,主控单板才开始进行下一升级优先级批次的处理,直至升级优先级批次全部处理完成。当升级优先级批次全部处理完成,则该补丁包的升级完成。After the main control board confirms that all the boards to be upgraded in the current upgrade priority batch are restarted normally, the main control board starts to process the next upgrade priority batch until all the upgrade priority batches are processed. Alternatively, when the master control board has received all the process restart response messages of the boards to be upgraded in the current upgrade priority batch, and all processes have restarted normally, the master control board will start processing the next upgrade priority batch. , until all upgrade priority batches are processed. When all the upgrade priority batches are processed, the upgrade of the patch package is completed.

在本示例中,若个别单板升级失败,此时由于存在保护组关系,用户可以选择是继续升级还是避免影响业务必须无损或必须按照当前升级策略完成升级,若没有接收到继续升级的指令,此时可以触发升级回退,待问题解决后继续升级。另外,在进行冷补丁升级启动后,一般而言是屏蔽或禁止新业务接入的,否则在升级过程中,可能导致新接入业务或原有业务出现中断,升级过程中,优先保证当前正在进行的业务不中断。In this example, if the upgrade of individual boards fails, due to the existence of a protection group relationship, the user can choose whether to continue the upgrade or to avoid affecting the service without damage, or the upgrade must be completed according to the current upgrade policy. If no instruction to continue the upgrade is received, At this point, an upgrade rollback can be triggered, and the upgrade can continue after the problem is resolved. In addition, after the cold patch upgrade is started, the access of new services is generally blocked or prohibited. Otherwise, during the upgrade process, new access services or original services may be interrupted. During the upgrade process, priority should be given to ensuring that the current The ongoing business is not interrupted.

在实际应用中,由于升级过程一般比较久(几十分钟或更久),所以还可以选择在升级过程中增加升级进度的显示,实现升级操作的可视化,提升用户对升级结果的预期。下面以一示例对于升级进行的显示进行说明。In practical applications, since the upgrade process is generally long (tens of minutes or more), you can also choose to increase the display of the upgrade progress during the upgrade process to realize the visualization of the upgrade operation and improve the user's expectation of the upgrade result. The display of the upgrade is described below with an example.

本示例中,可向提供用户“show”等命令用于显示升级进度,升级进度显示内容包括但不限于:升级的版本,升级开始时间,升级结束时间,剩余预估时间,各批次升级优先级单板的升级状态(等待升级、升级中、升级完成,以及升级成功或升级失败等)。上述除了剩余预估时间外,其他内容都是升级实际阶段的实时结果,剩余预估时间是一个估算时间。In this example, commands such as "show" can be provided to the user to display the upgrade progress. The contents of the upgrade progress display include but are not limited to: upgraded version, upgrade start time, upgrade end time, remaining estimated time, and priority for each batch of upgrade Indicates the upgrade status of the primary board (waiting for upgrade, in progress, upgrade complete, and upgrade success or upgrade failure, etc.). Except for the remaining estimated time, other contents are the real-time results of the actual upgrade stage, and the remaining estimated time is an estimated time.

如图10,示意列举说明了剩余预估时间算法的实际运算过程,将升级过程划分几个关键阶段,每个阶段缺省配置一个预估耗时时间。具体的,对于同一批次优先级升级的单板可能存在多块,可以取该批次预估耗时时间值最大的,所以将升级过程细分后,整体剩余预估时间就有了基准预估时间:本此升级涉及的各个阶段预估耗时时间+各批次升级优先级升级预估耗时时间。但是这个经验值在不同业务模型或场景下,可能存在差异,为了更精确,可以引入网元升级耗时学习调整过程,在实际升级过程中,每个阶段升级结束计算出实际耗时,跟当前阶段预估耗时比较(预估耗时比实际耗时多,对外显示预估整体耗时减去偏差值,反之,增加偏差值),就可以动态调整对外显示的整体剩余预估时间,同时将各个阶段实际升级耗时时间写入数据库,在下次升级时,优先读取数据库中的预估耗时时间做预估基准(第一次升级数据库不存在或数据库中仅记录预估耗时时间,此时只能使用各个阶段缺省配置的预估耗时时间),这样剩余预估时间将更精准。Figure 10 schematically illustrates the actual operation process of the remaining estimation time algorithm. The upgrade process is divided into several key stages, and each stage is configured with an estimated time-consuming time by default. Specifically, for the same batch of priority-upgraded boards, there may be multiple boards, and the one with the largest estimated time-consuming time value for the batch can be selected. Therefore, after subdividing the upgrade process, the overall remaining estimated time has a baseline estimate. Estimated time: The estimated time-consuming time of each stage involved in this upgrade + the estimated time-consuming time of each batch of upgrade priority upgrade. However, there may be differences in this experience value in different business models or scenarios. To be more accurate, a learning and adjustment process of network element upgrade time-consuming can be introduced. Comparing the estimated time-consuming stage (estimated time-consuming is more than the actual time-consuming, the estimated overall time-consuming minus the deviation value is displayed externally, and vice versa, the deviation value is added), and the overall remaining estimated time displayed externally can be dynamically adjusted. Write the actual upgrade time in each stage into the database, and in the next upgrade, read the estimated time in the database first as an estimated benchmark (the database for the first upgrade does not exist or only the estimated time is recorded in the database). , you can only use the estimated elapsed time of the default configuration of each stage), so that the remaining estimated time will be more accurate.

作为一种具体示例,当前升级过程示意存在6个阶段,每个阶段预估耗时时间有缺省配置,该6个阶段的预估耗时时间的累加值等于78min(分钟),就作为了升级启动时,显示剩余预估时间的最初时间,当第一个阶段实际升级完成后,实际耗时时间为12min,由于在升级过程中,对外显示的剩余预估时间是实时递减的,所以在本阶段实际升级完成时,显示的剩余预估时间是78-12=66min,但是本阶段预估耗时时间是15min,所以该阶段升级完成后,进入下阶段开始,对外呈现的剩余预估时间需要补偿偏差值(加或减补偿),由于此阶段预估耗时时间大于实际耗时时间,所以剩余预估时间需要减去此阶段预估耗时时间的偏差值66-3=63min。此时剩余预估时间的显示由66min会直接跳变到63min,没有时间递减的过程。As a specific example, the current upgrade process indicates that there are 6 stages, each stage has a default configuration of the estimated time-consuming time, and the cumulative value of the estimated time-consuming time of the 6 stages is equal to 78min (minutes), which is When the upgrade starts, the initial time of the remaining estimated time is displayed. When the actual upgrade in the first stage is completed, the actual time-consuming time is 12 minutes. Since the remaining estimated time displayed externally decreases in real time during the upgrade process, the When the actual upgrade at this stage is completed, the remaining estimated time displayed is 78-12=66min, but the estimated time at this stage is 15min, so after the upgrade at this stage is completed, the next stage starts, and the remaining estimated time displayed to the outside world The deviation value needs to be compensated (plus or minus compensation). Since the estimated time-consuming time at this stage is greater than the actual time-consuming time, the remaining estimated time needs to be subtracted from the deviation value 66-3=63min of the estimated time-consuming time at this stage. At this time, the display of the remaining estimated time will directly jump from 66min to 63min, and there is no time decreasing process.

同理,第二阶段开始在第一阶段纠正后的剩余预估时间63min作为基准,通过示例可以看出,第二阶段预估时间小于了实际耗时时间,偏差值是5min,但是由于对外时间显示是实时递减,在第二阶段刚结束时,剩余预估时间递减到63-25=38min,但是在第二阶段结束后进行此阶段的预估耗时时间偏差补偿后,剩余预估时间发生跳变,对外调整显示的剩余预估时间为38+5=43min。In the same way, the second stage starts with the remaining estimated time of 63min after the correction in the first stage as the benchmark. It can be seen from the example that the estimated time of the second stage is less than the actual time-consuming time, and the deviation value is 5min, but due to the external time The display is real-time decreasing. At the end of the second stage, the remaining estimated time decreases to 63-25=38min, but after the second stage is completed, the estimated time-consuming time deviation compensation for this stage is performed, and the remaining estimated time occurs. Jump, the remaining estimated time displayed by external adjustment is 38+5=43min.

其他阶段依次类推,在升级结束后,剩余预估时间会调整为0min,表明当前升级已结束。Other stages are analogous. After the upgrade, the remaining estimated time will be adjusted to 0min, indicating that the current upgrade has ended.

参见图11所示,示意说明了在升级过程中增加的升级进度的显示示例,实现升级操作的可视化,提升用户对升级结果的心理预期,通过向用户提供用于显示升级进度命令(如前述示例中的“show”命令),升级进度显示内容包括但不限于:升级的版本,升级开始时间,升级结束时间,剩余预估时间,各批次升级优先级单板的升级状态(等待升级、升级中、升级完成,以及升级成功或升级失败等)。Referring to FIG. 11, it schematically illustrates an example of the display of the upgrade progress added during the upgrade process, to realize the visualization of the upgrade operation, and to improve the user's psychological expectation for the upgrade result. The "show" command in ), the upgrade progress display includes but is not limited to: upgraded version, upgrade start time, upgrade end time, remaining estimated time, upgrade status of each batch of upgrade priority boards (waiting for upgrade, upgrade in progress, the upgrade is complete, and the upgrade succeeds or fails, etc.).

该图11表示了升级刚开始时的状态,当前升级结束时间还未知不显示,待启动冷补丁升级的单板按照升级优先级分行显示,已启动升级的优先级批次升级状态显示为Upgrading(升级中),未启动升级的优先级批次升级状态显示为Wait-Upgrade(等待升级)。同时可以看到主控单板的升级优先级最高,非主控单板的升级优先级都是从1开始的。Figure 11 shows the status at the beginning of the upgrade. The current upgrade end time is unknown and is not displayed. The boards to be upgraded with the cold patch are displayed according to the upgrade priority. The upgrade status of the priority batches that have been upgraded is displayed as Upgrading ( Upgrading), the priority batch upgrade status that has not started the upgrade is displayed as Wait-Upgrade (waiting for upgrade). At the same time, it can be seen that the upgrade priority of the main control board is the highest, and the upgrade priority of the non-main control board starts from 1.

同时需要说明的是,冷补丁升级过程显示的升级状态,仅仅是涉及冷补丁升级的单板的升级状态,如果冷补丁包中不涉及升级的单板,是不会显示在冷补丁升级状态中的。At the same time, it should be noted that the upgrade status displayed during the cold patch upgrade process is only the upgrade status of the boards involved in the cold patch upgrade. of.

如图12所示,表示了升级进行中时的状态,当前冷补丁升级的单板按照升级优先级分行显示,已完成升级的优先级批次升级状态(Status一栏)显示为Upgraded(升级完成),正在升级的优先级批次升级状态显示为Upgrading(升级中),剩余预估时间在实时递减调整。对于普通单板的冷补丁升级,同一批次升级优先级的多块单板都是同时升级的,该批次单板的升级进度显示为Upgrading(升级中)。同时,冷补丁升级过程显示升级已经完成的升级状态,包含了该批次升级优先级各个单板的单独升级状态。例如:主控单板升级优先级(priority一栏)为0,主控单板存在主备槽位(主控单板和备用主控单板的槽位),升级结果是都升级成功,Success(升级成功)一栏显示为ALL表示全部升级成功,普通单板升级优先级为1的单板包括1、3槽的单板,同时该批次优先级已升级完成,但是该批次优先级的单板的升级结果可能不完全相同,因而可以分别显示,1槽升级成功,3槽升级失败。若个别单板升级失败,此时由于存在保护组的关系,用户可以选择是继续升级还是避免影响业务停止升级,若不继续升级可以触发升级回退,待问题解决后继续无损或微损升级。As shown in Figure 12, it shows the status when the upgrade is in progress. The boards currently upgraded by the cold patch are displayed according to the upgrade priority. The upgrade status (Status column) of the priority batch that has been upgraded is displayed as Upgraded ), the upgrade status of the priority batch being upgraded is displayed as Upgrading, and the remaining estimated time is decremented in real time. For the cold patch upgrade of common boards, multiple boards with the same upgrade priority are upgraded at the same time, and the upgrade progress of this batch of boards is displayed as Upgrading. At the same time, the cold patch upgrade process shows the upgrade status that the upgrade has been completed, including the individual upgrade status of each board with the upgrade priority of the batch. For example: the upgrade priority of the main control board (the priority column) is 0, and the main control board has active and standby slots (the slots of the main control board and the standby main control board), and the upgrade result is that the upgrade is successful. Success The (upgrade success) column displays ALL to indicate that all the upgrades are successful. The boards with the upgrade priority of 1 for common boards include boards in slots 1 and 3. At the same time, the priority of the batch has been upgraded, but the priority of the batch is upgraded. The upgrade results of the boards may not be exactly the same, so it can be displayed separately that the upgrade of slot 1 succeeds and the upgrade of slot 3 fails. If the upgrade of individual boards fails, the user can choose whether to continue the upgrade or stop the upgrade to avoid affecting services due to the existence of the protection group.

如图13所示,表示了升级进行结束时的状态,当前升级结束时间已正常显示升级结束的时间,升级预估的剩余时间也是在实时递减调整为0min了。此时,冷补丁升级状态全部显示为Upgraded(升级完成),但是升级的结果单独显示在Success(升级成功)以及Fail(升级失败)两列,若个别单板升级失败,此时可以单独针对升级失败的单板确认问题后单独恢复。As shown in Figure 13, it shows the status at the end of the upgrade. The current upgrade end time has normally displayed the time when the upgrade ended, and the estimated remaining time of the upgrade is also adjusted to 0min in real time. At this point, the upgrade status of the cold patch is all displayed as Upgraded (upgrade completed), but the upgrade results are displayed in the Success (upgrade success) and Fail (upgrade failure) columns. The failed board can be recovered independently after confirming the problem.

实施例三:Embodiment three:

本实施例提供了一种单板设备,参见图14所示,其包括处理器141、存储器142及通信总线143,其中:This embodiment provides a single-board device, as shown in FIG. 14, which includes a processor 141, a memory 142, and a communication bus 143, wherein:

通信总线143用于实现处理器141和存储器142之间的连接通信;The communication bus 143 is used to realize the connection communication between the processor 141 and the memory 142;

处理器141用于执行存储器142中存储的一个或者多个计算机程序,以实现上述实施例一和实施例二中的单板升级方法中的至少一个步骤。The processor 141 is configured to execute one or more computer programs stored in the memory 142 to implement at least one step in the method for upgrading a board in the first and second embodiments above.

本实施例还提供了一种计算机可读存储介质,该计算机可读存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、计算机程序模块或其他数据)的任何方法或技术中实施的易失性或非易失性、可移除或不可移除的介质。计算机可读存储介质包括但不限于RAM(RandomAccessMemory,随机存取存储器),ROM(Read-OnlyMemory,只读存储器),EEPROM(ElectricallyErasableProgrammablereadonlymemory,带电可擦可编程只读存储器)、闪存或其他存储器技术、CD-ROM(CompactDiscRead-OnlyMemory,光盘只读存储器),DVD(Digital versatiledisc,数字多功能盘)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。The present embodiments also provide a computer-readable storage medium embodied in any method or technology for storing information, such as computer-readable instructions, data structures, computer program modules, or other data volatile or nonvolatile, removable or non-removable media. Computer-readable storage media include but are not limited to RAM (Random Access Memory, random access memory), ROM (Read-Only Memory, read only memory), EEPROM (Electrically Erasable Programmable read only memory, electrically erasable programmable read only memory), flash memory or other memory technologies, CD-ROM (Compact Disc Read-Only Memory), DVD (Digital Versatile Disc, Digital Versatile Disc) or other optical disk storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage device, or may be used to store desired information and any other medium that can be accessed by a computer.

本实施例中的计算机可读存储介质可用于存储一个或者多个计算机程序,其存储的一个或者多个计算机程序可被处理器执行,以实现上述实施例一和实施例二中的单板升级方法的至少一个步骤。The computer-readable storage medium in this embodiment may be used to store one or more computer programs, and the one or more computer programs stored therein may be executed by a processor to implement the board upgrade in the first and second embodiments above at least one step of the method.

可见,本领域的技术人员应该明白,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件(可以用计算装置可执行的计算机程序代码来实现)、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。It can be seen that those skilled in the art should understand that all or some of the steps in the methods disclosed above, the functional modules/units in the system, and the device can be implemented as software (which can be implemented by computer program codes executable by a computing device). ), firmware, hardware, and their appropriate combination. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be composed of several physical components Components execute cooperatively. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit .

此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、计算机程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。所以,本发明不限制于任何特定的硬件和软件结合。In addition, communication media typically embodies computer readable instructions, data structures, computer program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and can include any information delivery, as is well known to those of ordinary skill in the art medium. Therefore, the present invention is not limited to any particular combination of hardware and software.

以上内容是结合具体的实施方式对本发明实施例所作的进一步详细说明,不能认定本发明的具体实施只局限于这些说明。对于本发明所属技术领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干简单推演或替换,都应当视为属于本发明的保护范围。The above content is a further detailed description of the embodiments of the present invention in conjunction with specific implementations, and it cannot be considered that the specific implementation of the present invention is limited to these descriptions. For those of ordinary skill in the technical field of the present invention, without departing from the concept of the present invention, some simple deductions or substitutions can be made, which should be regarded as belonging to the protection scope of the present invention.

Claims (10)

1. A single board upgrading method includes:
activating the obtained patch package;
analyzing the patch package to obtain the single board parameters corresponding to the patch package;
confirming a setting slot position of the single board to be upgraded corresponding to the patch package according to the single board parameters;
and upgrading the single board to be upgraded according to the set slot position.
2. The board upgrading method according to claim 1, wherein the upgrading the board to be upgraded according to the set slot includes:
if the update file in the patch package does not include an update file other than the process update file, the single board to be upgraded is not restarted, so that the process or the virtual process group corresponding to the upgrade in the single board to be upgraded is restarted to complete the upgrade; and if the update files in the patch package comprise update files except the process update files, resetting and restarting the single board to be upgraded to finish upgrading.
3. The board upgrade method according to claim 2, wherein the restarting the process or the virtual process group corresponding to the upgrade in the board to be upgraded to complete the upgrade includes:
acquiring configuration information in the patch package;
confirming the process file name related to the upgrade according to the configuration information;
and restarting the corresponding process or virtual process group after the single board to be upgraded acquires the process file in the patch package.
4. The board upgrade method according to claim 1, wherein before activating the obtained patch package, the method further includes:
when the current single board configuration is verified to not meet the lossless upgrading condition, prompting a user that the current single board configuration does not meet the lossless upgrading condition;
if the current single board configuration is verified to meet the lossless upgrading condition, or a continuous upgrading instruction issued by the user is received after the current single board configuration is prompted to meet the lossless upgrading condition, continuously upgrading the single board to be upgraded; if the instruction for continuing upgrading is not received, the single board to be upgraded is not upgraded.
5. The board upgrade method according to claim 4, wherein the lossless upgrade condition includes:
the single boards to be upgraded with services have a main and standby single board relationship and/or a protection group relationship;
the upgrading the board to be upgraded comprises the following steps:
generating an upgrade priority according to the main and standby veneer relation and/or the protection group relation;
sequentially upgrading the single board to be upgraded according to the upgrading priority from high to low, and executing services through the single board which is not currently executing upgrading in the upgrading process;
if the master control single board needs to be upgraded, the upgrade priority of the standby master control single board is the highest priority, and the upgrade priority of the master control single board is only next to that of the standby master control single board;
if the non-master control single board needs to be upgraded, generating upgrading priorities for the non-master control single board based on the protection group relationship, and setting at least two of the non-master control single boards with the direct protection group relationship as different upgrading priorities;
the service executed by the single board which is not currently executing the upgrade includes at least one of the following:
the service corresponding to the veneer which is not currently executing upgrading is obtained;
and the service corresponding to the single board which is not currently performing the upgrade and has the relationship between the main single board and the standby single board and/or the protection group relationship with the single board performing the upgrade.
6. The board upgrading method according to claim 5, wherein the upgrading the board to be upgraded further includes:
if the upgrading of the single board to be upgraded fails in the process of lossless upgrading, a prompt is sent to a user;
after a prompt of failure of upgrading of the single board to be upgraded is sent to a user, when an instruction for continuing upgrading is received, patch upgrading is continued, and if the instruction for continuing upgrading is not received, the upgraded single board is returned to a state before upgrading.
7. The board upgrading method according to any of claims 1-6, further comprising:
and displaying the progress of upgrading.
8. The board upgrading method according to any of claims 1-6, further comprising:
and stopping the access of the new service before finishing the upgrading aiming at the patch package.
9. A single board device comprises a processor, a memory and a communication bus;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute one or more computer programs stored in the memory to implement the steps of the single board upgrade method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores one or more computer programs which are executable by one or more processors to implement the steps of the single board upgrade method according to any one of claims 1 to 8.
CN202011302415.6A 2020-11-19 2020-11-19 Single board upgrade method, single board device and computer readable storage medium Active CN114518891B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011302415.6A CN114518891B (en) 2020-11-19 2020-11-19 Single board upgrade method, single board device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011302415.6A CN114518891B (en) 2020-11-19 2020-11-19 Single board upgrade method, single board device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN114518891A true CN114518891A (en) 2022-05-20
CN114518891B CN114518891B (en) 2025-04-18

Family

ID=81594899

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011302415.6A Active CN114518891B (en) 2020-11-19 2020-11-19 Single board upgrade method, single board device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN114518891B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106201586A (en) * 2016-06-28 2016-12-07 青岛海信移动通信技术股份有限公司 A kind of method for upgrading system based on OTA and terminal, system
CN106293849A (en) * 2016-08-18 2017-01-04 华为技术有限公司 A kind of application update method and terminal
WO2017185253A1 (en) * 2016-04-27 2017-11-02 华为技术有限公司 Patch upgrade-based file processing method and device, terminal, and storage medium
CN107766069A (en) * 2017-10-17 2018-03-06 安徽皖通邮电股份有限公司 A kind of embedded system hot patch implementation method
CN108874410A (en) * 2017-05-09 2018-11-23 中兴通讯股份有限公司 patch management method and device
CN108958772A (en) * 2018-07-03 2018-12-07 武汉精测电子集团股份有限公司 A kind of batch upgrading method and system of more board equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017185253A1 (en) * 2016-04-27 2017-11-02 华为技术有限公司 Patch upgrade-based file processing method and device, terminal, and storage medium
CN106201586A (en) * 2016-06-28 2016-12-07 青岛海信移动通信技术股份有限公司 A kind of method for upgrading system based on OTA and terminal, system
CN106293849A (en) * 2016-08-18 2017-01-04 华为技术有限公司 A kind of application update method and terminal
CN108874410A (en) * 2017-05-09 2018-11-23 中兴通讯股份有限公司 patch management method and device
CN107766069A (en) * 2017-10-17 2018-03-06 安徽皖通邮电股份有限公司 A kind of embedded system hot patch implementation method
CN108958772A (en) * 2018-07-03 2018-12-07 武汉精测电子集团股份有限公司 A kind of batch upgrading method and system of more board equipment

Also Published As

Publication number Publication date
CN114518891B (en) 2025-04-18

Similar Documents

Publication Publication Date Title
USRE41162E1 (en) Method for providing scaleable restart and backout of software upgrades for clustered computing
US8589909B2 (en) Techniques for reducing down time in updating applications with metadata
US9146726B2 (en) System and method for firmware update for network connected storage subsystem components
US20130036328A1 (en) Managing continuous software deployment
CN101950254B (en) Software updating method and system thereof
US20120174086A1 (en) Extensible Patch Management
CN112434008A (en) Distributed database upgrading method, device and medium
CN105260209A (en) Hot-update solution of program
CN101895671A (en) Set top box Loader module updating method and set top box thereof
CN112433769A (en) BMC starting method and device, computer equipment and storage medium
CN111651304B (en) Software recovery method and device based on double-core intelligent ammeter and computer equipment
CN110597545A (en) Hot patch intelligent upgrading method and system based on OTA component
US8689048B1 (en) Non-logging resumable distributed cluster
CN109375953B (en) Operating system starting method and device
CN114356658A (en) Method for processing abnormal firmware upgrade, computer device and readable storage medium
CN115202680A (en) System and method for automatically upgrading local client on line in remote manner
CN111949290B (en) Hot patch management method and device, electronic equipment and storage medium
CN112256283A (en) Application version control method and device for Android equipment
CN114518891A (en) A single-board upgrade method, single-board device and computer-readable storage medium
WO2024113995A1 (en) Bmc heterogeneous upgrading method and system, device, and readable storage medium
CN113687867B (en) Shutdown method, system, equipment and storage medium of cloud platform cluster
CN116028084A (en) Cross-version hot upgrading method, system and terminal based on OpenStack cloud platform
CN112817629B (en) BIOS refresh method and related device for ARM architecture server platform
US11714631B2 (en) Method, electronic device, and computer program product for managing operating system
CN118018407A (en) Firmware upgrading method of switch, medium and product

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