Software updating method and device, access network equipment and medium
By parsing the hot patch description file and replacing the dynamic link library address of the target board in the access network device, the problem of software upgrade needs to be restarted, and software updates without restart are achieved, which improves the user experience of end users.
Patent Information
- Application Number
- CN202311207990.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-19
- Publication Date
- 2025-03-21
AI Technical Summary
The prior art needs to restart during the software upgrade of access network equipment, resulting in an interruption of running services and affecting the user experience of end users.
By obtaining the hot patch description file, parsing its contents to obtain the identification information of the dynamic link library and the information of the target board, determining the target board and replacing the address of the abnormal function in the dynamic link library to be upgraded, so as to realize software updates without restarting.
Without restarting the access network device, the software is upgraded to avoid software operation abnormalities, and provides terminal users with uninterrupted wireless communication services to improve user experience.
Smart Images

Figure CN119668639A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of wireless communication technology, and in particular to a software updating method, device, access network equipment and medium. Background Art
[0002] Access network equipment is the interface equipment for terminal equipment to access the Internet, which refers to the wireless signal transmission between terminal equipment and the access network equipment in a certain radio coverage area. Among them, the access network equipment is at the core of the wireless communication system. If the software in the access network equipment needs to be upgraded or a fault (bug) occurs, it will affect the use of the terminal equipment.
[0003] In the related technology, when the software in the access network equipment (such as satellite base stations and ground base stations) needs to be upgraded or fails, the compiled normal version of the dynamic link library file (or SO (Shared Object) file) can be transferred to the flash memory to be updated through the OM (Operation Maintain) module in the access network equipment, and a restart can be triggered. After the restart, the new SO file in the Flash is loaded, so that the software or APP (Application) can run the function implementation in the new SO file, and the upgrade process is completed.
[0004] However, the software upgrade process requires a restart, and the running business needs to be interrupted, resulting in an unwarranted interruption of the connected terminal, affecting the user experience of the terminal. Summary of the invention
[0005] The present application provides a method, apparatus, access network equipment and medium for software updating.
[0006] According to one aspect of the present application, a software update method is provided, which is executed by an access network device, and the method includes: obtaining a hot patch description file, and parsing the hot patch description file to obtain first identification information of a hot patch dynamic link library, second identification information of a first function in the hot patch dynamic link library, and third identification information of a target board; determining a target board from at least one board of the access network device according to the third identification information; determining a first address of the first function in the hot patch dynamic link library according to the first identification information and the second identification information; using the first address to replace the second address of an abnormal second function in the dynamic link library to be upgraded in the target board; wherein the replaced first address is used for calling the first function according to the first address when the software in the access network device calls the second function during the running stage, so as to implement the function corresponding to the first function.
[0007] As a possible implementation method, determining the first address of the first function in the hot patch dynamic link library based on the first identification information and the second identification information includes: receiving the first identification information and the second identification information sent by the operation and maintenance OM module in the access network device through the target board; querying the hot patch dynamic link library matching the first identification information from the target board according to the first identification information through the target board; determining the first address of the first function from the hot patch dynamic link library according to the second identification information through the target board.
[0008] As a possible implementation manner, the method further includes: obtaining a compiled hot patch dynamic link library through the OM module; and sending the hot patch dynamic link library to the target board for storage according to the third identification information through the OM module.
[0009] As a possible implementation method, the target board determines the first address of the first function from the hot patch dynamic link library according to the second identification information, including: using the target board to use the dynamic link to open the dlopen function to open the hot patch dynamic link library; using the target board to use the dynamic link symbol dlsym function to obtain the first address of the first function from the hot patch dynamic link library according to the second identification information.
[0010] As a possible implementation method, the first address is used to replace the second address of the abnormal second function in the dynamic link library to be upgraded in the target board, including: obtaining fourth identification information of the second function through the target board; obtaining the second address of the second function from the dynamic link library to be upgraded according to the fourth identification information through the target board; and replacing the second address of the second function with the first address through the target board.
[0011] As a possible implementation method, obtaining the second address of the second function from the dynamic link library to be upgraded through the target board according to the fourth identification information, including: using the dlopen function through the target board to open the dynamic link library to be upgraded; parsing the dynamic link library to be upgraded through the target board to obtain a target field; extracting a target table item from the target field through the target board; wherein the target table item is used to store the function address of at least one function in the dynamic link library to be upgraded; obtaining the second address of the second function from the target table item through the target board according to the fourth identification information.
[0012] As a possible implementation method, obtaining the fourth identification information of the second function through the target board includes: determining the fourth identification information of the second function through the target board according to the second identification information; or, the fourth identification information of the second function is recorded in the hot patch description file, and obtaining the fourth identification information of the second function through the target board includes: receiving the fourth identification information sent by the OM module through the target board; wherein the fourth identification information is obtained by parsing the hot patch description file by the OM module.
[0013] As a possible implementation method, the target board adopts the first address to replace the second address of the second function, including: the target board changes the function based on the mprotect memory read and write attribute to replace the second address of the second function in the dynamic link library to be upgraded with the first address.
[0014] As a possible implementation method, the first identification information and the second identification information sent by the operation and maintenance OM module in the access network device are received through the target board card, including: when the OM module is integrated on the target board card, the first identification information and the second identification information are obtained from the message queue through the target board card; wherein the first identification information and the second identification information in the message queue are written by the OM module; or, when the OM module is not integrated on the target board card, the user datagram protocol UDP message sent by the OM module is received through the target board card; wherein the UDP message carries the first identification information and the second identification information.
[0015] According to another aspect of the present application, an access network device is provided, including:
[0016] Memory, transceiver, processor:
[0017] A memory for storing computer programs; a transceiver for transmitting and receiving data under the control of a processor; a processor for reading the computer program in the memory and performing the following operations: obtaining a hot patch description file and parsing the hot patch description file to obtain first identification information of a hot patch dynamic link library, second identification information of a first function in the hot patch dynamic link library, and third identification information of a target board; determining a target board from at least one board of an access network device according to the third identification information; determining a first address of a first function in the hot patch dynamic link library according to the first identification information and the second identification information; using the first address to replace a second address of an abnormal second function in a dynamic link library to be upgraded in the target board; wherein the replaced first address is used for calling the first function according to the first address when the software in the access network device calls the second function during the running stage, so as to implement the function corresponding to the first function.
[0018] As a possible implementation method, the processor executes to determine the first address of the first function in the hot patch dynamic link library based on the first identification information and the second identification information, specifically: receiving the first identification information and the second identification information sent by the operation and maintenance OM module in the access network device through the target board; querying the hot patch dynamic link library matching the first identification information from the target board according to the first identification information through the target board; determining the first address of the first function from the hot patch dynamic link library according to the second identification information through the target board.
[0019] As a possible implementation manner, the processor is further used to perform the following operations: obtaining a compiled hot patch dynamic link library through the OM module; and sending the hot patch dynamic link library to the target board for storage according to the third identification information through the OM module.
[0020] As a possible implementation method, the processor executes through the target board card to determine the first address of the first function from the hot patch dynamic link library according to the second identification information, specifically: through the target board card, use the dynamic link to open the dlopen function to open the hot patch dynamic link library; through the target board card, use the dynamic link symbol dlsym function to obtain the first address of the first function from the hot patch dynamic link library according to the second identification information.
[0021] As a possible implementation method, the processor executes the first address to replace the second address of the abnormal second function in the dynamic link library to be upgraded in the target board, specifically: obtaining the fourth identification information of the second function through the target board; obtaining the second address of the second function from the dynamic link library to be upgraded according to the fourth identification information through the target board; and replacing the second address of the second function with the first address through the target board.
[0022] As a possible implementation method, the processor executes, through the target board, obtaining the second address of the second function from the dynamic link library to be upgraded according to the fourth identification information, specifically: using the dlopen function through the target board to open the dynamic link library to be upgraded; parsing the dynamic link library to be upgraded through the target board to obtain a target field; extracting a target table item from the target field through the target board; wherein the target table item is used to store the function address of at least one function in the dynamic link library to be upgraded; and obtaining, through the target board, the second address of the second function from the target table item according to the fourth identification information.
[0023] As a possible implementation method, the processor executes to obtain the fourth identification information of the second function through the target board, specifically: determining the fourth identification information of the second function according to the second identification information through the target board; or, the fourth identification information of the second function is recorded in the hot patch description file, and the processor executes to obtain the fourth identification information of the second function through the target board, specifically: receiving the fourth identification information sent by the OM module through the target board; wherein the fourth identification information is obtained by parsing the hot patch description file by the OM module.
[0024] As a possible implementation method, the processor executes the target board card to adopt the first address to replace the second address of the second function, specifically: the target board card changes the function based on the mprotect memory read and write attributes to replace the second address of the second function in the dynamic link library to be upgraded with the first address.
[0025] As a possible implementation method, the processor executes receiving the first identification information and the second identification information sent by the operation and maintenance OM module in the access network device through the target board, specifically: when the OM module is integrated on the target board, obtaining the first identification information and the second identification information from the message queue through the target board; wherein the first identification information and the second identification information in the message queue are written by the OM module; or, when the OM module is not integrated on the target board, receiving the User Datagram Protocol UDP message sent by the OM module through the target board; wherein the UDP message carries the first identification information and the second identification information.
[0026] According to another aspect of the present application, a software updating device is provided, which is applied to an access network device, including:
[0027] The acquisition module is used to obtain the hot patch description file;
[0028] A parsing module, used for parsing the hot patch description file to obtain the first identification information of the hot patch dynamic link library, the second identification information of the first function in the hot patch dynamic link library and the third identification information of the target board;
[0029] A determination module, configured to determine a target board from at least one board of the access network device according to the third identification information, and to determine a first address of the first function in the hot patch dynamic link library according to the first identification information and the second identification information;
[0030] A replacement module is used to use a first address to replace the second address of an abnormal second function in a dynamic link library to be upgraded in a target board; wherein the replaced first address is used for calling the first function according to the first address when the software in the access network device calls the second function during the running phase, so as to implement the function corresponding to the first function.
[0031] As a possible implementation method, the determination module is specifically used to: receive the first identification information and the second identification information sent by the operation and maintenance OM module in the access network device through the target board card; query the hot patch dynamic link library matching the first identification information from the target board card according to the first identification information through the target board card; determine the first address of the first function from the hot patch dynamic link library according to the second identification information through the target board card.
[0032] As a possible implementation method, the acquisition module is also used to: obtain the compiled hot patch dynamic link library through the OM module;
[0033] The software updating device further includes:
[0034] The sending module is used to send the hot patch dynamic link library to the target board for storage according to the third identification information through the OM module.
[0035] As a possible implementation method, a module is determined, which is specifically used to: use dynamic linking to open the dlopen function through the target board to open the hot patch dynamic link library; use the dynamic link symbol dlsym function through the target board to obtain the first address of the first function from the hot patch dynamic link library according to the second identification information.
[0036] As a possible implementation method, the replacement module is specifically used to: obtain the fourth identification information of the second function through the target board; obtain the second address of the second function from the dynamic link library to be upgraded according to the fourth identification information through the target board; and replace the second address of the second function with the first address through the target board.
[0037] As a possible implementation method, the replacement module is specifically used to: open the dynamic link library to be upgraded by using the dlopen function through the target board; parse the dynamic link library to be upgraded by the target board to obtain the target field; extract the target table item from the target field by the target board; wherein the target table item is used to store the function address of at least one function in the dynamic link library to be upgraded; obtain the second address of the second function from the target table item according to the fourth identification information by the target board.
[0038] As a possible implementation method, the replacement module is specifically used to: determine the fourth identification information of the second function according to the second identification information through the target board; or, receive the fourth identification information sent by the OM module through the target board; wherein the fourth identification information is obtained by the OM module parsing the hot patch description file.
[0039] As a possible implementation, the replacement module is specifically used to: replace the second address of the second function in the dynamic link library to be upgraded with the first address through the target board based on the mprotect memory read and write attribute change function.
[0040] As a possible implementation method, a determination module is specifically used for: when the OM module is integrated on a target board, obtaining first identification information and second identification information from a message queue through the target board; wherein the first identification information and the second identification information in the message queue are written by the OM module; or, when the OM module is not integrated on the target board, receiving a User Datagram Protocol UDP message sent by the OM module through the target board; wherein the UDP message carries the first identification information and the second identification information.
[0041] According to another aspect of the present application, a processor-readable storage medium is provided, wherein the processor-readable storage medium stores a computer program, and the computer program is used to enable the processor to execute the software update method described in the above embodiment.
[0042] According to another aspect of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the software updating method described in the above embodiment of the present application is implemented.
[0043] The software update method, device, access network device and medium provided in the embodiments of the present application can realize the replacement of faulty or abnormal functions by using a hot patch solution without restarting the access network device, that is, the function address of the normal function in the hot patch dynamic link library of the compiled normal version can be used to update the function address of the abnormal function in the dynamic link library to be updated, so that the software in the access network device can call the normal function in the hot patch dynamic link library according to the updated function address corresponding to the abnormal function during the running stage to execute the function of the normal function, and the software bug can be upgraded without resetting the board (including the processor), affecting the cell status, and affecting the terminal access service, so as to avoid abnormal software operation, provide uninterrupted wireless communication services to terminal users, and improve the user experience of terminal users.
[0044] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present application.
[0046] Figure 1is a schematic diagram of the structure of a wireless communication system;
[0047] Figure 2 A schematic diagram of the existing upgrade process of the software platform of the satellite base station;
[0048] Figure 3 A flowchart of a software update method provided in an embodiment of the present application;
[0049] Figure 4 A flowchart of another software update method provided in an embodiment of the present application;
[0050] Figure 5 A flowchart of another software update method provided in an embodiment of the present application;
[0051] Figure 6 A flowchart of another software update method provided in an embodiment of the present application;
[0052] Figure 7 Schematic diagram of the implementation principle of the software update provided in the embodiment of the present application Figure 1 ;
[0053] Figure 8 Schematic diagram of the implementation principle of the software update provided in the embodiment of the present application Figure 2 ;
[0054] Fig. 9 A schematic diagram of the update process of the abnormal function provided in the embodiment of the present application;
[0055] Fig.10 A schematic diagram of the process from compiling to running a function in a dynamic link library provided in an embodiment of the present application;
[0056] Fig.11 A schematic diagram of a specific flow chart of function replacement provided in an embodiment of the present application;
[0057] Fig.12 A schematic diagram of the implementation flow of the feedback mechanism provided in the embodiment of the present application;
[0058] Fig.13 A schematic diagram of the structure of an access network device provided in an embodiment of the present application;
[0059] Fig.14 A schematic diagram of the structure of a software updating device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0060] In the embodiments of the present application, the term "and / or" describes the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0061] In the embodiments of the present application, the term "plurality" refers to two or more than two, and other quantifiers are similar.
[0062] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0063] Taking the satellite base station as an example, in the satellite communication system, it is very important to provide full-domain and full-time communication services for terminal devices, so it is necessary to minimize the service interruption caused by software fault upgrades. However, in the current application scenario, if it is necessary to repair the abnormal software bug in the satellite base station's software platform, it is necessary to replace the abnormal version of the satellite base station's software platform with the recompiled dynamic link library version. During the repair process, it is necessary to power off and restart, which will interrupt the service and affect the terminal's user experience.
[0064] As an example, the satellite base station is in Figure 1 The core position of the wireless communication system shown in the figure, the satellite base station transmits wireless signals to the terminal equipment through the mobile communication exchange center. If the software on the satellite base station side needs to be upgraded or fails, it will inevitably affect the use of the terminal user. Figure 1 The ISL in it refers to the abbreviation of interstellar link or inter-satellite link (Inter-Satellite Link).
[0065] For example, the existing upgrade process of the software in the software platform of the satellite base station is as follows: Figure 2 As shown, it mainly includes the following steps:
[0066] in, Figure 2The BBU_Upgrade.ini in the file refers to the software upgrade process description file in the existing upgrade solution, which is used to describe the name of the dynamic link library to be replaced by the software upgrade (or the name of the dynamic link library file, where the dynamic link library file is also called the SO file, so the name of the dynamic link library is also called the name of the SO file, referred to as the SO name for short) and the location information or slot information of a specific board (hereinafter referred to as the target board); Upgrade.out includes the compressed dynamic link libraries corresponding to all boards in the satellite base station.
[0067] Step 1, the OM module in the satellite base station parses the BBU_Upgrade.ini file to obtain the name of the new dynamic link library (or the name of the dynamic link library file, where the dynamic link library file is also called the SO file, so the name of the dynamic link library is also called the name of the SO file, referred to as the SO name for short) and the location information or slot information of the target board in the satellite base station;
[0068] Step 2: The OM module transfers Upgrade.out to the Flash of the target board through the FTP (File Transfer Protocol) tool;
[0069] Step 3: The OM module triggers a restart. After the restart, the operating system reloads the new dynamic link library (recorded as SO file) in the Flash according to the SO name.
[0070] Step 4: The software in the satellite base station runs the function implementation in the new dynamic link library (ie, SO file), and the upgrade process ends.
[0071] like Figure 2 As shown, in the current software platform upgrade solution, if a bug occurs in the software platform of the satellite base station, or the software platform of the satellite base station needs to be upgraded for other reasons, the recompiled SO version needs to be uploaded and loaded, and finally restarted. In this process, there are mainly the following four disadvantages:
[0072] 1. Before restarting, you need to save the current configuration file of the satellite base station and add additional procedures;
[0073] 2. After the restart, the running business needs to be interrupted, and the connected terminal devices are interrupted without any signs (from the user's perspective), which affects the user experience of the terminal users;
[0074] 3. After restarting, the OM module needs to re-establish the cell according to the saved current configuration file. After all initialization is completed, the terminal device re-accesses;
[0075] 4. Generally, the software platform upgrade of satellite base stations needs to undergo integration testing and has a long release cycle.
[0076] It should be noted that the above only takes the access network device as a satellite base station as an example to exemplify the software upgrade process. In actual application, the access network device may also be a ground base station, wherein the software upgrade method of the ground base station is similar to the software upgrade method of the satellite base station. For example, the software upgrade process of the ground base station may include the following steps:
[0077] 1) The OM module can obtain the software upgrade process description file, and parse the software upgrade process description file to obtain the name of the new dynamic link library, the location information or slot information of the target board in the ground base station;
[0078] 2) The OM module transfers the new dynamic link library to the Flash of the target board through the FTP tool;
[0079] 3) The OM module triggers a restart. After the restart, the operating system reloads the new dynamic link library in the Flash according to the name of the new dynamic link library;
[0080] 4) The software in the ground base station runs the function implementation in the new dynamic link library, and the upgrade process ends.
[0081] Among them, the software upgrade process of the ground base station has similar shortcomings as the software upgrade process of the satellite base station, which will not be elaborated here.
[0082] Therefore, in order to solve at least one of the above-mentioned problems, the embodiments of the present application provide a software update method, device, access network equipment and medium, wherein the method and device are based on the same application concept. Since the principles of solving the problems by the method and device are similar, the implementation of the device and the method can refer to each other, and the repeated parts will not be repeated.
[0083] The software update method, device, access network device and medium provided by the present application are described below with reference to the accompanying drawings. Before describing the embodiments of the present application in detail, for ease of understanding, common technical terms are first introduced:
[0084] The hot patch description file (referred to as HotPatch.ini for short) is used to describe the identification information (referred to as the first identification information in this application) of the dynamic link library that needs to be replaced (referred to as the hot patch dynamic link library in this application, that is, the normal version or the latest version of the dynamic link library after compilation) , The second identification information of the normal function or normal symbol (referred to as the first function in this application) in the hot patch dynamic link library, and the third identification information of the specific board card (referred to as the target board card in this application) to which the hot patch dynamic link library needs to be replaced.
[0085] The first identification information is used to uniquely identify the hot patch dynamic link library. For example, the first identification information may be the file name of the hot patch dynamic link library.
[0086] The second identification information is used to uniquely identify the first function. For example, the second identification information may be a function name or a symbol name of the first function.
[0087] The third identification information is used to uniquely identify the target board. For example, the third identification information may be the location information, slot information or board name of the target board.
[0088] The first address refers to the actual function address or symbol address of the first function in the hot patch dynamic link library.
[0089] The dynamic link library to be upgraded refers to the dynamic link library to be upgraded or of abnormal version in the target board. The file format of the dynamic link library to be upgraded may be, for example, ELF (Executable and Linkable Format).
[0090] The second function refers to an abnormal function or symbol in the dynamic link library to be upgraded.
[0091] The second address refers to the actual function address or symbol address of the second function in the dynamic link library to be upgraded.
[0092] The fourth identification information is used to uniquely identify the second function. For example, the fourth identification information may be a function name or a symbolic name of the second function.
[0093] The dlopen function refers to the dynamic link opening function, which is used to open the dynamic link library.
[0094] The dlsym function refers to the dynamic link symbol function, which is used to find the function address or symbol address.
[0095] The target field refers to a section in the dynamic link library to be upgraded, and the function address is stored in the target field. For example, the target field may be a dynsym section (dynamic symbol table) in the dynamic link library to be upgraded in the ELF format.
[0096] The target table entry refers to the table entry in the target field used to store the function address. For example, the target table entry can be a REL.PLT (Relocation Procedure Linkage Table, or relocation entry table) table entry or a PLT (Procedure Linkage Table) table entry in the dynsym section.
[0097] The mprotect function refers to the memory read and write attribute change function.
[0098] UDP is the abbreviation of User Datagram Protocol.
[0099] LMT is the abbreviation of Local Maintain Tool.
[0100] BBU is the abbreviation of Base Band Unit.
[0101] A cell refers to an area covered by wireless information in mobile communications.
[0102] OSP is the abbreviation of Operating System Platform, which is the software platform layer of the access network device, providing an interface for upper-layer applications. In this application, the OSP process is responsible for receiving the SO command sent by the OM module and the identification information of the normal function or symbol Symbol that needs to be replaced, and replacing the abnormal function of the software platform of the current access network device.
[0103] Among them, the OM module is at the upper layer of the software platform of the access network device, and is mainly responsible for the software platform operation process of the access network device. In this application, the OM module simultaneously completes the following functions: responsible for parsing the first identification information of the hot patch dynamic link library in the HotPatch.ini file, the second identification information of the first function or Symbol to be replaced, and sending it to the OSP process in the target board; responsible for parsing the third identification information of the target board in the HotPatch.ini file, and according to the third identification information, downloading the compiled normal version of the hot patch dynamic link library to the file system of the target board through the FTP tool.
[0104] Figure 3 A flowchart of a software updating method provided in an embodiment of the present application.
[0105] The software update method of the embodiment of the present application can be executed by an access network device.
[0106] Among them, the access network equipment can be a ground base station or a satellite base station, among which the satellite base station is a base station on the service satellite of the terminal equipment.
[0107] Among them, the base station may include multiple cells that provide services for terminal devices. Depending on the specific application scenario, the base station may also be called an access point, or may be a device in the access network that communicates with the wireless terminal device through one or more sectors on the air interface, or other names. The base station can be used to exchange received air frames with Internet Protocol (IP) packets, and act as a router between the wireless terminal device and the rest of the access network, where the rest of the access network may include an Internet Protocol (IP) communication network. The base station can also coordinate the attribute management of the air interface. For example, the base station involved in the embodiments of the present application may be a base station (Base Transceiver Station, BTS) in the Global System for Mobile communications (GSM) or Code Division Multiple Access (CDMA), or a base station (NodeB) in Wide-band Code Division Multiple Access (WCDMA), or an evolutionary Node B (eNB or e-NodeB) in the long term evolution (LTE) system, or a 5G base station (gNB) in the 5G network architecture (next generation system), or a home evolved Node B (HeNB), a relay node, a femto, a pico, etc., which is not limited in the embodiments of the present application. In some network structures, the base station may include a centralized unit (CU) node and a distributed unit (DU) node, and the centralized unit and the distributed unit may also be arranged geographically separately.
[0108] The terminal device may be a device that provides voice and / or data connectivity to a user, a handheld device with a wireless connection function, or other processing devices connected to a wireless modem. In different systems, the names of the terminal devices may also be different. For example, in a 5G system, the terminal device may be called a user equipment (UE). The wireless terminal device may communicate with one or more core networks (CN) via a radio access network (RAN). The wireless terminal device may be a mobile terminal device, such as a mobile phone (or a "cellular" phone) and a computer with a mobile terminal device. For example, it may be a portable, pocket-sized, handheld, computer-built-in or vehicle-mounted mobile device that exchanges language and / or data with a wireless access network. For example, personal communication service (PCS) phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDA) and other devices. The wireless terminal device may also be referred to as a system, a subscriber unit, a subscriber station, a mobile station, a mobile station, a remote station, an access point, a remote terminal device, an access terminal device, a user terminal device, a user agent, and a user device, but is not limited thereto in the embodiments of the present application.
[0109] like Figure 3 As shown, the software update method may include the following steps:
[0110] Step S301, obtaining a hot patch description file, and parsing the hot patch description file to obtain first identification information of a hot patch dynamic link library, second identification information of a first function in the hot patch dynamic link library, and third identification information of a target board.
[0111] Among them, the hot patch description file can be provided by the R&D personnel or maintenance personnel of the board, and the hot patch description file includes the first identification information of the hot patch dynamic link library, the second identification information of the first function in the hot patch dynamic link library and the third identification information of the target board.
[0112] As an example, taking the first identification information as the file name, the second identification information as the function name, and the third identification information as the slot information, the format of the hot patch description file may be as shown in Table 1.
[0113] Table 1 Format of hot patch description file
[0114]
[0115] In an embodiment of the present application, the access network device can obtain a hot patch description file and parse the hot patch description file to obtain the first identification information of the hot patch dynamic link library, the second identification information of the first function in the hot patch dynamic link library, and the third identification information of the target board.
[0116] Still taking the above example, the hot patch description file is a table file. The first identification information (such as XXX_HotPach.so) can be obtained from the second line of the table file, the third identification information (such as XXX_BOARD) can be obtained from the third line of the table file, and the second identification information (such as XXX_FunC_HP) can be obtained from the fourth line of the table.
[0117] Step S302: determining a target board from at least one board of the access network device according to the third identification information.
[0118] In the embodiment of the present application, the access network device determines, based on the third identification information, a target board whose identification information matches the third identification information from at least one board of the access network device.
[0119] Step S303: Determine a first address of the first function in the hot patch dynamic link library according to the first identification information and the second identification information.
[0120] In an embodiment of the present application, the access network device can determine the actual function address or symbol address (referred to as the first address in the present application) of the first function in the hot patch dynamic link library based on the first identification information and the second identification information.
[0121] Step S304, using the first address to replace the second address of the abnormal second function in the dynamic link library to be upgraded in the target board; wherein the replaced first address is used for the software in the access network device to call the second function during the running stage, and the first function is called according to the first address to implement the function corresponding to the first function.
[0122] In an embodiment of the present application, the access network device can use the first address of the first function to replace the second address of the abnormal second function in the dynamic link library to be upgraded in the target board, so that when the software in the access network device calls the second function in the dynamic link library to be upgraded during the running stage, it can call the function implementation of the first function in the hot patch dynamic link library according to the replaced first address corresponding to the second function to implement the function corresponding to the first function.
[0123] The software update method of the embodiment of the present application can realize the replacement of faulty or abnormal functions by using a hot patch solution without restarting the access network device. That is, the function address of the normal function in the hot patch dynamic link library of the compiled normal version can be used to update the function address of the abnormal function in the dynamic link library to be updated. Therefore, during the running stage, the software in the access network device can call the normal function in the hot patch dynamic link library according to the updated function address corresponding to the abnormal function to execute the function of the normal function. It can be achieved that the software bug is upgraded without resetting the board (including the processor), affecting the cell status, and affecting the terminal access service, so as to avoid abnormal software operation, provide uninterrupted wireless communication services to terminal users, and improve the user experience of terminal users.
[0124] In order to clearly explain how the access network device in any embodiment of the present application determines the first address of the first function in the hot patch dynamic link library based on the first identification information and the second identification information, the present application also proposes a software update method.
[0125] Figure 4 A flowchart of another software updating method provided in an embodiment of the present application.
[0126] like Figure 4 As shown, the software update method can be executed by an access network device, wherein the access network device includes an OM module and a target board. The method may include the following steps:
[0127] Step S401, obtaining a hot patch description file through the OM module, and parsing the hot patch description file to obtain first identification information of the hot patch dynamic link library, second identification information of the first function in the hot patch dynamic link library, and third identification information of the target board.
[0128] Step S402: Determine a target board from at least one board of the access network device according to the third identification information through the OM module.
[0129] The explanation of steps S401 to S402 can be found in the relevant description in any embodiment of the present application and will not be repeated here.
[0130] Step S403: receiving the first identification information and the second identification information sent by the OM module through the target board.
[0131] In the embodiment of the present application, after determining the target board, the OM module can send the first identification information and the second identification information to the target board, and correspondingly, the target board can receive the first identification information and the second identification information sent by the OM module.
[0132] In any embodiment of the present application, when the OM module is set on the target board, or when the OM module is integrated on the target board, the OM module can write the first identification information and the second identification information into the message queue, and accordingly, the target board can obtain the first identification information and the second identification information from the message queue.
[0133] In any embodiment of the present application, when the OM module is not set on the target board, or when the OM module is not integrated on the target board, the OM module can send a UDP message carrying the first identification information and the second identification information to the target board, so that the target board can receive the UDP message sent by the OM module and extract the first identification information and the second identification information from the UDP message.
[0134] Step S404: the target board searches for a hotfix dynamic link library matching the first identification information from the target board according to the first identification information.
[0135] In the embodiment of the present application, the target board can query the hot patch dynamic link library matching the first identification information from its own file system according to the first identification information.
[0136] In any embodiment of the present application, before step S404, the OM module may also send the hot patch dynamic link library to the file system of the target board for storage.
[0137] For example, the OM module can obtain the compiled hot patch dynamic link library provided by the R&D personnel or the maintenance personnel, and send the hot patch dynamic link library to the file system of the target board through the FTP tool.
[0138] Step S405 : determining the first address of the first function from the hot patch dynamic link library according to the second identification information through the target board.
[0139] In the embodiment of the present application, the target board determines the first address of the first function from the hot patch dynamic link library according to the second identification information of the first function.
[0140] In any embodiment of the present application, the method for obtaining the first address is, for example: the target board can use the dlopen function to open the hot patch dynamic link library, and through the dlsym function, obtain the first address of the first function from the hot patch dynamic link library according to the second identification information.
[0141] For example, the second identification information of the first function may be used as a function parameter (eg, input parameter) of the dlsym function, and the first address of the first function may be determined according to the output of the dlsym function.
[0142] Step S406, using the first address through the target board to replace the second address of the abnormal second function in the dynamic link library to be upgraded in the target board; wherein the replaced first address is used for the software in the access network device to call the second function during the running stage, and the first function is called according to the first address to implement the function corresponding to the first function.
[0143] In an embodiment of the present application, the target board can use the first address of the first function to replace the second address of the abnormal second function in the dynamic link library to be upgraded, so that when the software in the access network device calls the second function in the dynamic link library to be upgraded during the running stage, it can call the function implementation of the first function in the hot patch dynamic link library according to the replaced first address corresponding to the second function to implement the function corresponding to the first function.
[0144] The software update method of the embodiment of the present application can upgrade faulty or abnormal functions through interaction between the OM module and the target board, provide uninterrupted wireless communication services to terminal users, and improve the user experience of terminal users.
[0145] In order to clearly illustrate how the access network device in any embodiment of the present application uses the first address to replace the second address of the abnormal second function in the dynamic link library to be upgraded in the target board, the present application also proposes a software update method.
[0146] Figure 5 A flowchart of another software updating method provided in an embodiment of the present application.
[0147] like Figure 5 As shown, the software update method can be executed by an access network device, wherein the access network device includes an OM module and a target board. The method may include the following steps:
[0148] Step S501, obtaining a hot patch description file through the OM module, and parsing the hot patch description file to obtain first identification information of the hot patch dynamic link library, second identification information of the first function in the hot patch dynamic link library, and third identification information of the target board.
[0149] Step S502: Determine a target board from at least one board of the access network device according to the third identification information through the OM module.
[0150] Step S503: receiving the first identification information and the second identification information sent by the OM module through the target board.
[0151] Step S504: determining, by the target board according to the first identification information and the second identification information, a first address of the first function in the hot patch dynamic link library.
[0152] The explanation of steps S501 to S504 can be found in the relevant description in any embodiment of the present application and will not be repeated here.
[0153] Step S505: obtaining, through the target board, fourth identification information of the abnormal second function in the dynamic link library to be upgraded.
[0154] In the embodiment of the present application, the target board can obtain the fourth identification information of the abnormal second function in the dynamic link library to be upgraded stored in its own file system.
[0155] In any embodiment of the present application, the second identification information of the first function (such as the function name) can be named by the R&D personnel or the maintenance personnel according to the fourth identification information of the abnormal second function. In the present disclosure, the target board can determine the fourth identification information based on the second identification information.
[0156] As an example, the R&D personnel or maintenance personnel can add a prefix (or suffix) based on the fourth identification information and use it as the second identification information of the first function. For example, the fourth identification information is XXX_Func, and the second identification information can be XXX_Func_HP or HP_XXX_Func.
[0157] At this time, the target board may remove the prefix (or suffix) from the second identification information to obtain the fourth identification information.
[0158] In any embodiment of the present application, the fourth identification information of the second function may also be recorded in the hot patch description file, and after the OM module parses the hot patch description file, the first identification information, the second identification information, the third identification information and the fourth identification information may be obtained at the same time. In the present disclosure, the target board may receive the fourth identification information sent by the OM module.
[0159] As an example, taking the first identification information as the file name, the second identification information and the fourth identification information as the function name, and the third identification information as the slot information, the format of the hot patch description file may be as shown in Table 2.
[0160] Table 2 Format of hot patch description file
[0161] File name describe XXX_HotPach.so Hot patch dynamic link library XXX_BOARD Target board slot information XXX_FunC_HP The name of the first function (symbol) to be replaced XXX_FunC The name of the original function (i.e. the second function of the exception)
[0162] It should be noted that when the hot patch description file includes the fourth identification information of the second function (such as the function name), the function names of the second function and the first function may not be similar. For example, the function name of the first function may be AAA_FunC, and the function name of the second function may be BBB_FunC.
[0163] In summary, the fourth identification information of the second function can be determined in different ways, which can improve the flexibility and applicability of the method.
[0164] Step S506: acquiring, by the target board according to the fourth identification information, a second address of the second function from the dynamic link library to be upgraded.
[0165] In an embodiment of the present application, the target board can obtain the actual function address or symbolic address (referred to as the second address in the present application) of the second function from the dynamic link library to be upgraded according to the fourth identification information of the second function.
[0166] Step S507: Using the first address through the target board to replace the second address of the second function.
[0167] The replaced first address is used by the software in the access network device to call the first function according to the first address when calling the second function during the running stage, so as to implement the function corresponding to the first function.
[0168] In the embodiment of the present application, the target board can use the first address to replace the second address of the abnormal second function in the dynamic link library to be upgraded.
[0169] It should be noted that since the address is in the data segment, the memory may not have write permission. Therefore, in any embodiment of the present application, the write permission can be added through the mprotect function, that is, the target board can replace the second address of the abnormal second function in the dynamic link library to be upgraded with the first address based on the mprotect function to improve the effectiveness and accuracy of the address update.
[0170] For example, the first address and the second address may be used as function parameters of the mprotect function, so that the mprotect function updates the function address of the second function in the dynamic link library to be upgraded from the second address to the first address according to the function parameters.
[0171] The software update method of the embodiment of the present application can enable the target board to effectively obtain the actual function address of the abnormal function from the dynamic link library to be upgraded based on the identification information of the abnormal function, and use the actual function address of the normal function to effectively update or replace the actual function address of the abnormal function.
[0172] In order to clearly illustrate any of the above embodiments, the present application also proposes a software updating method.
[0173] Figure 6 A flowchart of another software updating method provided in an embodiment of the present application.
[0174] The software update method provided in the embodiment of the present application can be executed by an access network device, wherein the access network device includes an OM module and a target board.
[0175] like Figure 6 As shown, the software update method may include the following steps:
[0176] Step S601, obtaining a hot patch description file through the OM module, and parsing the hot patch description file to obtain first identification information of the hot patch dynamic link library, second identification information of the first function in the hot patch dynamic link library, and third identification information of the target board.
[0177] Step S602: Determine a target board from at least one board of the access network device according to the third identification information through the OM module.
[0178] Step S603: receiving the first identification information and the second identification information sent by the OM module through the target board.
[0179] Step S604: determining, by the target board according to the first identification information and the second identification information, a first address of the first function in the hot-patch dynamic link library.
[0180] Step S605: obtaining, through the target board, fourth identification information of the abnormal second function in the dynamic link library to be upgraded.
[0181] The explanation of steps S601 to S605 can be found in the relevant description in any embodiment of the present application and will not be repeated here.
[0182] Step S606, using the dlopen function through the target board to open the dynamic link library to be upgraded.
[0183] In the embodiment of the present application, the target board can use the dlopen function to open the dynamic link library to be upgraded.
[0184] Step S607: parsing the dynamic link library to be upgraded through the target board to obtain a target field.
[0185] In the embodiment of the present application, the target board can parse the dynamic link library to be upgraded to obtain the target field. For example, the file format of the dynamic link library to be upgraded can be ELF format, and the dynamic link library to be upgraded in ELF format can be parsed, and the target field obtained can be dynsym section.
[0186] Step S608: extracting a target table entry from the target field through the target board; wherein the target table entry is used to store the function address of at least one function in the dynamic link library to be upgraded.
[0187] In an embodiment of the present application, the target board can extract a target table entry for storing the function addresses of each function in the dynamic link library to be upgraded from the target field. For example, the target table entry can be a REL.PLT table entry or a PLT table entry in the dynsym section.
[0188] Step S609: acquiring the second address of the second function from the target table entry according to the fourth identification information through the target board.
[0189] In the embodiment of the present application, the target board can determine the function address corresponding to the fourth identification information from the target table entry according to the fourth identification information of the second function, and use it as the second address of the second function.
[0190] Step S610: Using the first address through the target board to replace the second address of the second function.
[0191] The replaced first address is used by the software in the access network device to call the first function according to the first address when calling the second function during the running stage, so as to implement the function corresponding to the first function.
[0192] For the explanation of step S610, reference may be made to the relevant description in any embodiment of the present disclosure, and no further details will be given here.
[0193] The software update method of the embodiment of the present application can be implemented by the target board card extracting the target table entry for storing the function address from the target field of the dynamic link library to be upgraded, and accurately obtaining the function address of the abnormal function from the target table entry based on the identification information of the abnormal function.
[0194] In any embodiment of the present application, the access network device is used as a satellite base station for exemplary explanation, and a method can be provided in the field of satellite communications for upgrading faulty or abnormal functions without resetting the board (including the processor), affecting the cell status, and affecting the terminal access service, that is, repairing the faulty process in the running state without restarting.
[0195] Specifically, a hot patch solution can be used to replace faulty or abnormal functions without restarting the satellite base station, with almost no impact on the terminal, and to achieve lossless software upgrades quickly and at low cost.
[0196] That is, the core idea of this application is: to address the drawback that the existing process software upgrade requires restart, we can use the redirection mechanism of the dynamic link library under the Linux platform, combined with the OM module, LMT tool, FTP technology, etc., to perform a one-click, fast, and low-cost upgrade of the bug of the satellite base station software platform, thereby reducing the cost of upgrading and repairing software failures. The implementation principle can be as follows Figure 7 As shown, it mainly includes the following steps:
[0197] in, Figure 7 The solid-line boxes in the figure represent modules, and the dotted-line boxes represent processing flows.
[0198] Step 1: The local LMT of the satellite base station initiates the software upgrade process and uploads the newly generated hot patch dynamic link library to the file system of the target board of the satellite base station through the FTP tool.
[0199] Step 2: The OM module of the satellite base station parses the HotPatch.ini file (provided by the R&D personnel of the target board).
[0200] Step 3, the OM module parses and obtains the first identification information of the hot patch dynamic link library, the second identification information of the first function to be replaced, and the third identification information of the target board, and sends the first identification information and the second identification information to the OSP process in the target board according to the third identification information.
[0201] Step 4-5: The OSP process upgrades the old version of the dynamic link library to be updated according to the second identification information and the first identification information provided by the OM module, and replaces the abnormal second function.
[0202] That is, the OSP process can activate the hot patch (OSP_Active_HotPatch), determine the function address of the normal function in the new version of the hot patch dynamic link library (the storage directory is / ramDisk / HotPatch.so) according to the second identification information and the first identification information provided by the OM module, and replace the function address of the abnormal function in the old version of the dynamic link library to be updated (the storage directory is / ramDisk / Original.so).
[0203] Step 6: The upper-layer software running stage calls the second function provided in the upgraded dynamic link library to be updated, and the upgrade is completed.
[0204] The detailed process may include the interaction between the OM module and the OSP process in the target board, and the replacement of the function by the OSP process.
[0205] In the first step, the OM module interacts with the OSP process, such as Figure 8 As shown, it mainly includes the following sub-steps:
[0206] 1. The OM module parses the description information in the HotPatch.ini file. For example, the existing software upgrade process can be used to add parsing of the HotPatch.ini file. The HotPatch.ini file is a hot patch description file, and its main format can be shown in Table 1 or Table 2. Table 1 or Table 2 uses the first identification information and the second identification information as names, and the third identification information is slot information for example.
[0207] Compared with the BBU_Upgrade.ini file in the existing upgrade process, the HotPatch.ini file adds the name of the first function (or symbol) that needs to be replaced in the hot patch dynamic link library. The OM module needs to parse the hot patch description file, obtain the name of the first function (or symbol) and the name of the hot patch description file, and send them to the OSP process for replacement.
[0208] 2. After acquiring the first identification information and the second identification information, the OM module sends the first identification information and the second identification information to the OSP process in the target board according to the third identification information of the target board.
[0209] in, Figure 8 Taking the target board as board 1 and HotPatch.out as the compressed hot patch dynamic link library as an example, when updating the dynamic link library to be upgraded in board 1, HotPatch.out needs to be decompressed to obtain the hot patch dynamic link library, so that the OSP process in board 1 can obtain the first address of the first function from the hot patch dynamic link library (the storage directory is / ramDisk / HotPatch.so) according to the first identification information and the second identification information, and replace the second address of the abnormal second function in the old version of the dynamic link library to be updated (the storage directory is / ramDisk / Original.so) according to the first address.
[0210] It should be noted that the present application can support the dynamic link library upgrade of multiple boards. A set of OSP processes are run separately on each board, and the dynamic link library to be updated in the corresponding board is updated through the OSP process.
[0211] The specific implementation process of the OSP process replacing the function address can be as follows: Fig. 9 As shown:
[0212] 1) The OM module obtains the HotPatch.ini file, and parses the HotPatch.ini file to obtain the first identification information, the second identification information, and the third identification information;
[0213] 2) The OM module sends the first identification information and the second identification information to the OSP process in the target board corresponding to the third identification information through the Osp_Send interface.
[0214] Specifically, if it is an on-board SO upgrade, that is, the OM module is integrated on the target board, the OM module can directly send the first identification information and the second identification information to the OSP process in the target board through the MQ (Message Queue) of Linux IPC (Inter-Process Communication). The OSP process can receive the first identification information and the second identification information through the Osp_Recv interface, and perform abnormal function or Symbol replacement according to the first identification information and the second identification information.
[0215] If it is a cross-board SO upgrade, that is, the OM module is not integrated on the target board, the OM module can send a UDP message to the OSP process in the target board through the Ethernet port, wherein the UDP message carries the first identification information and the second identification information. Accordingly, the OSP process can receive the UDP message through the Osp_Recv interface, and perform abnormal function or Symbol replacement according to the first identification information and the second identification information in the UDP message.
[0216] In the second step, the OSP process replaces the abnormal functions or symbols of the target board.
[0217] The core idea is: the program running under the Linux platform needs to go through the stages of compilation, linking, and running. If the upper-level software or application calls the function provided by the underlying dynamic link library, the specific location of the function in the dynamic link library is unclear during compilation, so it will be compiled into the form of @plt instead of the specific function location information. During the actual call (Run time), the location information of the specific function or symbol Symbol in the dynamic link library will be written back from the rel.plt position to the @plt position to complete the calling process.
[0218] As an example, the temp.c file calls the function XXX_Func in the dynamic link library libA.so. The compilation and running process can be as follows Fig.10 shown.
[0219] Fig.10XXX_Func@plt: When temp.c is compiled, the specific address of the XXX_Func function is not known, and the assembly code of @plt is generated to mark the runtime loading; Relocation: Redirection (relocation), the XXX_Func in the dynamic link library will be rewritten to the assembly plt position during the runtime, which is the redirection process.
[0220] In this application, the actual function address in the REL.PLT table entry in the dynamic link library to be updated can be replaced before redirection to achieve the purpose of function replacement.
[0221] Assume that the name of the dynamic link library to be upgraded is libA.so (the file format is ELF format), the name of the abnormal second function is XXX_Func, the name of the hot patch dynamic link library is libA_hp.so, and the name of the normal first function in the hot patch dynamic link library is XXX_Func_HP. The core steps include:
[0222] Step 1: Use the dlopen function to open the hot patch dynamic link library, and use the dlsym function to obtain the function address of the normal first function XXX_Func_HP in the hot patch dynamic link library;
[0223] Step 2: Use the dlopen function to open the dynamic link library to be upgraded, parse the ELF format libA.so, and parse the .dynsymsection in libA.so to obtain the function address of the abnormal second function XXX_Func in the REL.plt table entry;
[0224] Step 3: Use the function address of the first function to rewrite the function address of the second function to complete the replacement.
[0225] The specific process of function replacement can be as follows Fig.11 As shown, it mainly includes the following steps:
[0226] In step A, the OSP process in the target board executes two flow branches in parallel, wherein the first flow branch includes subsequent steps BD and the second flow branch includes subsequent steps EF.
[0227] Among them, the first process branch includes:
[0228] Step B, use dlopen function to open LibA.so;
[0229] Step C, parsing the original dynamic link library file, that is, parsing the LibA.so file in ELF format, and obtaining the PLT table entry by parsing .dynsymsection, etc.;
[0230] Step D, find the actual function address of XXX_Func through the PLT table entry obtained in step C.
[0231] Among them, the second process branch includes:
[0232] Step E, using the dlopen function to open LibA_hp.so;
[0233] Step F, using the dlsym function to obtain the function address of XXX_Func_HP in the hot patch dynamic link library LibA_hp.so.
[0234] After the first process branch and the second process branch, the following steps are also included: Step G, since the address is in the data segment, the memory may not have write permission, and the write permission can be added through the mprotect function;
[0235] Step H, rewrite the actual function address of XXX_Func according to the function address of XXX_Func_HP obtained in step D, and complete the function replacement process.
[0236] Optionally, the OSP process can also feed back the replacement result to the OM module. The implementation process can be as follows: Fig.12 As shown, it mainly includes the following steps:
[0237] in, Fig.12 The solid-line boxes in the figure represent modules, and the dotted-line boxes represent processing flows.
[0238] Step 1: After completing the function replacement, the OSP process sends the replacement result to the OM module through the Osp_Send interface;
[0239] Step 2: The OM module feeds back the received replacement result to the LMT end, notifying whether the replacement result indicates that the abnormal function is successfully replaced.
[0240] In summary, the stable operation of the software platform of the access network equipment can be ensured. In the application scenario where the abnormal program bug needs to be fixed, the abnormal software version can be directly replaced without shutting down or restarting. In addition, the terminal service can be losslessly switched, avoiding the power-off and restart process caused by software upgrades, and providing uninterrupted wireless communication services for terminal users.
[0241] The technical solution provided in the embodiment of the present application can be applicable to a variety of systems, especially 5G systems. For example, the applicable system can be a global system of mobile communication (Global System of Mobile communication, referred to as GSM) system, code division multiple access (Code Division Multiple Access, referred to as CDMA) system, wideband code division multiple access (Wideband Code Division Multiple Access, referred to as WCDMA) general packet radio service (General Packet Radio Service, referred to as GPRS) system, long term evolution (long term evolution, referred to as LTE) system, LTE frequency division duplex (Frequency Division Duplex, referred to as FDD) system, LTE time division duplex (time division duplex, referred to as TDD) system, advanced long term evolution (Long Term Evolution Advanced, referred to as LTE-A) system, Universal Mobile Telecommunication System (Universal Mobile Telecommunication System, referred to as UMTS), Worldwide interoperability for Microwave Access (Worldwide interoperability for Microwave Access, referred to as WiMAX) system, 5G new air interface (NewRadio, referred to as NR) system, etc. These various systems include terminals and network equipment. The system may also include a core network part, such as an evolved packet system (EPS), a 5G system (5GS), etc.
[0242] In order to implement the above embodiments, the present application also proposes an access network device.
[0243] Fig.13 A schematic diagram of the structure of an access network device provided in an embodiment of the present application.
[0244] like Fig.13 As shown, the UPF may include: a transceiver 1300 , a processor 1310 , and a memory 1320 .
[0245] Among them, the memory 1320 is used to store computer programs; the transceiver 1300 is used to send and receive data under the control of the processor 1310; the processor 1310 is used to read the computer program in the memory 1320 and perform the following operations: obtain a hot patch description file, and parse the hot patch description file to obtain the first identification information of the hot patch dynamic link library, the second identification information of the first function in the hot patch dynamic link library, and the third identification information of the target board; according to the third identification information, determine the target board from at least one board of the access network device; according to the first identification information and the second identification information, determine the first address of the first function in the hot patch dynamic link library; use the first address to replace the second address of the abnormal second function in the dynamic link library to be upgraded in the target board; wherein the replaced first address is used for the software in the access network device to call the second function during the running stage, and call the first function according to the first address to implement the function corresponding to the first function.
[0246] The transceiver 1300 is used to receive and send data under the control of the processor 1310 .
[0247] Among them, Fig.13 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically one or more processors represented by processor 1310 and various circuits of memory represented by memory 1320 are linked together. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 1300 may be a plurality of components, namely, a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium, which transmission medium may include a wireless channel, a wired channel, an optical cable, and other transmission media. The processor 1310 is responsible for managing the bus architecture and general processing, and the memory 1320 may store data used by the processor 1310 when performing operations.
[0248] The processor 1310 may be a CPU, an ASIC, an FPGA or a CPLD, and the processor 1310 may also adopt a multi-core architecture.
[0249] In a possible implementation form of the present application, the processor 1310 executes to determine the first address of the first function in the hot patch dynamic link library based on the first identification information and the second identification information, specifically: receiving the first identification information and the second identification information sent by the operation and maintenance OM module in the access network device through the target board; querying the hot patch dynamic link library matching the first identification information from the target board according to the first identification information through the target board; determining the first address of the first function from the hot patch dynamic link library through the target board according to the second identification information.
[0250] In a possible implementation form of the present application, the processor 1310 is further used to perform the following operations: obtain the compiled hot patch dynamic link library through the OM module; and send the hot patch dynamic link library to the target board for storage according to the third identification information through the OM module.
[0251] In a possible implementation form of the present application, the processor 1310 executes, through the target board card, to determine the first address of the first function from the hot patch dynamic link library according to the second identification information, specifically: through the target board card, use the dynamic link to open the dlopen function to open the hot patch dynamic link library; through the target board card, use the dynamic link symbol dlsym function to obtain the first address of the first function from the hot patch dynamic link library according to the second identification information.
[0252] In a possible implementation form of the present application, the processor 1310 executes receiving the first identification information and the second identification information sent by the operation and maintenance OM module in the access network device through the target board, specifically: when the OM module is integrated on the target board, the first identification information and the second identification information are obtained from the message queue through the target board; wherein, the first identification information and the second identification information in the message queue are written by the OM module; or, when the OM module is not integrated on the target board, the user datagram protocol UDP message sent by the OM module is received through the target board; wherein, the UDP message carries the first identification information and the second identification information.
[0253] In a possible implementation form of the present application, the processor 1310 executes the use of the first address to replace the second address of the abnormal second function in the dynamic link library to be upgraded in the target board, specifically: obtaining the fourth identification information of the second function through the target board; obtaining the second address of the second function from the dynamic link library to be upgraded according to the fourth identification information through the target board; and replacing the second address of the second function with the first address through the target board.
[0254] In a possible implementation form of the present application, the processor 1310 executes, through the target board, obtaining the second address of the second function from the dynamic link library to be upgraded according to the fourth identification information, specifically: using the dlopen function through the target board to open the dynamic link library to be upgraded; parsing the dynamic link library to be upgraded through the target board to obtain a target field; extracting a target table entry from the target field through the target board; wherein the target table entry is used to store the function address of at least one function in the dynamic link library to be upgraded; and obtaining, through the target board, the second address of the second function from the target table entry according to the fourth identification information.
[0255] In a possible implementation form of the present application, the processor 1310 executes obtaining the fourth identification information of the second function through the target board, specifically: determining the fourth identification information of the second function through the target board according to the second identification information; or, the fourth identification information of the second function is recorded in the hot patch description file, and the processor 1310 executes obtaining the fourth identification information of the second function through the target board, specifically: receiving the fourth identification information sent by the OM module through the target board; wherein the fourth identification information is obtained by parsing the hot patch description file by the OM module.
[0256] In a possible implementation form of the present application, the processor 1310 executes the replacement of the second address of the second function by the first address through the target board, specifically: the second address of the second function in the dynamic link library to be upgraded is replaced by the first address through the target board based on the mprotect memory read and write attribute change function.
[0257] It should be noted that the access network device provided in the embodiment of the present application can achieve the above Figures 3 to 6 All the method steps implemented in the method embodiment can achieve the same technical effect, and the parts and beneficial effects of this embodiment that are the same as those in the method embodiment will not be described in detail here.
[0258] With the above Figures 3 to 6 Corresponding to the software updating method provided in the embodiment, the present application also provides a software updating device. Figures 3 to 6 The software update method provided in the embodiment corresponds to the embodiment, so the implementation method of the software update method is also applicable to the software update device provided in the embodiment of the present application, and will not be described in detail in the embodiment of the present application.
[0259] Fig.14 A schematic diagram of the structure of a software updating device provided in an embodiment of the present application.
[0260] like Fig.14 As shown, the software updating apparatus 1400 is applied to an access network device and may include: an acquisition module 1410 , a parsing module 1420 , a determination module 1430 and a replacement module 1440 .
[0261] The acquisition module 1410 is used to acquire a hot patch description file.
[0262] The parsing module 1420 is used to parse the hot patch description file to obtain the first identification information of the hot patch dynamic link library, the second identification information of the first function in the hot patch dynamic link library and the third identification information of the target board.
[0263] The determination module 1430 is used to determine the target board from at least one board of the access network device according to the third identification information, and determine the first address of the first function in the hot patch dynamic link library according to the first identification information and the second identification information.
[0264] The replacement module 1440 is used to use the first address to replace the second address of the abnormal second function in the dynamic link library to be upgraded in the target board; wherein the replaced first address is used for the software in the access network device to call the second function during the running stage, and the first function is called according to the first address to implement the function corresponding to the first function.
[0265] As a possible implementation method, the determination module 1430 is specifically used to: receive the first identification information and the second identification information sent by the operation and maintenance OM module in the access network device through the target board card; query the hot patch dynamic link library matching the first identification information from the target board card according to the first identification information through the target board card; determine the first address of the first function from the hot patch dynamic link library according to the second identification information through the target board card.
[0266] As a possible implementation, the acquisition module 1410 is further used to: acquire the compiled hot patch dynamic link library through the OM module;
[0267] The software updating device 1400 may further include:
[0268] The sending module is used to send the hot patch dynamic link library to the target board for storage according to the third identification information through the OM module.
[0269] As a possible implementation method, the determination module 1430 is specifically used to: open the dlopen function through the target board using dynamic linking to open the hot patch dynamic link library; use the dynamic link symbol dlsym function through the target board to obtain the first address of the first function from the hot patch dynamic link library according to the second identification information.
[0270] As a possible implementation method, the replacement module 1440 is specifically used to: obtain the fourth identification information of the second function through the target board; obtain the second address of the second function from the dynamic link library to be upgraded according to the fourth identification information through the target board; and replace the second address of the second function with the first address through the target board.
[0271] As a possible implementation method, the replacement module 1440 is specifically used to: use the dlopen function through the target board to open the dynamic link library to be upgraded; parse the dynamic link library to be upgraded through the target board to obtain the target field; extract the target table item from the target field through the target board; wherein the target table item is used to store the function address of at least one function in the dynamic link library to be upgraded; and obtain the second address of the second function from the target table item through the target board according to the fourth identification information.
[0272] As a possible implementation method, the replacement module 1440 is specifically used to: determine the fourth identification information of the second function according to the second identification information through the target board card; or, receive the fourth identification information sent by the OM module through the target board card; wherein the fourth identification information is obtained by the OM module parsing the hot patch description file.
[0273] As a possible implementation, the replacement module 1440 is specifically used to replace the second address of the second function in the dynamic link library to be upgraded with the first address through the target board based on the mprotect memory read and write attribute change function.
[0274] As a possible implementation method, the determination module 1430 is specifically used to: when the OM module is integrated on the target board, obtain the first identification information and the second identification information from the message queue through the target board; wherein the first identification information and the second identification information in the message queue are written by the OM module; or, when the OM module is not integrated on the target board, receive the User Datagram Protocol UDP message sent by the OM module through the target board; wherein the UDP message carries the first identification information and the second identification information.
[0275] It should be noted that the software update device provided in the embodiment of the present application can achieve the above Figures 3 to 6 All the method steps implemented in the method embodiment can achieve the same technical effect, and the parts and beneficial effects of this embodiment that are the same as those in the method embodiment will not be described in detail here.
[0276] It should be noted that each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0277] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a processor-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program code.
[0278] In order to implement the above embodiments, the present application also proposes a processor-readable storage medium.
[0279] The processor-readable storage medium stores a computer program for causing the processor to execute the present application. Figures 3 to 6 The software updating method of any embodiment.
[0280] Among them, the processor-readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drive (SSD)), etc.
[0281] In order to implement the above embodiments, the present application also proposes a computer program product.
[0282] The computer program product includes a computer program which, when executed by a processor, implements the present application. Figures 3 to 6 The software updating method of any embodiment.
[0283] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.
[0284] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer executable instructions. These computer executable instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0285] These processor executable instructions may also be stored in a processor readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the processor readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0286] These processor-executable instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0287] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A software updating method, characterized in that: Applied to access network equipment, including: Obtaining a hot patch description file, and parsing the hot patch description file to obtain first identification information of a hot patch dynamic link library, second identification information of a first function in the hot patch dynamic link library, and third identification information of a target board; Determine the target board from at least one board of the access network device according to the third identification information; Determine a first address of the first function in the hot patch dynamic link library according to the first identification information and the second identification information; The first address is used to replace the second address of the abnormal second function in the dynamic link library to be upgraded in the target board; wherein the replaced first address is used for calling the first function according to the first address when the software in the access network device calls the second function during the running stage, so as to implement the function corresponding to the first function.
2. The method according to claim 1, characterized in that The step of determining a first address of the first function in the hot patch dynamic link library according to the first identification information and the second identification information includes: Receiving, through the target board, the first identification information and the second identification information sent by the operation and maintenance OM module in the access network device; querying the hot patch dynamic link library matching the first identification information from the target board according to the first identification information; The target board determines the first address of the first function from the hot patch dynamic link library according to the second identification information.
3. The method according to claim 2, characterized in that The method further comprises: Obtaining the compiled hot patch dynamic link library through the OM module; The hot patch dynamic link library is sent to the target board for storage through the OM module according to the third identification information.
4. The method according to claim 2, characterized in that: The step of determining the first address of the first function from the hot patch dynamic link library according to the second identification information by the target board includes: Open the dlopen function by using the target board to dynamically link and open the hot patch dynamic link library; The target board uses the dynamic link symbol dlsym function to obtain the first address of the first function from the hot patch dynamic link library according to the second identification information.
5. The method according to any one of claims 2 to 4, characterized in that: The receiving, by the target board, the first identification information and the second identification information sent by the operation and maintenance OM module in the access network device comprises: When the OM module is integrated on the target board, the first identification information and the second identification information are obtained from a message queue through the target board; wherein the first identification information and the second identification information in the message queue are written by the OM module; or, When the OM module is not integrated on the target board, a User Datagram Protocol (UDP) message sent by the OM module is received by the target board; wherein the UDP message carries the first identification information and the second identification information.
6. The method according to claim 1, characterized in that The step of using the first address to replace the second address of the abnormal second function in the dynamic link library to be upgraded in the target board comprises: Acquire fourth identification information of the second function through the target board; Acquiring, by the target board according to the fourth identification information, a second address of the second function from the dynamic link library to be upgraded; The target board adopts the first address to replace the second address of the second function.
7. The method according to claim 6, characterized in that The step of obtaining the second address of the second function from the dynamic link library to be upgraded by the target board according to the fourth identification information includes: Using the dlopen function on the target board, the dynamic link library to be upgraded is opened; Parsing the dynamic link library to be upgraded through the target board to obtain a target field; Extracting a target table entry from the target field through the target board; wherein the target table entry is used to store a function address of at least one function in the dynamic link library to be upgraded; The target board obtains the second address of the second function from the target table entry according to the fourth identification information.
8. The method according to claim 6, characterized in that The acquiring, through the target board, fourth identification information of the second function comprises: Determining, by the target board according to the second identification information, fourth identification information of the second function; or, The fourth identification information of the second function is recorded in the hot patch description file, and the fourth identification information of the second function is obtained through the target board, including: Receiving the fourth identification information sent by the OM module through the target board; The fourth identification information is obtained by the OM module parsing the hot patch description file.
9. The method according to claim 6, characterized in that The step of replacing the second address of the second function by using the first address through the target board includes: The target board uses the mprotect memory read-write attribute change function to replace the second address of the second function in the dynamic link library to be upgraded with the first address.
10. An access network device, characterized in that: Including memory, transceiver, processor; a memory for storing a computer program; a transceiver for transmitting and receiving data under the control of the processor; A processor is configured to read the computer program in the memory and perform the following operations: Obtaining a hot patch description file, and parsing the hot patch description file to obtain first identification information of a hot patch dynamic link library, second identification information of a first function in the hot patch dynamic link library, and third identification information of a target board; Determine the target board from at least one board of the access network device according to the third identification information; Determine a first address of the first function in the hot patch dynamic link library according to the first identification information and the second identification information; The first address is used to replace the second address of the abnormal second function in the dynamic link library to be upgraded in the target board; wherein the replaced first address is used for calling the first function according to the first address when the software in the access network device calls the second function during the running stage, so as to implement the function corresponding to the first function.
11. The access network device according to claim 10, characterized in that: The processor determines, according to the first identification information and the second identification information, a first address of the first function in the hot patch dynamic link library, specifically: Receiving, through the target board, the first identification information and the second identification information sent by the operation and maintenance OM module in the access network device; querying the hot patch dynamic link library matching the first identification information from the target board according to the first identification information; The target board determines the first address of the first function from the hot patch dynamic link library according to the second identification information.
12. The access network device according to claim 11, characterized in that: The processor is further configured to perform the following operations: Obtaining the compiled hot patch dynamic link library through the OM module; The hot patch dynamic link library is sent to the target board for storage through the OM module according to the third identification information.
13. The access network device according to claim 11, characterized in that: The processor determines, through the target board according to the second identification information, the first address of the first function from the hot patch dynamic link library, specifically: Open the dlopen function by using the target board to dynamically link and open the hot patch dynamic link library; The target board uses the dynamic link symbol dlsym function to obtain the first address of the first function from the hot patch dynamic link library according to the second identification information.
14. The access network device according to any one of claims 11 to 13, characterized in that: The processor executes receiving, through the target board, the first identification information and the second identification information sent by the operation and maintenance OM module in the access network device, specifically: When the OM module is integrated on the target board, the first identification information and the second identification information are obtained from a message queue through the target board; wherein the first identification information and the second identification information in the message queue are written by the OM module; or, When the OM module is not integrated on the target board, a User Datagram Protocol (UDP) message sent by the OM module is received by the target board; wherein the UDP message carries the first identification information and the second identification information.
15. The access network device according to claim 10, characterized in that: The processor executes the first address to replace the second address of the abnormal second function in the dynamic link library to be upgraded in the target board, specifically: Acquire fourth identification information of the second function through the target board; Acquiring, by the target board according to the fourth identification information, a second address of the second function from the dynamic link library to be upgraded; The target board adopts the first address to replace the second address of the second function.
16. The access network device according to claim 15, characterized in that: The processor executes, through the target board, obtaining the second address of the second function from the dynamic link library to be upgraded according to the fourth identification information, specifically: Using the dlopen function on the target board, the dynamic link library to be upgraded is opened; Parsing the dynamic link library to be upgraded through the target board to obtain a target field; Extracting a target table entry from the target field through the target board; wherein the target table entry is used to store a function address of at least one function in the dynamic link library to be upgraded; The target board obtains the second address of the second function from the target table entry according to the fourth identification information.
17. The access network device according to claim 15, characterized in that: The processor executes the acquisition of fourth identification information of the second function through the target board, specifically: Determining, by the target board according to the second identification information, fourth identification information of the second function; or, The hot patch description file records the fourth identification information of the second function, and the processor executes the fourth identification information of the second function through the target board, specifically: Receiving the fourth identification information sent by the OM module through the target board; The fourth identification information is obtained by the OM module parsing the hot patch description file.
18. The access network device according to claim 15, characterized in that: The processor executes the target board card to adopt the first address to replace the second address of the second function, specifically: The target board uses the mprotect memory read-write attribute change function to replace the second address of the second function in the dynamic link library to be upgraded with the first address.
19. A software updating device, characterized in that: Applied to access network equipment, including: The acquisition module is used to obtain the hot patch description file; A parsing module, used for parsing the hot patch description file to obtain first identification information of the hot patch dynamic link library, second identification information of the first function in the hot patch dynamic link library and third identification information of the target board; a determination module, configured to determine the target board from at least one board of the access network device according to the third identification information, and determine a first address of the first function in the hot patch dynamic link library according to the first identification information and the second identification information; A replacement module is used to use the first address to replace the second address of the abnormal second function in the dynamic link library to be upgraded in the target board; wherein the replaced first address is used for the software in the access network device to call the second function during the running stage, and the first function is called according to the first address to implement the function corresponding to the first function.
20. A processor-readable storage medium, characterized in that: The processor-readable storage medium stores a computer program, and the computer program is used to enable the processor to execute the method according to any one of claims 1 to 9.
Citation Information
Cited By
Network card firmware hot patching method, storage medium and electronic equipment
CN121900791A