Method and system for modifying serial number, electronic equipment and storage medium

Through the method of automatically obtaining and verifying the server serial number, the problem of cumbersome modification of the server serial number is solved, efficient and secure batch processing of serial number is achieved, and the normal operation and maintenance process of the server is ensured.

CN120493877APending Publication Date: 2025-08-15POWERLEADER COMPUTER SYST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510470072.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-15
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

In the prior art, the modification and writing of server serial numbers are complicated, and key steps are easily missed, which affects the normal use of the server and subsequent maintenance procedures, resulting in inconvenience and potential risks of the enterprise.

Method used

By obtaining the configuration list, establish the correspondence between the server information and the information to be modified, obtain the original serial number after authentication, and write it to the asset tag after complying with the preset standards, and use the ipmitool command and IPMI protocol to automatically modify the serial number.

Benefits of technology

It realizes batch automation processing of server serial numbers, reduces manual repetitive labor, reduces human errors and data security risks, improves operation efficiency, and ensures the normal operation of the server.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120493877A_ABST
    Figure CN120493877A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a system for modifying a serial number, electronic equipment and a storage medium, which are used for fully automatically configuring a server. The method for modifying the serial number comprises the following steps: acquiring a configuration list, wherein to-be-modified information is pre-filled in the configuration list; after a configuration instruction is received, traversing the configuration list and the to-be-modified server according to the configuration instruction, and obtaining a corresponding relationship between the to-be-modified information and the to-be-modified server; after the identity verification is passed, obtaining an original serial number of the server to be modified; after confirming that the original serial number meets the preset standard, writing the original serial number into an asset label of the server to be modified; and modifying the original serial number according to the corresponding relation and the configuration list.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of server production and manufacturing, and in particular to a method, system, electronic device, and storage medium for modifying a serial number. Background Art

[0002] In today's digital age, servers, as critical equipment for data storage, processing, and transmission, are experiencing increasing demand. Original Equipment Manufacturer (OEM) servers are widely used in the market due to their cost-effectiveness and customization. Many companies receive large quantities of OEM servers from suppliers to meet their business development needs.

[0003] However, there are some pressing issues that need to be addressed during server operation. Each server motherboard provided by a vendor comes with a serial number (SN). To achieve unified brand management, product traceability, and establish their own asset management system, companies need to modify this serial number to meet their own standards. Furthermore, to ensure ongoing maintenance, the original manufacturer's serial number must be re-written onto the asset tag. However, production lines currently generally use a separate refresh method to handle these serial number modifications and writes. This cumbersome operation makes it easy for staff to miss key steps, which in turn affects the normal operation of the server and subsequent maintenance processes, causing significant inconvenience and potential risks for the company. Summary of the Invention

[0004] The present application discloses a method, system, electronic device and storage medium for modifying a serial number, which are used for fully automated configuration of a server.

[0005] The first aspect of the present application discloses a method for modifying a serial number, comprising: Obtain a configuration list, wherein the configuration list is pre-filled with the information to be modified; After receiving the configuration instruction, traverse the configuration list and the server to be modified according to the configuration instruction, and obtain the corresponding relationship between the information to be modified and the server to be modified; After the identity verification is passed, the original serial number of the server to be modified is obtained; After confirming that the original serial number meets the preset standard, writing the original serial number into the asset tag of the server to be modified; The original sequence number is modified according to the corresponding relationship and the configuration list.

[0006] Optionally, after traversing the configuration list and the server to be modified according to the configuration instruction and obtaining the corresponding relationship between the information to be modified and the server to be modified, the method further includes: According to the corresponding relationship, obtaining the identity token corresponding to the server to be modified; The server to be modified is authenticated according to the identity token to obtain operation permission, where the operation permission includes modification permission and write permission.

[0007] Optionally, before writing the original serial number into the asset tag of the server to be modified, the method further includes: a combination of letters and numbers identifying the original serial number; Verify that the letter and number combination begins with "PR"; If so, confirming that the original serial number meets the preset standard; If not, it is determined that the original serial number does not meet the preset standard.

[0008] Optionally, the information to be modified includes a server model, a baseboard management controller IP address, a baseboard management controller user name, a baseboard management controller password, and a serial number to be modified, and modifying the original serial number according to the corresponding relationship and the configuration list includes: Matching the corresponding relationship with the server model and the baseboard management controller IP address to obtain a matching result; Obtain the corresponding serial number to be modified according to the matching result; Obtaining modification authority according to the baseboard management controller user name and the baseboard management controller password; The original serial number is modified to the corresponding serial number to be modified.

[0009] Optionally, modifying the original sequence number according to the corresponding relationship and the configuration list includes: An ipmitool command is executed to modify the original serial number according to the corresponding relationship and the configuration list, wherein the ipmitool command is obtained by encapsulating an init function, a run_command function, and a modify_fru_sn function.

[0010] Optionally, after modifying the original sequence number according to the correspondence and the configuration list, the method further includes: Call sendRusultToNodejs to send the result of modifying the original serial number to the Node.js server, so that the Node.js server sends the result of modifying the original serial number to the front-end JavaScript through IPC communication, and displays the result of modifying the original serial number in a table form on the user interface according to a pre-set display and statistical method.

[0011] A second aspect of the present application discloses a system for modifying a serial number, comprising: A configuration list unit, used to obtain a configuration list, wherein the configuration list is pre-filled with information to be modified; a traversal unit, configured to, after receiving a configuration instruction, traverse the configuration list and the server to be modified according to the configuration instruction, and obtain a correspondence between the information to be modified and the server to be modified; An original serial number unit, used to obtain the original serial number of the server to be modified after the identity authentication is passed; a writing unit, configured to write the original serial number into the asset tag of the server to be modified after confirming that the original serial number meets a preset standard; A modification unit is configured to modify the original sequence number according to the corresponding relationship and the configuration list.

[0012] Optionally, after traversing the cells, also include: An identity token unit, configured to obtain an identity token corresponding to the server to be modified according to the corresponding relationship; The identity authentication unit is used to authenticate the server to be modified according to the identity token to obtain an operation permission, where the operation permission is a modification permission and a write permission.

[0013] A third aspect of the present application provides an electronic device, including: processor, memory, input and output units, and buses; The processor is connected to the memory, input and output units, and the bus; The memory stores a program, and the processor calls the program to execute the first aspect and any optional method for modifying the serial number of the first aspect.

[0014] In a fourth aspect, the present application provides a computer-readable storage medium on which a program is stored. When the program is executed on a computer, the method for modifying the serial number in the first aspect and any optional method in the first aspect is executed.

[0015] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages: The present application provides a method for modifying a serial number. First, a configuration list is obtained, and the information to be modified is pre-filled in the configuration list. After receiving the configuration instruction, the configuration list and the server to be modified are traversed according to the configuration instruction, and the correspondence between the information to be modified and the server to be modified is obtained. After the identity authentication is passed, the original serial number of the server to be modified is obtained. After confirming that the original serial number meets the preset standard, the original serial number is written into the asset tag of the server to be modified. Finally, the original serial number is modified according to the correspondence and the configuration list. The method for modifying the serial number in the present application obtains and traverses the configuration list to clarify the information correspondence, and then sets a serial number verification mechanism, thereby realizing batch processing of the original serial numbers of the servers to be modified, reducing manual repetitive work, reducing human errors and data security risks, and improving operational efficiency, thereby ensuring the normal operation of the server. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0017] Figure 1 A schematic diagram of an embodiment of a method for modifying a serial number for this application; Figure 2 A schematic diagram of another embodiment of a method for modifying a serial number for the present application; Figure 3 A schematic diagram of another embodiment of a method for modifying a serial number for the present application; Figure 4 A schematic diagram of another embodiment of a method for modifying a serial number for the present application; Figure 5 A schematic diagram of an embodiment of a system for modifying serial numbers for this application; Figure 6 This is a schematic diagram of another embodiment of the electronic device of the present application. DETAILED DESCRIPTION

[0018] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.

[0019] It should be understood that when used in the present application specification, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their collections.

[0020] It should also be understood that the term “and / or” used in the present specification refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0021] As used in this specification, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting" depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]" depending on the context.

[0022] In addition, in the description of the present application, the terms "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0023] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0024] Based on the technical problems described above, the present application discloses a method, system, electronic device and storage medium for modifying serial numbers, which are used for fully automated configuration of servers.

[0025] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0026] The method of the present application can be applied to a server, device, terminal or other device with logical processing capabilities, and the present application does not limit this.

[0027] See also Figure 1 , the present application provides an embodiment of a method, comprising: 101. Obtain a configuration list, wherein the configuration list is pre-filled with information to be modified; In this embodiment, before the server serial number modification work begins, a configuration list should be prepared in advance. Usually, based on the established configuration template, the information to be modified is accurately filled in an Excel spreadsheet in a specific format. This information to be modified is an important basis for the server serial number modification operation, covering multiple key parameters of the server, including: the baseboard management controller IP address (BMCIP), which is an important identifier for remote communication and management with the server; the server model (Model), different models of servers may have different hardware features and management methods; the baseboard management controller username (BMCUserName) and baseboard management controller password (BMCPassword), which are used to authenticate the server and ensure that authorized permissions are required to access and operate the server; and the serial number to be modified, which is the content that will eventually replace the original serial number of the server.

[0028] Once the Excel spreadsheet is complete, the system parses it. This process converts the text data in the Excel file into a list format that the system can recognize and process. The system reads the data row by row, following the Excel spreadsheet's row and column structure. It then breaks each row into its individual fields and stores them in a list, ultimately creating a configuration list containing all the information to be modified.

[0029] 102. After receiving the configuration instruction, traverse the configuration list and the server to be modified according to the configuration instruction, and obtain the corresponding relationship between the information to be modified and the server to be modified; In this embodiment, after receiving the configuration instruction issued by the operator, the system will immediately start the serial number modification process. The system will first traverse the configuration list, starting from the first element in the list, and read each piece of information to be modified in turn. At the same time, the system will scan all servers to be modified, establish a connection with the server through network communication and other means, and obtain relevant information of the server to be modified. During the traversal and scanning process, the system will establish a correspondence between the information to be modified and the server to be modified based on some characteristic information of the server to be modified. For example, the system will compare the BMCIP in the configuration list with the actual IP address of the server to be modified. If the two are consistent, it is considered that the information to be modified corresponds to this server to be modified. In addition, other information of the server to be modified, such as model, hardware identification, etc., may also be combined for comprehensive judgment to ensure the accuracy of the correspondence.

[0030] 103. After the identity verification is passed, obtain the original serial number of the server to be modified; In this embodiment, to ensure the security and legality of operations on the server to be modified, the system must verify the operator's identity before obtaining the original serial number. Based on the correspondence established in step 102, the system extracts the BMCIP, BMCUserName, and BMCPassword information of the server to be modified from the configuration list. The system then sends an authentication request to the server to be modified, passing the username and password to the server. Upon receiving the request, the server verifies the username and password. If the verification passes, permission to operate the server is granted. Next, the system sends a request to the server to be modified to obtain the original serial number via a specific communication protocol and interface, such as the IPMI (Intelligent Platform Management Interface) protocol. Upon receiving the request, the server to be modified reads the original serial number from its own storage area and returns it to the system.

[0031] 104. After confirming that the original serial number meets a preset standard, write the original serial number into the asset tag of the server to be modified; In this embodiment, after the system obtains the original serial number of the server to be modified, it will verify it to determine whether it meets the preset standards. If the comparison results match, it means that the original serial number meets the preset standards, and the system will continue with subsequent operations. The system will send the data of the original serial number to the asset tag module through the communication interface with the asset tag module of the server to be modified. After receiving the data, the asset tag module will write the original serial number to the corresponding storage area, which is usually a chip or storage device specifically used to store asset information. If the original serial number does not meet the preset standards, the system will issue an error prompt, such as displaying an error message on the operation interface, informing the operator that the original serial number of the server to be modified does not meet the requirements and the subsequent write and modification operations will not be performed.

[0032] 105. Modify the original sequence number according to the corresponding relationship and the configuration list.

[0033] In this embodiment, after completing the verification of the original serial number and writing the asset tag, the system will find the preset new serial number corresponding to each server to be modified from the configuration list based on the corresponding relationship established in step 102. The system will then execute a specific command, typically the ipmitool command, and then send a request to modify the serial number to the server to be modified via the IPMI protocol. In the request, the system will pass the preset new serial number to the server to be modified. After receiving the request and the new serial number, the server to be modified will update its own serial number storage area, replacing the original serial number with the new serial number. After the update is complete, the server to be modified will return the operation results to the system. Based on the results returned by the server to be modified, the system will determine whether the serial number modification was successful and display a corresponding prompt message on the operation interface to inform the operator of the result of the serial number modification.

[0034] It should be noted that when executing the ipmitool command to modify the original serial number based on the correspondence and the configuration list, the ipmitool command is derived by encapsulating the init function, the run_command function, and the modify_fru_sn function. The init function primarily performs initialization operations, preparing for the subsequent execution of the ipmitool command. The run_command function primarily executes the specific ipmitool command, constructing a complete ipmitool command based on the parameters passed by the init function (an ipmitool command typically requires specifying the server's BMCIP, username, password, and specific operation instructions). The modify_fru_sn function integrates the init and run_command functions to implement the specific function of modifying the server's original serial number. Executing the ipmitool command first calls the modify_fru_sn function, which then implements the functionality of the init and run_command functions. This loop continuously executes the modification operation on all servers' original serial numbers.

[0035] It should also be noted that the step of displaying the corresponding prompt information on the operation interface is achieved by calling the `sendRusultToNodejs` function to send the result of modifying the original serial number to the Node.js server. The Node.js server then transmits the result of modifying the original serial number to the front-end JavaScript via IPC communication. The result of modifying the original serial number is then displayed in a table on the user interface according to pre-defined display and statistical methods. The `sendRusultToNodejs` function's primary task is to send the collated modification result data to the Node.js server. The `sendRusultToNodejs` function establishes a network connection with the Node.js server, typically using protocols such as HTTP or WebSocket to ensure reliable data transmission. The modification result data is then encapsulated into a format that complies with the selected communication protocol and sent to the Node.js server via the established network connection. After receiving the modification result data from the system, the Node.js server parses the modification result data into a JavaScript object, establishes an IPC (inter-process communication) channel with the front-end JavaScript, and then sends the parsed JavaScript object to the front-end JavaScript via the IPC channel. Finally, JavaScript on the front end processes the data according to pre-defined display and statistical methods, such as counting the number of servers with successful and failed modifications and calculating the modification success rate. The processed data is then displayed in a table on the user interface. HTML and CSS can be used to create the table structure, and JavaScript can be used to dynamically populate the table content. Table columns can include server identification information, original serial number, modified serial number, modification status, and more. Users can intuitively view the results of each server's serial number modification and related statistical information on the interface.

[0036] In this embodiment, the method for modifying serial numbers first obtains a configuration list, pre-populated with the information to be modified; after receiving the configuration instructions, the configuration list and the server to be modified are traversed according to the configuration instructions, and the corresponding relationship between the information to be modified and the server to be modified is obtained; after identity verification is passed, the original serial number of the server to be modified is obtained; after confirming that the original serial number meets the preset standards, the original serial number is written to the asset tag of the server to be modified; finally, the original serial number is modified based on the corresponding relationship and the configuration list. By obtaining and traversing the configuration list to clarify the information corresponding relationship, and then setting up a serial number verification mechanism, this method realizes batch processing of the original serial numbers of the servers to be modified, reduces manual duplication of work, reduces human errors and data security risks, improves operational efficiency, and thus ensures the normal operation of the server.

[0037] See also Figure 2 According to the description of step 103, identity authentication should be performed before writing and modifying operations. This step may include, but is not limited to, the following: 201. Obtain an identity token corresponding to the server to be modified according to the corresponding relationship; In this embodiment, when obtaining the identity token corresponding to the server to be modified, the system operates based on the correspondence established in the previous step between the information to be modified and the server to be modified. The system first extracts key information related to the server to be modified from this correspondence. Next, the system uses this extracted information, following specific communication protocols and interface specifications, to construct a request to the server to be modified. This request is intended to request an identity token from the server to be modified. After the request is sent over the network to the server to be modified, the server to be modified receives the request and verifies it based on the BMCUserName and BMCPassword information carried in the request. The server searches its internal user authentication database or related authentication mechanism for matching username and password information. If the server to be modified verifies that the username and password in the request match its stored valid information, the request is deemed valid. At this point, the server to be modified generates an identity token. This identity token is a string or data block with a specific format and content that represents the legitimacy of the request and the permissions granted to the requester. After generating the identity token, the server to be modified returns it over the network to the requesting system. At this point, the system has successfully obtained the identity token corresponding to the server to be modified and is ready for subsequent operations.

[0038] 202. Authenticate the server to be modified according to the identity token to obtain an operation permission, where the operation permission includes a modification permission and a write permission.

[0039] In this embodiment, after obtaining the identity token, the system uses it as a key basis for authentication and initiates a further operation permission request to the server to be modified. The system then includes the identity token in a new request and sends it again over the network to the server to be modified. Upon receiving this request with the identity token, the server to be modified verifies the identity token. The server to be modified has a dedicated identity token verification mechanism that checks whether the identity token format is correct and whether the token content matches the legitimate token information previously generated and stored by the server to be modified. The server to be modified also verifies whether the identity token is valid, for example, whether it has expired. If the server to be modified successfully verifies the identity token, it indicates that the requesting system has legitimate identity and permissions. At this point, the server to be modified grants the corresponding operation permissions for the request—in this scenario, modification and write permissions. This means that the system is authorized to modify the serial number of the server to be modified and to write the original serial number to the asset tag. If the identity token verification fails, the server to be modified will deny the operation permission and may return an error message to the system. After receiving the error message, the system will display a corresponding error prompt to the user on the operation interface, informing the user that the identity authentication failed and subsequent modification and writing operations cannot be performed.

[0040] Please refer to Figure 3 Before executing step 104 to write the original serial number into the asset tag of the server to be modified, in order to avoid erroneous modification of non-user servers, the servers to be modified should be screened using a preset standard, where the preset standard is that the serial number begins with "PR". Specific screening operations may include, but are not limited to, the following: 301. Identify the letter and number combination of the original serial number; In this embodiment, after obtaining the original serial number of the server to be modified, the system will parse and process the original serial number. First, the system will read the original serial number as a whole string. Then, each character in the original serial number will be identified from left to right in the order in which the characters are arranged. During the identification process, the system will determine whether each character is a letter or a number. For letters, the system will record its specific letter content; for numbers, its numerical value will also be recorded. In this way, the system can separate the letters and numbers in the original serial number one by one and store them in a certain data structure (such as a list or array) so that these combined contents can be further analyzed and processed later.

[0041] 302. Verify whether the letter and number combination begins with "PR"; if so, confirm that the original serial number meets the preset standard; if not, confirm that the original serial number does not meet the preset standard.

[0042] In this embodiment, after the system has identified and stored the original serial number's letter and number combination, it verifies the beginning of the combination. It extracts the first two characters from the stored letter and number combination data. These characters are then compared to the preset "PR." During this comparison, the system rigorously checks the case, order, and content of the characters for complete consistency. If the two extracted characters exactly match "PR," with no discrepancies in either case or order, the system confirms that the original serial number meets the preset standards. This means that the server to be modified meets the requirements, and the subsequent steps of writing the original serial number to the asset tag and modifying the serial number can proceed. Conversely, if the extracted first two characters do not exactly match "PR," either due to a different character content, such as "BR," inconsistent case, such as "Pr," or any other discrepancy, the system will confirm that the original serial number does not meet the preset standards. At this time, the system will not perform subsequent write and modification operations, but will start the error handling process, such as issuing an error prompt to the operator on the operation interface, informing him that the original serial number of the server currently being processed does not meet the requirements and that further confirmation of device information or other processing is required.

[0043] Please refer to Figure 4 According to step 101, the information to be modified includes the server model, baseboard management controller IP address, baseboard management controller user name, baseboard management controller password, and the serial number to be modified. Then, step 105, modifying the original serial number according to the corresponding relationship and the configuration list, may include, but is not limited to, the following: 401. Match the corresponding relationship with the server model and the baseboard management controller IP address to obtain a matching result; In this embodiment, at this point in the process, the system has already established a correspondence between the information to be modified and the server to be modified. From this correspondence, the system extracts detailed information related to the server to be modified, including the server model and baseboard management controller (BMC) IP address. For the server model, the system searches a pre-established server model database or configuration file. This database or configuration file stores a large amount of characteristic information and other corresponding attributes for different server models. The system compares the extracted server model against each record in the database, checking for an exact match. For the BMC IP address, the system searches and matches the network environment. It scans the list of IP addresses of all connected devices on the network and accurately compares the extracted IP address with each IP address in the list. By simultaneously matching the server model and the BMC IP address, the system ultimately obtains a match. If an exact match is found in both the database and the network for the extracted information, the match is considered a success. If a match is not found for either or both items, the match is considered a failure.

[0044] 402. Obtain the corresponding serial number to be modified according to the matching result; In this embodiment, after the system completes the matching operation and obtains the matching result, if the matching result is successful, the system will obtain the serial number to be modified corresponding to the server to be modified based on the previously established correspondence and the relevant information in the database or configuration file. The system will check the correspondence data again to find the set of information to be modified that corresponds to the successfully matched server model and baseboard management controller IP address. This set of information contains the preset serial number to be modified. The system will accurately extract the serial number to be modified from this set of information and prepare for the subsequent serial number modification operation. If the matching result is a failure, the system cannot accurately obtain the corresponding serial number to be modified, and the system will start the error handling process. The operator may be prompted on the operation interface that the match failed, the serial number to be modified cannot be determined, and the accuracy of the server information or the network connection status needs to be checked.

[0045] 403. Obtain modification authority according to the baseboard management controller user name and the baseboard management controller password; In this embodiment, after obtaining the serial number to be modified, the system also obtains permission to modify the serial number of the server to be modified. To do this, the system uses the baseboard management controller username and password previously extracted from the corresponding relationship. The system constructs a permission request packet, encapsulating the username and password. Then, via a specific communication protocol and network connection, it sends this permission request packet to the corresponding server to be modified. Upon receiving the permission request packet, the server to be modified verifies it within its internal permission management system. The server to be modified compares the received username and password with the valid user information stored in its own database. If both username and password match, the server to be modified deems the request legitimate and authorizes the modification, granting modification permission. The server to be modified returns a response to the system indicating successful authorization. If the username or password verification fails, the server to be modified denies modification permission and returns an error response to the system. Upon receiving the error response, the system prompts the operator on the user interface, notifying them that permission verification failed and that the serial number modification operation cannot be performed. The operator may need to verify the correctness of the username and password.

[0046] 404. Modify the original serial number to the corresponding serial number to be modified.

[0047] In this embodiment, once the system successfully obtains modification permission, it will begin modifying the original serial number to the one to be modified. The system establishes a connection with the server to be modified via a specific communication interface, such as the previously mentioned IPMI (Intelligent Platform Management Interface) protocol. Using this connection, the system sends a modification request containing the serial number to be modified to the server. After receiving the modification request, the server to be modified locates the storage area storing the original serial number. Typically, this storage area is located in the server's BIOS chip or another dedicated storage module for device identification information. The server to be modified reads the original serial number from the storage area, replaces it with the one to be modified, and rewrites the modified serial number to the original storage area. After the modification is complete, the server to be modified returns a modification result message to the system, informing the system whether the modification was successful. After receiving this feedback, the system displays the final result of the modification to the operator on the user interface, allowing the operator to understand whether the modification process was successful.

[0048] The above embodiment describes the method for modifying the serial number provided by the present application. The following describes the system, electronic device, and storage medium for modifying the serial number provided by the present application: See also Figure 5The present application provides an embodiment of a system for modifying a serial number, comprising: A configuration list unit 501 is used to obtain a configuration list, in which the information to be modified is pre-filled; The traversal unit 502 is configured to, after receiving the configuration instruction, traverse the configuration list and the server to be modified according to the configuration instruction, and obtain a correspondence between the information to be modified and the server to be modified; The original serial number unit 503 is used to obtain the original serial number of the server to be modified after the identity authentication is passed; A writing unit 504 is configured to write the original serial number into the asset tag of the server to be modified after confirming that the original serial number meets a preset standard; The modifying unit 505 is configured to modify the original sequence number according to the corresponding relationship and the configuration list.

[0049] Optionally, after the traversal unit 502, the method further includes: The identity token unit 506 is used to obtain the identity token corresponding to the server to be modified according to the corresponding relationship; The identity authentication unit 507 is configured to authenticate the server to be modified according to the identity token to obtain an operation permission, where the operation permission includes a modification permission and a write permission.

[0050] Optionally, before writing unit 504, the method further includes: an identification unit 508 for identifying a combination of letters and numbers in the original serial number; The verification unit 509 is configured to verify whether the letter and number combination begins with "PR"; if so, confirm that the original serial number meets the preset standard; if not, confirm that the original serial number does not meet the preset standard.

[0051] Optionally, the information to be modified includes the server model, baseboard management controller IP address, baseboard management controller user name, baseboard management controller password and serial number to be modified, and the modification unit 505 is specifically used to: Matching the corresponding relationship with the server model and the baseboard management controller IP address to obtain a matching result; Obtain the corresponding serial number to be modified according to the matching result; Obtaining modification authority according to the baseboard management controller user name and the baseboard management controller password; The original serial number is modified to the corresponding serial number to be modified.

[0052] Optionally, the modifying unit 505 is specifically configured to: An ipmitool command is executed to modify the original serial number according to the corresponding relationship and the configuration list, wherein the ipmitool command is obtained by encapsulating an init function, a run_command function, and a modify_fru_sn function.

[0053] Optionally, after the modification unit 505, the method further includes: The display unit 510 is used to call the sendRusultToNodejs function to send the result of modifying the original serial number to the Node.js server, so that the Node.js server sends the result of modifying the original serial number to the front-end JavaScript through IPC communication, and displays the result of modifying the original serial number in a table form on the user interface according to a pre-set display and statistical method.

[0054] See also Figure 6 , the present application provides an electronic device, comprising: Processor 601 , memory 602 , input / output unit 603 , and bus 604 .

[0055] The processor 601 is connected to the memory 602 , the input and output unit 603 , and the bus 604 .

[0056] The memory 602 stores a program, and the processor 601 calls the program to execute the following Figure 1-4 A method for modifying a serial number according to any one of the embodiments shown in .

[0057] The present application provides a computer-readable storage medium, wherein a program is stored on the computer-readable storage medium, and when the program is executed on a computer, the program performs the following operations: Figure 1-4 A method for modifying a serial number according to any one of the embodiments shown in .

[0058] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0059] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0060] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0061] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0062] 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 computer-readable storage medium. Based on this understanding, the technical solution of the present application, 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. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk, and other media that can store program code.

Claims

1. A method for modifying a serial number, characterized in that: include: Obtain a configuration list, wherein the configuration list is pre-filled with the information to be modified; After receiving the configuration instruction, traverse the configuration list and the server to be modified according to the configuration instruction, and obtain the corresponding relationship between the information to be modified and the server to be modified; After the identity verification is passed, the original serial number of the server to be modified is obtained; After confirming that the original serial number meets the preset standard, writing the original serial number into the asset tag of the server to be modified; The original sequence number is modified according to the corresponding relationship and the configuration list.

2. The method according to claim 1, characterized in that After traversing the configuration list and the server to be modified according to the configuration instruction and obtaining the corresponding relationship between the information to be modified and the server to be modified, the method further includes: According to the corresponding relationship, obtaining the identity token corresponding to the server to be modified; The server to be modified is authenticated according to the identity token to obtain operation permission, where the operation permission includes modification permission and write permission.

3. The method according to claim 1, characterized in that Before writing the original serial number into the asset tag of the server to be modified, the method further includes: a combination of letters and numbers identifying the original serial number; Verify that the letter and number combination begins with "PR"; If so, confirming that the original serial number meets the preset standard; If not, it is determined that the original serial number does not meet the preset standard.

4. The method according to claim 1, wherein The information to be modified includes the server model, baseboard management controller IP address, baseboard management controller user name, baseboard management controller password and the serial number to be modified, and modifying the original serial number according to the corresponding relationship and the configuration list includes: Matching the corresponding relationship with the server model and the baseboard management controller IP address to obtain a matching result; Obtain the corresponding serial number to be modified according to the matching result; Obtaining modification authority according to the baseboard management controller user name and the baseboard management controller password; The original serial number is modified to the corresponding serial number to be modified.

5. The method according to any one of claims 1 to 4, characterized in that Modifying the original sequence number according to the corresponding relationship and the configuration list includes: An ipmitool command is executed to modify the original serial number according to the corresponding relationship and the configuration list, wherein the ipmitool command is obtained by encapsulating an init function, a run_command function, and a modify_fru_sn function.

6. The method according to any one of claims 1 to 4, characterized in that After modifying the original sequence number according to the corresponding relationship and the configuration list, the method further includes: Call the sendRusultToNodejs function to send the result of modifying the original serial number to the Node.js server, so that the Node.js server sends the result of modifying the original serial number to the front-end JavaScript through IPC communication, and displays the result of modifying the original serial number in a table form on the user interface according to a pre-set display and statistical method.

7. A system for modifying serial numbers, characterized in that: include: A configuration list unit, used to obtain a configuration list, wherein the configuration list is pre-filled with information to be modified; a traversal unit, configured to, after receiving a configuration instruction, traverse the configuration list and the server to be modified according to the configuration instruction, and obtain a correspondence between the information to be modified and the server to be modified; An original serial number unit, used to obtain the original serial number of the server to be modified after the identity authentication is passed; a writing unit, configured to write the original serial number into the asset tag of the server to be modified after confirming that the original serial number meets a preset standard; A modification unit is configured to modify the original sequence number according to the corresponding relationship and the configuration list.

8. The system according to claim 7, characterized in that After iterating over the cells, also include: An identity token unit, configured to obtain an identity token corresponding to the server to be modified according to the corresponding relationship; The identity authentication unit is used to authenticate the server to be modified according to the identity token to obtain an operation permission, where the operation permission is a modification permission and a write permission.

9. An electronic device, characterized in that: include: processor, memory, input and output units, and buses; The processor is connected to the memory, the input and output unit, and the bus; The memory stores a program, and the processor calls the program to execute the method for modifying a serial number according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a program, and when the program is executed on a computer, the method for modifying a serial number according to any one of claims 1 to 7 is executed.