A screen printing serial number generation method, system, device and computer storage medium

By obtaining the initial silkscreen position information and target traversal order of the server processing unit port, and combining it with the numbering generation method, the flexibility problem of hard disk silkscreen serial number generation is solved, achieving accurate and flexible generation of hard disk serial numbers and avoiding server function errors.

CN119576422BActive Publication Date: 2026-05-01INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INSPUR SUZHOU INTELLIGENT TECH CO LTD
Filing Date
2024-11-29
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In existing technologies, generating silkscreen serial numbers for server hard drives requires custom hard drive cables, resulting in low cable reuse rates and unchangeable configurations, leading to poor flexibility.

Method used

By obtaining the initial silkscreen location information of the server processing unit port, and combining the target traversal order and number generation method, the hard disk silkscreen serial number is generated. The system management bus protocol is used to access the preset memory to obtain the hard disk number information, and the target traversal order and number generation method are flexibly adjusted to generate the required serial number.

Benefits of technology

It enables flexible generation of hard drive silkscreen serial numbers, ensures the stability of the enumeration order, avoids server function errors, and improves the accuracy and flexibility of hard drive serial number generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119576422B_ABST
    Figure CN119576422B_ABST
Patent Text Reader

Abstract

The application discloses a silk screen serial number generation method, system, device and computer storage medium, relates to the technical field of storage, and is applied to a basic input / output system, acquires initial silk screen position information generated after enumeration of a processing unit port of a server; acquires a target traversal sequence used for numbering a hard disk; acquires a numbering generation mode used for numbering the hard disk; traverses the initial silk screen position information according to the target traversal sequence, obtains traversal silk screen position information, and generates a serial number value of the hard disk according to the numbering generation mode; and generates silk screen serial number information of the hard disk according to the traversal silk screen position information and the serial number value. In the process of generating the silk screen serial number information, the silk screen serial number information of the hard disk is generated according to the traversal silk screen position information and the serial number value, so that the result of the silk screen serial number information can be changed after the target traversal sequence and the numbering generation mode are changed, and thus the required silk screen serial number can be flexibly generated.
Need to check novelty before this filing date? Find Prior Art

Description

A method, system, device, and computer storage medium for generating silkscreen serial numbers. Technical Field

[0001] This application relates to the field of storage technology, and more specifically, to a method, system, device, and computer storage medium for generating silkscreen serial numbers. Background Technology

[0002] During server operation, to manage hard drives, it's crucial to ensure that the user's hard drive numbering matches the server's. For example, the server's BIOS (Basic Input Output System) can enumerate the hard drives, and the user can then modify the hard drive order to match the silkscreen order on the chassis. However, this method requires custom-designed server hard drive cables, resulting in low cable reuse rates, unchangeable configurations, and poor flexibility in generating silkscreen serial numbers.

[0003] In conclusion, how to flexibly generate silkscreen serial numbers is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0004] The purpose of this application is to provide a method for generating silkscreen serial numbers, which can solve the technical problem of how to flexibly generate silkscreen serial numbers to a certain extent. This application also provides a silkscreen serial number generation system, an electronic device, and a computer-readable storage medium.

[0005] To achieve the above objectives, this application provides the following technical solution:

[0006] A method for generating silkscreen serial numbers, applied to a basic input / output system, includes:

[0007] Obtain the initial silkscreen position information generated after enumerating the processing unit ports of the server;

[0008] Obtain the target traversal order used to number the hard drives;

[0009] Obtain the numbering method used to number the hard drive;

[0010] The initial silkscreen position information is traversed according to the target traversal order to obtain the traversed silkscreen position information, and the hard disk serial number value is generated according to the numbering generation method.

[0011] Based on the traversed silkscreen location information and the sequence number value, generate the hard disk silkscreen sequence number information.

[0012] In an exemplary embodiment, obtaining the target traversal order for numbering the hard disks and obtaining the numbering generation method for numbering the hard disks include:

[0013] Access the preset memory via the system management bus protocol to obtain the target traversal order and numbering method for numbering the hard disk;

[0014] The preset memory is mounted on the system management bus of the central processing unit.

[0015] In an exemplary embodiment, the step of accessing a preset memory via the system management bus protocol to obtain the target traversal order and numbering generation method for numbering the hard disk includes:

[0016] The system management bus protocol is used to read the flag information stored at the first address in the preset memory;

[0017] In response to the flag information being valid, the selection information stored at the second address in the preset memory is read through the system management bus protocol;

[0018] In the preset memory, determine the third address corresponding to the selected information;

[0019] The third address in the preset memory is read through the system management bus protocol to obtain the target traversal order and numbering method for numbering the hard disk.

[0020] In one exemplary embodiment, obtaining the target traversal order for numbering the hard disk includes:

[0021] Obtain the target traversal order for numbering the hard disks, the target traversal order including the central processing unit traversal order and the processing unit port traversal order;

[0022] The method for obtaining the numbering method used to number the hard disk includes:

[0023] Obtain a numbering method for numbering hard drives, wherein the numbering method includes an independent numbering method or a unified numbering method.

[0024] In an exemplary embodiment, the step of traversing the initial silkscreen position information according to the target traversal order to obtain traversed silkscreen position information, and generating a hard disk serial number value according to the numbering generation method, includes:

[0025] In response to the numbering generation method being a unified numbering method, the values ​​of the processor variable, processing unit port variable, and sequence number variable are initialized;

[0026] Check if the processor variable is less than a first value, where the first value includes the total number of central processing units;

[0027] If the response processor variable is less than the first value, then it is detected whether the processing unit port variable is less than the second value, which includes the total number of processing unit ports of a single central processing unit.

[0028] In response to the processing unit port variable being less than the second value, a CPU that has not been traversed is selected as the processor to be traversed according to the CPU traversal order; among the processors to be traversed, an untraversed processing unit port is selected according to the processing unit port traversal order, and the initial silkscreen position information of the selected processing unit port is used as the traversal silkscreen position information; the hard disk serial number value is generated according to the hard disk type and serial number variable on the selected processing unit port, and the selected processing unit port is marked as traversed; the value of the serial number variable is increased, and the value of the processing unit port variable is increased; the process returns to the step of detecting whether the processing unit port variable is less than the second value.

[0029] In response to the processing unit port variable being equal to the second value, the processor to be traversed is marked as traversed, the value of the processor variable is increased, and the process returns to the step of detecting whether the processor variable is less than the first value.

[0030] The process ends when the processor variable is greater than the first value.

[0031] In an exemplary embodiment, the step of traversing the initial silkscreen position information according to the target traversal order to obtain traversed silkscreen position information, and generating a hard disk serial number value according to the numbering generation method, includes:

[0032] In response to the numbering method being an independent numbering method, the value of the position variable is initialized;

[0033] Check if the location variable is less than the region quantity value;

[0034] In response to the location variable being less than the number of regions, the values ​​of the processor variable, processing unit port variable, and sequence number variable are initialized; it is then detected whether the processor variable is less than a first value, which includes the total number of central processing units.

[0035] In response to the processor variable being less than the first value, it is then detected whether the processing unit port variable is less than the second value, which includes the total number of processing unit ports of a single central processing unit.

[0036] In response to the processing unit port variable being less than the second value, a CPU that has not been traversed is selected as the processor to be traversed according to the CPU traversal order; a processing unit port that has not been traversed is selected from the processors to be traversed according to the processing unit port traversal order; if the selected processing unit port is in the area corresponding to the position variable, the initial silkscreen position information of the selected processing unit port is used as the traversal silkscreen position information, the hard disk serial number value is generated according to the hard disk type and serial number variable on the selected processing unit port, the selected processing unit port is marked as traversed, the value of the serial number variable is increased, and the value of the processing unit port variable is increased; if the selected processing unit port is not in the area corresponding to the position variable, the value of the processing unit port variable is increased; the process returns to the step of detecting whether the processing unit port variable is less than the second value.

[0037] In response to the processing unit port variable being equal to the second value, the processor to be traversed is marked as traversed, the value of the processor variable is increased, and the process returns to the step of detecting whether the processor variable is less than the first value.

[0038] If the processor variable is greater than the first value, the value of the position variable is increased, and the process returns to the step of detecting whether the position variable is less than the region quantity value.

[0039] The process ends when the location variable equals the number of regions.

[0040] In an exemplary embodiment, after generating the hard disk silkscreen serial number information based on the traversed silkscreen location information and the serial number value, the method further includes:

[0041] The silkscreen serial number information is synchronized to the substrate management controller.

[0042] A silkscreen serial number generation system, applied to a basic input / output system, includes:

[0043] The first acquisition module is used to acquire the initial silkscreen position information generated after enumerating the processing unit ports of the server;

[0044] The second acquisition module is used to acquire the target traversal order for numbering the hard disk;

[0045] The third acquisition module is used to acquire the numbering generation method for the hard drive;

[0046] The first traversal module is used to traverse the initial silkscreen position information according to the target traversal order, obtain the traversed silkscreen position information, and generate the hard disk serial number value according to the numbering generation method.

[0047] The first generation module is used to generate the hard disk silkscreen serial number information based on the traversed silkscreen position information and the serial number value.

[0048] An electronic device, comprising:

[0049] Memory, used to store computer programs;

[0050] A processor, configured to implement the steps of any of the above-described silkscreen serial number generation methods when executing the computer program.

[0051] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the above-described silkscreen serial number generation methods.

[0052] This application provides a silkscreen serial number generation method applied to a basic input / output system. The method involves: obtaining initial silkscreen position information generated after enumerating the processing unit ports of a server; obtaining a target traversal order for numbering hard disks; obtaining a numbering generation method for numbering hard disks; traversing the initial silkscreen position information according to the target traversal order to obtain traversed silkscreen position information, and generating a serial number value for the hard disk according to the numbering generation method; and generating the silkscreen serial number information for the hard disk based on the traversed silkscreen position information and the serial number value. This application generates silkscreen serial number information only after obtaining the initial silkscreen location information generated by enumerating the processing unit ports of the server. This does not change the BIOS enumeration order, ensuring the stability of the enumeration order and avoiding server malfunctions caused by changes in the enumeration order. Furthermore, during the generation of silkscreen serial number information, since the silkscreen location information is traversed according to the target traversal order, and the hard drive serial number value is determined according to the numbering generation method, and the hard drive silkscreen serial number information is generated based on the traversal silkscreen location information and the serial number value, changing the target traversal order and the numbering generation method can change the result of the silkscreen serial number information. This allows for flexible control of the BIOS to generate the required silkscreen serial number. The silkscreen serial number generation system, electronic device, and computer-readable storage medium provided in this application also solve the corresponding technical problems. Attached Figure Description

[0053] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0054] Figure 1 is a flowchart of a silkscreen serial number generation method provided in an embodiment of this application;

[0055] Figure 2 is a schematic diagram of the port numbering and traversal order;

[0056] Figure 3 is a schematic diagram of the data format read by the BIOS from the preset memory via the system management bus protocol;

[0057] Figure 4 is a flowchart of the unified numbering system;

[0058] Figure 5 shows the flowchart with independent numbering;

[0059] Figure 6 is a schematic diagram of a silkscreen serial number generation system provided in an embodiment of this application;

[0060] Figure 7 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0061] Figure 8 is another structural schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0062] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0063] Please refer to Figure 1, which is a flowchart of a silkscreen serial number generation method provided in an embodiment of this application.

[0064] This application provides a silkscreen serial number generation method, applied to a basic input / output system, which may include the following steps:

[0065] Step S101: Obtain the initial silkscreen position information generated after enumerating the processing unit ports of the server.

[0066] In practical applications, the BIOS enumerates the processing unit ports (PE Ports) of a server according to a predefined enumeration order. To ensure that the BIOS enumeration order remains unchanged, this application requires generating silkscreen serial numbers based on the enumeration results after the BIOS completes the enumeration. This means obtaining the initial silkscreen location information generated after enumerating the server's processing unit ports. The initial silkscreen location information records the location information of the enumerated hard drive. This information can consist of the CPU (Central Processing Unit) number, the processing unit port number, and the hard drive's position on the processing unit port. For example, the type of the initial silkscreen location information could be CPU1_PE1_EF, indicating that the hard drive is located at port EF of PE1 in CPU1. The relationship between the CPU and PE, and the port division method on the PE, can be flexibly determined according to actual needs. Furthermore, the hard drive in this application can be an NVME (Non-Volatile Memory Host Controller Interface Specification) drive, etc.

[0067] Step S102: Obtain the target traversal order used to number the hard disks.

[0068] Step S103: Obtain the numbering method used to number the hard disk.

[0069] In practical applications, after obtaining the initial silkscreen location information generated by enumerating the processing unit ports of the server, since the initial silkscreen location information represents the port information of the hard drive on the server, the BIOS can manage the hard drive based on the initial silkscreen location information, and thus generate the hard drive's silkscreen serial number based on the initial silkscreen location information. During this process, considering the user's hardware planning for the server motherboard, the installation location of the hard drives on the motherboard has been determined. At this time, in order to ensure that the silkscreen serial numbers generated by the BIOS match the user's hard drive installation location, the BIOS needs to ensure that the generated silkscreen serial numbers are consistent with the user's hard drive numbering results. To this end, the BIOS needs to obtain the target traversal order for numbering the hard drives and the numbering generation method for numbering the hard drives. It then traverses the hard drives according to the target traversal order and generates the serial number value of the traversed hard drives according to the numbering generation method. In this way, only the target traversal order and the numbering generation method need to be adjusted to flexibly generate the required serial number values. Taking three hard drives as an example, assuming that the first hard drive is traversed first, then the second hard drive, and finally the third hard drive, and the numbering generation method is 1 then 2 then 3, then the serial numbers of the three hard drives are 1, 2, and 3 respectively. If only the target traversal order is changed to traverse the second hard drive first, then the first hard drive, and finally the third hard drive, then the serial numbers of the three hard drives will change to 2, 1, and 3.

[0070] In specific application scenarios, users also identify hard drives using hard drive serial numbers. If the user's hard drive serial number differs from the BIOS's, the user cannot directly locate and operate the corresponding hard drive based on the BIOS's serial number when the BIOS detects a hard drive malfunction. Therefore, overcoming this challenge lies in how to effectively communicate the user's hard drive serial number to the BIOS, ensuring consistency between the two. Considering the BIOS's ability to interact with the CPU and the CPU's ability to access memory, the target traversal order and serial number generation method for hard drive serialization can be written into this memory, which the BIOS can then read to obtain the corresponding information. Specifically, the BIOS can access a preset memory via the System Management Bus (SMBUS) protocol to obtain the target traversal order and serial number generation method for hard drive serialization. This preset memory is connected to the CPU's SMBUS, for example, via a bidirectional two-wire synchronous serial bus. The type of preset memory can be determined according to the needs of the scenario. For example, the preset memory can be EEPROM (Electrically Erasable Programmable Read-Only Memory).

[0071] In specific application scenarios, information related to the hard drive serial number can be stored at various addresses in the preset memory. For example, a flag bit can be set at the header address to indicate whether the hard drive serial number information in the preset memory is valid. This allows the BIOS to continue accessing the preset memory to obtain the hard drive serial number information when the flag bit information is valid, and to end the reading of the preset memory when the flag bit is invalid. Furthermore, various types of hard drive serial number information can be stored at various addresses in the preset memory, and a specific address can be set to store the currently valid hard drive serial number information. In this way, the user only needs to adjust this specific address information to flexibly select the required hard drive serial number information, avoiding the process of repeatedly writing hard drive serial number information to the preset memory. The stored content can be as shown in Table 1. Correspondingly, when the BIOS accesses the preset memory through the system management bus protocol to obtain the target traversal order and numbering method for numbering the hard disks, it can read the flag information stored at the first address in the preset memory through the system management bus protocol. In response to the flag information being valid, it reads the selection information stored at the second address in the preset memory through the system management bus protocol. This selection information is used to select the storage address of the effective hard disk numbering information. In the preset memory, the third address corresponding to the selection information is determined. The third address in the preset memory is read through the system management bus protocol to obtain the target traversal order and numbering method for numbering the hard disks.

[0072] Table 1 Address information of preset memory

[0073]

[0074] In Table 1, Area 0 of the preset memory is used to store flag information; Area 1 is used to store the number of types of hard disk numbering information, such as reserving a total of 10 numbering schemes; Area 2 stores information representing the numbering rules of the front and rear windows, that is, whether the front and rear windows are numbered independently or uniformly; Area 3 stores information representing the priority scanning CPU order, which can use 8 bytes, and the CPU priority is determined by the offset, supporting a maximum of 8 CPUs; Area 4 stores information representing the priority scanning PE Port order, which can use 6 bytes, and the PE Port priority is determined by the offset. Correspondingly, during the process of obtaining the target traversal order for numbering the hard drives, the BIOS can obtain the target traversal order for numbering the hard drives. The target traversal order includes the CPU traversal order and the processing unit port traversal order. The CPU traversal order is the order in which the CPU is traversed, such as traversing CPU4 first, then CPU0, then CPU2, etc. The processing unit port traversal order is the order in which the processing unit ports within the CPU are traversed. Assuming a single CPU has 6 PEs, the processing unit port traversal order could be PE4 first, then PE0, then PE2, etc., at which point the corresponding ports... The numbering can be as shown in Figure 2. During the process of obtaining the numbering generation method for hard drives, the numbering generation method can be obtained. The numbering generation method includes independent numbering or unified numbering. Independent numbering means that hard drives in each region need to be numbered independently. Unified numbering means that all hard drives use a single set of numbers. Taking the front and back windows of the server as examples, with unified numbering, the hard drive serial numbers in the front window are 0, 1, 2…9, and the hard drive serial numbers in the back window are 10, 11…; while with independent numbering, the hard drive serial numbers in the front window are 0, 1, 2…9, and the hard drive serial numbers in the back window are 0, 1, 2…9.

[0075] It should be noted that the data format of the preset memory read by the BIOS through the system management bus protocol can be flexibly determined according to the specific scenario. For example, as shown in Figure 3, the Device Address represents the device address of the preset memory, and the two-byte Word Address is a 16-bit offset, which can be the offset of the content stored in the preset memory. All offset content can be read out by incrementing 1 using a For loop; Data represents the actual content read out.

[0076] Step S104: Traverse the initial silkscreen position information according to the target traversal order to obtain the traversed silkscreen position information, and generate the hard disk sequence number value according to the numbering generation method.

[0077] Step S105: Generate the hard disk silkscreen serial number information based on the traversed silkscreen location information and serial number value.

[0078] In practical applications, after obtaining the target traversal order and numbering generation method for the hard drives, the BIOS can traverse the initial silkscreen location information according to the target traversal order to obtain the traversed silkscreen location information, and generate the hard drive's serial number value according to the numbering generation method. At this point, the hard drive's location and serial number value on the server are known, so the hard drive's silkscreen serial number information can be generated based on the traversed silkscreen location information and serial number value. For example, the two can be combined in the order of the hard drive's traversed silkscreen location information first and the serial number value last to obtain the silkscreen serial number information. For example, the silkscreen serial number information can be CPU1_PE1_EF_NVME0, where 0 is the hard drive's serial number value, NVME indicates the hard drive type, and the hard drive type identification method can be determined according to actual needs.

[0079] In practical applications, traversal bits can be set for each central processing unit (CPU) and processing unit. These traversal bits indicate whether an object has been traversed. In the process of traversing the initial silkscreen position information according to the target traversal order to obtain the traversed silkscreen position information, and generating the hard drive serial number value according to the numbering method, we can first select an untraversed CPU as the processor to be traversed based on the traversal bits and the CPU traversal order. Then, according to the processing unit port traversal order, we select an untraversed processing unit as the processing unit to be traversed. We then traverse the ports of the processing unit to be traversed, using the initial silkscreen position information of the traversed port as the traversed silkscreen position information, and generate the serial number value of the hard drive installed on that traversed port according to the numbering method. After traversing all ports of the processing unit to be traversed, the traversal bit of that processing unit can be set to traversed. After traversing all processing units in the processor to be traversed, the traversal bit of that processor can be set to traversed. In this way, whether each central processing unit and processing unit has been traversed can be accurately recorded by the traversal bit. The BIOS only needs to combine the traversal bit to accurately traverse the initial silkscreen position information of the corresponding port according to the central processing unit traversal order and the processing unit port traversal order, and can accurately generate the hard drive serial number value on that port, avoiding the generation of chaotic hard drive serial number values ​​due to missing port traversal, thus improving the accuracy of hard drive serial number value generation.

[0080] In specific application scenarios, during the process of traversing the initial silkscreen position information according to the target traversal order to obtain the traversed silkscreen position information, and generating the hard drive serial number value according to the numbering generation method, since the numbering generation method is a unified numbering method, all hard drives can be directly numbered, as shown in Figure 4:

[0081] Initialize the values ​​of processor variables, processing unit port variables, and sequence number variables, for example, by initializing all these values ​​to 1;

[0082] Check if the processor variable is less than a first value, which includes the total number of central processing units;

[0083] If the response processor variable is less than the first value, then check if the processing unit port variable is less than the second value, which includes the total number of processing unit ports of a single central processing unit.

[0084] In response to the processing unit port variable being less than the second value, a CPU that has not been traversed is selected as the processor to be traversed according to the CPU traversal order. Then, an untraversed processing unit port is selected from the processors to be traversed according to the processing unit port traversal order. The initial silkscreen position information of the selected processing unit port is used as the traversal silkscreen position information. A hard disk serial number value is generated based on the hard disk type and serial number variables on the selected processing unit port (e.g., combining the hard disk type and serial number variables as the hard disk serial number value). The selected processing unit port is marked as traversed. The value of the serial number variable is increased, for example, by 1. The value of the processing unit port variable is also increased, for example, by 1. The process returns to the step of checking whether the processing unit port variable is less than the second value.

[0085] In response to the processing unit port variable being equal to the second value, the processor to be traversed is marked as traversed, the value of the processor variable is increased, for example, by 1, and the process returns to the step of checking whether the processor variable is less than the first value.

[0086] The process ends when the processor variable is greater than the first value.

[0087] In specific application scenarios, during the process of traversing the initial silkscreen position information according to the target traversal order to obtain the traversed silkscreen position information, and generating the hard disk serial number value according to the numbering generation method, in response to the independent numbering method, it is necessary to independently number the hard disks in each region. At this time, the hard disks can be numbered according to the region type, as shown in Figure 5:

[0088] Initialize the value of the location variable, such as initializing it to 1. The location variable is used to represent the information of the area where the hard drive is located. For example, the front window of the server can be represented by 0, and the back window of the server can be represented by 1.

[0089] Check if the location variable is less than the region quantity value, which is the number of server regions that need to be independently numbered.

[0090] In response to the location variable being less than the region quantity value, the values ​​of the processor variable, processing unit port variable, and sequence number variable are initialized, for example, by initializing these values ​​to 1.

[0091] Check if the processor variable is less than a first value, which includes the total number of central processing units;

[0092] In response to the processor variable being less than a first value, it is then checked whether the processing unit port variable is less than a second value, which includes the total number of processing unit ports of a single central processing unit.

[0093] In response to the processing unit port variable being less than the second value, a CPU that has not been traversed is selected as the processor to be traversed according to the CPU traversal order; a processing unit port that has not been traversed is selected from the processors to be traversed according to the processing unit port traversal order; if the selected processing unit port is in the area corresponding to the position variable, the initial silkscreen position information of the selected processing unit port is used as the traversal silkscreen position information, the hard disk serial number value is generated according to the hard disk type and serial number variable on the selected processing unit port, the selected processing unit port is marked as traversed, and the value of the serial number variable is increased, for example, by 1, and the value of the processing unit port variable is increased, for example, by 1; if the selected processing unit port is not in the area corresponding to the position variable, the value of the processing unit port variable is increased, for example, by 1; return to the step of checking whether the processing unit port variable is less than the second value;

[0094] In response to the processing unit port variable being equal to the second value, the processor to be traversed is marked as traversed, the value of the processor variable is increased, for example, by 1, and the process returns to the step of checking whether the processor variable is less than the first value.

[0095] If the processor variable is greater than the first value, the value of the position variable is increased, for example, by 1, and the process returns to the step of checking whether the position variable is less than the region quantity value.

[0096] The process ends when the location variable equals the region quantity value.

[0097] As can be seen from the implementation process, in the process of independently numbering hard drives, after determining the corresponding area based on the location variable, the serial number variable of the hard drive in that area is initialized to 0. In this way, the serial number value of the hard drive in each area is generated starting from 0, laying the foundation for the independent numbering of hard drives in each area. Furthermore, in the process of independently numbering the hard drives in each area, the initial silkscreen position information of the selected processing unit port is used as the traversal silkscreen position information. The serial number value of the hard drive is generated based on the hard drive type and serial number variable at the selected processing unit port. Only after the selected processing unit port is marked as traversed is the value of the serial number variable increased, and the value of the processing unit port variable is also increased. When the selected processing unit port is not in the area corresponding to the location variable, only the value of the processing unit port variable is increased, and the value of the serial number variable is not increased. In this way, the next hard drive belonging to this area will still use the previous serial number variable to generate the serial number value, ensuring the continuity of the hard drive serial number value in the same area and achieving the effect of stable numbering of hard drives in the same area.

[0098] It should be noted that if the selected processing unit port is not in the area corresponding to the position variable, the selected processing unit port does not need to be marked as traversed. In this way, after changing the position variable, the traversal of the processing unit port can continue. Of course, the selected processing unit port can also be marked as traversed, but after changing the position variable, all traversal bits need to be reset so that the traversal of the processing unit port can continue.

[0099] In practical applications, after generating the hard drive's silkscreen serial number information based on the silkscreen location information and serial number value, the BIOS can also synchronize the silkscreen serial number information to the baseboard management controller and the BIOS's own setting interface, so that the hard drive can be managed accordingly using the silkscreen serial number information.

[0100] This application provides a silkscreen serial number generation method applied to a basic input / output system. The method involves: obtaining initial silkscreen position information generated after enumerating the processing unit ports of a server; obtaining a target traversal order for numbering hard disks; obtaining a numbering generation method for numbering hard disks; traversing the initial silkscreen position information according to the target traversal order to obtain traversed silkscreen position information, and generating a serial number value for the hard disk according to the numbering generation method; and generating the silkscreen serial number information for the hard disk based on the traversed silkscreen position information and the serial number value. This application generates silkscreen serial number information only after obtaining the initial silkscreen location information generated by enumerating the processing unit ports of the server. This does not change the enumeration order of the BIOS, ensuring the stability of the enumeration order and avoiding server function errors caused by changes in the enumeration order. Furthermore, during the generation of silkscreen serial number information, since the silkscreen location information is traversed according to the target traversal order, and the hard disk serial number value is determined according to the numbering generation method, and the hard disk silkscreen serial number information is generated based on the traversal silkscreen location information and serial number value, changing the target traversal order and numbering generation method can change the result of the silkscreen serial number information, thereby allowing the BIOS to flexibly generate the required silkscreen serial number.

[0101] Please refer to Figure 6, which is a schematic diagram of the structure of a silkscreen serial number generation system provided in an embodiment of this application.

[0102] This application provides a silkscreen serial number generation system, applied to a basic input / output system, which may include:

[0103] The first acquisition module 101 is used to acquire the initial silkscreen position information generated after enumerating the processing unit ports of the server.

[0104] The second acquisition module 102 is used to acquire the target traversal order for numbering the hard disk;

[0105] The third acquisition module 103 is used to acquire the numbering generation method used to number the hard disk;

[0106] The first traversal module 104 is used to traverse the initial silkscreen position information according to the target traversal order, obtain the traversed silkscreen position information, and generate the hard disk sequence number value according to the numbering generation method.

[0107] The first generation module 105 is used to generate the hard disk silkscreen serial number information based on the traversed silkscreen position information and serial number value.

[0108] This application provides a silkscreen serial number generation system, applied to a basic input / output system. The second acquisition module and the third acquisition module may include:

[0109] The first access unit is used to access the preset memory through the system management bus protocol to obtain the target traversal order and numbering generation method for numbering the hard disk.

[0110] The preset memory is mounted on the system management bus of the central processing unit.

[0111] This application provides a silkscreen serial number generation system applied to a basic input / output system. The first access unit can be used to: read flag information stored at a first address in a preset memory via the system management bus protocol; in response to the flag information being valid, read selection information stored at a second address in the preset memory via the system management bus protocol; determine a third address corresponding to the selection information in the preset memory; and read the third address in the preset memory via the system management bus protocol to obtain the target traversal order and number generation method for numbering the hard disk.

[0112] This application provides a silkscreen serial number generation system, applied to a basic input / output system, wherein the second acquisition module may include:

[0113] The first acquisition unit is used to acquire the target traversal order for numbering the hard disk. The target traversal order includes the central processing unit traversal order and the processing unit port traversal order.

[0114] The third acquisition module may include:

[0115] The second acquisition unit is used to acquire the numbering method used to number the hard disk. The numbering method includes an independent numbering method or a unified numbering method.

[0116] This application provides a silkscreen serial number generation system, applied to a basic input / output system. The first traversal module may include:

[0117] The first initialization unit is used to initialize the values ​​of the processor variable, the processing unit port variable, and the sequence number variable in response to the numbering generation method being a unified numbering method.

[0118] The first detection unit is used to detect whether the processor variable is less than a first value, which includes the total number of central processing units (CPUs); in response to the processor variable being less than the first value, it detects whether the processing unit port variable is less than a second value, which includes the total number of processing unit ports for a single CPU; in response to the processing unit port variable being less than the second value, it selects an untraveled CPU as the processor to be traversed according to the CPU traversal order; in the processor port traversal order, it selects an untraveled processing unit port from the processors to be traversed, uses the initial silkscreen position information of the selected processing unit port as the traversal silkscreen position information, generates the hard disk serial number value based on the hard disk type and serial number variable on the selected processing unit port, and marks the selected processing unit port as traversed; it increases the value of the serial number variable and the value of the processing unit port variable; it returns to the step of detecting whether the processing unit port variable is less than the second value; in response to the processing unit port variable being equal to the second value, it marks the processor to be traversed as traversed, increases the value of the processor variable, and returns to the step of detecting whether the processor variable is less than the first value; in response to the processor variable being greater than the first value, it ends.

[0119] This application provides a silkscreen serial number generation system, applied to a basic input / output system. The first traversal module may include:

[0120] The second initialization unit is used to initialize the value of the position variable in response to the numbering generation method being independent numbering.

[0121] The second detection unit is used to detect whether the position variable is less than the region quantity value; in response to the position variable being less than the region quantity value, it initializes the values ​​of the processor variable, processing unit port variable, and sequence number variable; it detects whether the processor variable is less than a first value, the first value including the total number of central processing units; in response to the processor variable being less than the first value, it detects whether the processing unit port variable is less than a second value, the second value including the total number of processing unit ports of a single central processing unit; in response to the processing unit port variable being less than the second value, it selects an untraversed central processing unit as the processor to be traversed according to the central processing unit traversal order; it selects an untraversed processing unit port from the processors to be traversed according to the processing unit port traversal order; if the selected processing unit port is located in the region corresponding to the position variable, it initializes the value of the selected processing unit port. The silkscreen location information is used to traverse the silkscreen location information. Based on the hard drive type and serial number variable at the selected processing unit port, a hard drive serial number value is generated. The selected processing unit port is marked as traversed, the serial number variable is increased, and the processing unit port variable is increased. If the selected processing unit port is not in the area corresponding to the location variable, the processing unit port variable is increased. The process then returns to the step of checking if the processing unit port variable is less than a second value. If the processing unit port variable equals the second value, the processor to be traversed is marked as traversed, the processor variable is increased, and the process returns to the step of checking if the processor variable is less than a first value. If the processor variable is greater than the first value, the location variable is increased, and the process returns to the step of checking if the location variable is less than the area quantity value. If the location variable equals the area quantity value, the process ends.

[0122] This application provides a silkscreen serial number generation system, applied to a basic input / output system, which may further include:

[0123] The first synchronization module is used to synchronize the silkscreen serial number information of the hard disk to the baseboard management controller after the first generation module generates the silkscreen serial number information of the hard disk based on the traversed silkscreen position information and serial number value.

[0124] This application also provides an electronic device and a computer-readable storage medium, both of which have the corresponding effects of the silkscreen serial number generation method provided in the embodiments of this application. Please refer to Figure 7, which is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0125] An electronic device provided in this application includes a memory 201 and a processor 202. The memory 201 stores a computer program, and when the processor 202 executes the computer program, it implements the steps of the silkscreen serial number generation method described in any of the above embodiments.

[0126] Referring to Figure 8, another electronic device provided in this application embodiment may further include: an input port 203 connected to the processor 202 for transmitting commands input from the outside to the processor 202; a display unit 204 connected to the processor 202 for displaying the processing results of the processor 202 to the outside; and a communication module 205 connected to the processor 202 for enabling communication between the electronic device and the outside. The display unit 204 may be a display panel, a laser scanner, or the like; the communication method used by the communication module 205 includes, but is not limited to, Mobile High-Definition Link (MHL), Universal Serial Bus (USB), High-Definition Multimedia Interface (HDMI), wireless connectivity: Wireless Fidelity (WiFi), Bluetooth communication technology, Bluetooth Low Energy communication technology, and communication technology based on IEEE 802.11s.

[0127] This application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the steps of the silkscreen serial number generation method described in any of the above embodiments.

[0128] The computer-readable storage media involved in this application include random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs (compact disc read-only memory), or any other form of storage media known in the art.

[0129] This application provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the silkscreen serial number generation method described in any of the above embodiments.

[0130] For descriptions of relevant parts of the silkscreen serial number generation system, electronic device, and computer-readable storage medium provided in this application's embodiments, please refer to the detailed description of the corresponding parts in the silkscreen serial number generation method provided in this application's embodiments, which will not be repeated here. Furthermore, parts of the technical solutions provided in this application that are consistent with the implementation principles of corresponding technical solutions in the prior art have not been described in detail to avoid excessive elaboration.

[0131] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0132] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for generating silkscreen serial numbers, characterized in that, This system, applied to a basic input / output system, includes: acquiring initial silkscreen location information generated after enumerating the processing unit ports of a server, wherein the initial silkscreen location information is used to record the location information of the enumerated hard disks; acquiring a target traversal order for numbering the hard disks; acquiring a numbering generation method for numbering the hard disks; traversing the initial silkscreen location information according to the target traversal order to obtain traversed silkscreen location information, and generating a serial number value for the hard disk according to the numbering generation method; generating silkscreen serial number information for the hard disk based on the traversed silkscreen location information and the serial number value; wherein acquiring the target traversal order for numbering the hard disks and acquiring the numbering generation method for numbering the hard disks includes: accessing a preset memory through a system management bus protocol to obtain the target traversal order and numbering generation method for numbering the hard disks; wherein the preset memory is mounted on a central... Under the processor's system management bus, the target traversal order includes the CPU traversal order and the processing unit port traversal order; wherein, the step of traversing the initial silkscreen position information according to the target traversal order to obtain the traversed silkscreen position information includes: selecting an untraversed CPU as the processor to be traversed according to the CPU traversal order based on the traversal bits set for each CPU and processing unit, and then selecting an untraversed processing unit as the processing unit to be traversed according to the processing unit port traversal order; traversing the ports of the processing unit to be traversed, and using the initial silkscreen position information of the traversed ports as the traversed silkscreen position information; after completing the traversal of all ports of the processing unit to be traversed, the traversal bit of the processing unit to be traversed is set to traversed; after completing the traversal of all processing units in the processor to be traversed, the traversal bit of the processor to be traversed is set to traversed.

2. The method according to claim 1, characterized in that, The step of accessing a preset memory via the system management bus protocol to obtain the target traversal order and numbering method for numbering the hard disk includes: reading flag information stored at a first address in the preset memory via the system management bus protocol; in response to the flag information being valid, reading selection information stored at a second address in the preset memory via the system management bus protocol; determining a third address corresponding to the selection information in the preset memory; and reading the third address in the preset memory via the system management bus protocol to obtain the target traversal order and numbering method for numbering the hard disk.

3. The method according to claim 1, characterized in that, The step of obtaining the numbering generation method for numbering the hard disk includes: obtaining the numbering generation method for numbering the hard disk, wherein the numbering generation method includes an independent numbering method or a unified numbering method.

4. The method according to claim 3, characterized in that, The step of traversing the initial silkscreen position information according to the target traversal order to obtain traversed silkscreen position information, and generating the hard disk serial number value according to the numbering generation method, includes: in response to the numbering generation method being a unified numbering method, initializing the values ​​of the processor variable, processing unit port variable, and serial number variable; detecting whether the processor variable is less than a first value, the first value including the total number of central processing units; in response to the processor variable being less than the first value, detecting whether the processing unit port variable is less than a second value, the second value including the total number of processing unit ports of a single central processing unit; in response to the processing unit port variable being less than the second value, selecting an untraversed central processing unit as the one to be traversed according to the central processing unit traversal order. The process involves: selecting an untraversed processing unit port from the processors to be traversed according to the traversal order of the processing unit ports; using the initial silkscreen position information of the selected processing unit port as the traversal silkscreen position information; generating a hard disk serial number value based on the hard disk type and serial number variable on the selected processing unit port; marking the selected processing unit port as traversed; increasing the value of the serial number variable and the value of the processing unit port variable; returning to the step of detecting whether the processing unit port variable is less than the second value; in response to the processing unit port variable being equal to the second value, marking the processor to be traversed as traversed, increasing the value of the processor variable, and returning to the step of detecting whether the processor variable is less than the first value; and ending the process in response to the processor variable being greater than the first value.

5. The method according to claim 3, characterized in that, The step of traversing the initial silkscreen position information according to the target traversal order to obtain traversed silkscreen position information, and generating the hard disk serial number value according to the numbering generation method, includes: initializing the value of a position variable in response to the numbering generation method being an independent numbering method; detecting whether the position variable is less than the region quantity value; initializing the values ​​of a processor variable, a processing unit port variable, and a serial number variable in response to the position variable being less than the region quantity value; detecting whether the processor variable is less than a first value, the first value including the total number of central processing units; detecting whether the processing unit port variable is less than a second value, the second value including the total number of processing unit ports of a single central processing unit in response to the processor variable being less than the second value; selecting an untraversed central processing unit as the processor to be traversed according to the central processing unit traversal order; and selecting an untraversed processor from the processors to be traversed according to the processing unit port traversal order. The process involves several steps: First, if the selected processing unit port is located within the region corresponding to the location variable, the initial silkscreen location information of the selected processing unit port is used as the traversal silkscreen location information. The hard drive's serial number value is generated based on the hard drive type and serial number variable on the selected processing unit port. The selected processing unit port is marked as traversed, the value of the serial number variable is increased, and the value of the processing unit port variable is increased. If the selected processing unit port is not located within the region corresponding to the location variable, the value of the processing unit port variable is increased. The process then returns to the step of detecting whether the processing unit port variable is less than the second value. If the processing unit port variable equals the second value, the processor to be traversed is marked as traversed, the value of the processor variable is increased, and the process returns to the step of detecting whether the processor variable is less than the first value. If the processor variable is greater than the first value, the value of the location variable is increased, and the process returns to the step of detecting whether the location variable is less than the region quantity value. If the location variable equals the region quantity value, the process ends.

6. The method according to claim 1, characterized in that, After generating the hard disk silkscreen serial number information based on the traversed silkscreen position information and the serial number value, the method further includes: synchronizing the silkscreen serial number information to the substrate management controller.

7. A silkscreen serial number generation system, characterized in that, This system is applied to a basic input / output system and includes: a first acquisition module for acquiring initial silkscreen location information generated after enumerating the processing unit ports of a server, wherein the initial silkscreen location information is used to record the location information of the enumerated hard disks; a second acquisition module for acquiring a target traversal order for numbering the hard disks; a third acquisition module for acquiring a numbering generation method for numbering the hard disks; a first traversal module for traversing the initial silkscreen location information according to the target traversal order to obtain traversed silkscreen location information, and generating a serial number value for the hard disk according to the numbering generation method; and a first generation module for generating silkscreen serial number information for the hard disk based on the traversed silkscreen location information and the serial number value; wherein the second and third acquisition modules include: a first access unit for accessing a preset memory via a system management bus protocol to obtain information for numbering the hard disks. The target traversal order and numbering method are defined as follows: the preset memory is mounted on the system management bus of the central processing unit (CPU); the target traversal order includes the CPU traversal order and the processing unit port traversal order; the first traversal module is configured to: select an untraversed CPU as the processor to be traversed according to the CPU traversal order based on the traversal bits set for each CPU and processing unit; select an untraversed processing unit as the processing unit to be traversed according to the processing unit port traversal order; traverse the ports of the processing unit to be traversed; and use the initial silkscreen position information of the traversed ports as the traversal silkscreen position information. After completing the traversal of all ports of the processing unit to be traversed, the traversal bit of the processing unit to be traversed is set to traversed. After completing the traversal of all processing units in the processor to be traversed, the traversal bit of the processor to be traversed is set to traversed.

8. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the silkscreen serial number generation method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the silkscreen serial number generation method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • PCIE (Peripheral Component Interface Express) equipment link state monitoring and alarming method, device and equipment and readable medium

    CN113448810A

  • Hard disk slot position and signal lamp number determination method and system and related assembly

    CN113849380A