CN108874441B - Board card configuration method, device, server and storage medium - Google Patents

Board card configuration method, device, server and storage medium Download PDF

Info

Publication number
CN108874441B
CN108874441B CN201810634811.5A CN201810634811A CN108874441B CN 108874441 B CN108874441 B CN 108874441B CN 201810634811 A CN201810634811 A CN 201810634811A CN 108874441 B CN108874441 B CN 108874441B
Authority
CN
China
Prior art keywords
board
board card
configuration
information
configuration file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810634811.5A
Other languages
Chinese (zh)
Other versions
CN108874441A (en
Inventor
邱大为
王凯
徐柳茂
朱佩
代志刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Shr Automation Co ltd
Original Assignee
Shanghai Shr Automation Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Shr Automation Co ltd filed Critical Shanghai Shr Automation Co ltd
Priority to CN201810634811.5A priority Critical patent/CN108874441B/en
Publication of CN108874441A publication Critical patent/CN108874441A/en
Application granted granted Critical
Publication of CN108874441B publication Critical patent/CN108874441B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The invention provides a board card configuration method, a board card configuration device, a server and a storage medium, wherein the board card configuration method comprises the following steps: when the system is started for the first time, acquiring an original configuration file, wherein the original configuration file comprises configuration information of a plurality of board cards to be selected, and the board cards to be selected are divided into necessary board cards and optional board cards; sending a first detection message corresponding to the first board card until the detection message corresponding to each board card to be selected in the plurality of board cards to be selected is sent; if the first feedback message is received, the configuration information of the first board card in the original configuration file is reserved; and if the first feedback message is not received and the first board card is the selectable board card, deleting the configuration information of the first board card in the original configuration file and regenerating the first configuration file. The embodiment of the invention can realize that the configuration file is compatible with the microcomputer protection device under a plurality of similar application scenes, thereby saving the cost and improving the efficiency.

Description

Board card configuration method, device, server and storage medium
Technical Field
The invention relates to the field of computer software, in particular to a method, a device, a server and a storage medium for configuring a card.
Background
The microcomputer protection device is an important component in the power system and is mainly responsible for the protection and measurement of each element in the power system. Microcomputer protection devices typically include a plurality of boards, such as protection boards, access boards, digital sampling boards, and the like.
For different application scenarios, the board cards used by the microcomputer protection device are different, and the board card configuration file needs to include configuration information of all the used board cards, so that developers need to customize different board card configuration files for different microcomputer protection devices.
However, in practical applications, the boards used by the microcomputer protection devices in some application scenarios are quite close, for example, only one board is different, and the other boards are the same, and the configuration files respectively generated by developers for the microcomputer protection devices are not very different, but cannot be shared, so that a large amount of repeated work is caused, the number of filing versions of the devices is increased by several times, the labor cost is high, and the efficiency is low.
Disclosure of Invention
The invention provides a method and a device for configuring a board card, a server and a storage medium, which are used for realizing compatibility of configuration files with a microcomputer protection device under a plurality of similar application scenes, saving cost and improving efficiency.
In a first aspect, an embodiment of the present invention provides a method for configuring a card, including:
when the system is started for the first time, acquiring an original configuration file, wherein the original configuration file comprises configuration information of a plurality of board cards to be selected, and the board cards to be selected are divided into necessary board cards and optional board cards;
sending a first detection message corresponding to a first board card, wherein the first board card is any one of the board cards to be selected, and the first detection message is used for detecting whether the first board card exists or not until the detection message corresponding to the first detection message is sent to each of the board cards to be selected;
if a first feedback message is received, retaining the configuration information of the first board card in the original configuration file, wherein the first feedback message is used for indicating the existence of the first board card;
and if the first feedback message is not received and the first board card is a selectable board card, deleting the configuration information of the first board card in the original configuration file and regenerating a first configuration file, wherein the first configuration file comprises the configuration information of at least one selected board card.
In a second aspect, an embodiment of the present invention provides a card configuration apparatus, including:
the system comprises an original configuration file acquisition module, a configuration file selection module and a configuration file selection module, wherein the original configuration file acquisition module is used for acquiring an original configuration file when the original configuration file is started for the first time, the original configuration file comprises configuration information of a plurality of board cards to be selected, and the board cards to be selected are divided into necessary board cards and optional board cards;
the first detection message sending module is used for sending a first detection message corresponding to a first board card, wherein the first board card is any one board card in the board cards to be selected, and the first detection message is used for detecting whether the first board card exists or not until the detection message corresponding to the first detection message is sent to each board card to be selected in the board cards to be selected;
a first configuration file updating module, configured to, if a first feedback message is received, retain configuration information of the first board card in the original configuration file, where the first feedback message is used to indicate that the first board card exists; and if the first feedback message is not received and the first board card is a selectable board card, deleting the configuration information of the first board card in the original configuration file and regenerating a first configuration file, wherein the first configuration file comprises the configuration information of at least one selected board card.
In a third aspect, an embodiment of the present invention provides a server, including:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the board configuration method provided by any embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the board configuration method provided in any embodiment of the present invention.
According to the embodiment of the invention, after the original configuration file is obtained, the first detection message corresponding to the first board card is sent, wherein the first board card is any one board card in the board cards to be selected, and whether the first board card exists or not can be detected; if the first feedback message is received, the first board card is indicated to exist, and the configuration information of the first board card in the original configuration file is reserved; and if the first feedback message is not received and the first board card is the selectable board card, deleting the configuration information of the first board card in the original configuration file and regenerating the first configuration file until the detection message corresponding to the first configuration file is sent to each board card to be selected in the plurality of board cards to be selected. The method provided by the embodiment of the invention can be applied to board card configuration of a plurality of microcomputer protection devices or board card configuration of other devices, and the board card configuration file suitable for each microcomputer protection device can be obtained by obtaining the original configuration file, so that a large amount of repeated work caused by that developers generate the board card configuration file for each microcomputer protection device independently is avoided, the number of filing versions of the device is greatly reduced, the labor cost is reduced, and the efficiency is improved.
Drawings
Fig. 1 is a flowchart of a method for configuring a board according to an embodiment of the present invention;
fig. 2 is a flowchart of a board configuration method according to a second embodiment of the present invention;
FIG. 3 is a flowchart of the method of step S320 in FIG. 2;
fig. 4 is a schematic structural diagram of a card configuration device according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of a server according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a board configuration method according to an embodiment of the present invention, where the embodiment of the present invention is applicable to a board configuration situation, and the method may be executed by a board configuration device, and the device may be implemented in a software and/or hardware manner and may be integrated on a server. Referring to fig. 1, the method specifically includes:
s110, when the system is started for the first time, an original configuration file is obtained, the original configuration file comprises configuration information of a plurality of board cards to be selected, and the board cards to be selected are divided into board cards to be selected and selectable board cards.
The original configuration file comprises configuration information of a plurality of boards to be selected, and the boards to be selected are divided into boards to be selected and selectable boards. Taking a microcomputer protection device as an example, a plurality of boards to be selected can be selected as boards commonly used in the microcomputer protection device, such as a management board, a protection board, a plurality of input/output boards, a plurality of digital sampling boards, and the like, wherein the management board is used for realizing the management function of the microcomputer protection device, the protection board is used for realizing the protection function of the microcomputer protection device, and the functions are the basic functions of the microcomputer protection device, so that for the microcomputer protection device, the management board and the protection board are the necessary boards of the microcomputer protection device. The input and output board cards are used for providing input and output contacts for the microcomputer protection device, the digital sampling board cards are used for achieving a digital sampling function, whether the input and output board cards and the digital sampling board cards are used or not in the microcomputer protection device, and the number of the input and output board cards and the digital sampling board cards can be selected according to specific application scenes, so that the input and output board cards and the digital sampling board cards are selectable board cards of the microcomputer protection device for the microcomputer protection device.
And S120, sending a first detection message corresponding to the first board card, wherein the first board card is any one of the board cards to be selected, and the first detection message is used for detecting whether the first board card exists or not until the detection message corresponding to the first board card is sent to each of the board cards to be selected.
Illustratively, the boards to be selected in the original configuration file include a management board, a protection board, an input/output board, a digital sampling board 1 and a digital sampling board 2, and a microcomputer protection device includes the management board, the protection board and the digital sampling board 1. And sending a first detection message corresponding to the first board card, wherein the first board card is any one of the board cards to be selected, and the first detection message corresponding to the management board card, the protection board card, the input and output board card, the digital sampling board card 1 and the digital sampling board card 2 is sent in sequence until the detection message corresponding to the first board card is sent to each of the plurality of board cards to be selected, so as to detect whether the management board card, the protection board card, the input and output board card, the digital sampling board card 1 and the digital sampling board card 2 exist on the microcomputer protection device.
And S130, if the first feedback message is received, retaining the configuration information of the first board card in the original configuration file, wherein the first feedback message is used for indicating the existence of the first board card.
Because the microcomputer protection device comprises the management board card, the protection board card and the digital sampling board card 1, a first feedback message corresponding to the management board card, the protection board card and the digital sampling board card 1 can be received, and the existence of the management board card, the protection board card and the digital sampling board card 1 is described, so that the configuration information of the management board card, the protection board card and the digital sampling board card 1 in an original configuration file is reserved.
And S140, if the first feedback message is not received and the first board card is a selectable board card, deleting the configuration information of the first board card in the original configuration file and regenerating a first configuration file, wherein the first configuration file comprises the configuration information of at least one selected board card.
Because the microcomputer protection device does not comprise the input/output board card and the digital sampling board card 2, the first feedback message of the input/output board card and the digital sampling board card 2 cannot be received, and the input/output board card and the digital sampling board card 2 are selectable board cards, the configuration information of the input/output board card and the digital sampling board card 2 in the original configuration file is deleted, and a first configuration file is generated again, wherein the first configuration file comprises the configuration information of the management board card, the protection board card and the digital sampling board card 1 which are included by the microcomputer protection device, and therefore the microcomputer protection device can be used for board card configuration of the microcomputer protection device.
In this embodiment, board card configuration of a microcomputer protection device is taken as an example, and a board card to be selected in an original configuration file exemplarily includes a management board card, a protection board card, an open-close board card, a digital sampling board card 1 and a digital sampling board card 2, so that by using the board card configuration method provided by this embodiment, the microcomputer protection device including only necessary board cards (the management board card and the protection board card) can be configured for the original configuration file, and a microcomputer protection device including any one or any two or three optional board cards among the open-close board card, the digital sampling board card 1 and the digital sampling board card 2 in addition to the necessary board card can also be configured, that is, the original configuration file can be configured with 8 different microcomputer protection devices in a compatible manner, thereby avoiding a large amount of repeated work caused by a developer generating a configuration file for each microcomputer protection device separately.
According to the embodiment of the invention, after the original configuration file is obtained, the first detection message corresponding to the first board card is sent, wherein the first board card is any one board card in the board cards to be selected, and whether the first board card exists or not can be detected; if the first feedback message is received, the first board card is indicated to exist, and the configuration information of the first board card in the original configuration file is reserved; and if the first feedback message is not received and the first board card is the selectable board card, deleting the configuration information of the first board card in the original configuration file and regenerating the first configuration file until the detection message corresponding to the first configuration file is sent to each board card to be selected in the plurality of board cards to be selected. The method provided by the embodiment of the invention can be applied to board card configuration of a plurality of microcomputer protection devices or board card configuration of other devices, and the board card configuration file suitable for each microcomputer protection device can be obtained by obtaining the original configuration file, so that a large amount of repeated work caused by that developers generate the board card configuration file for each microcomputer protection device independently is avoided, the number of filing versions of the device is greatly reduced, the labor cost is reduced, and the efficiency is improved.
Example two
Fig. 2 is a flowchart of a card configuration method according to a second embodiment of the present invention, and referring to fig. 2, on the basis of the second embodiment, optionally, the method includes:
s210, when the system is started for the first time, acquiring an original configuration file, wherein the original configuration file comprises configuration information of a plurality of board cards to be selected, and the board cards to be selected are divided into necessary board cards and optional board cards;
s220, sending a first detection message corresponding to the first board card, wherein the first board card is any one board card in the board cards to be selected, and the first detection message is used for detecting whether the first board card exists or not;
s230, whether a first feedback message is received or not is judged, wherein the first feedback message is used for indicating that the first board card exists; if yes, executing S240, otherwise, executing S270;
s240, reserving the configuration information of the first board card in the original configuration file.
And S250, recording the information of the first board card to a first information table.
The first information table records the board card information of the received first feedback message, that is, the information of the selected board card. Taking the configuration process of the microcomputer protection device in the first embodiment of the present invention as an example, the microcomputer protection device includes the management board card, the protection board card and the digital sampling board card 1, so that the first feedback message corresponding to the management board card, the protection board card and the digital sampling board card 1 can be received, and the information of the management board card, the protection board card and the digital sampling board card 1 is recorded in the first information table.
S260, whether each board to be selected in the plurality of board to be selected sends a detection message corresponding to the board to be selected; if so, go to step S310, otherwise go to step S220.
S270, whether the first board card is a selectable board card or not is judged; if yes, executing S280, otherwise executing S290;
s280, deleting configuration information of a first board card in the original configuration file and regenerating a first configuration file, wherein the first configuration file comprises configuration information of at least one selected board card, and executing S260;
and S290, generating first prompt information, wherein the first prompt information is used for indicating configuration failure.
The selected board card is a necessary board card for realizing basic functions of the device, so that the device cannot be normally operated and used if the selected board card does not exist in the device, taking a microcomputer protection device as an example, the management board card and the protection board card are selected board cards, and therefore, if no feedback is received after the first detection message corresponding to the management board card and the protection board card is sent, first prompt information is generated, exemplarily, the first prompt information can be selected as 'configuration cannot be completed', and a user can check the board cards according to the first prompt information.
S310, storing a first configuration file;
and S320, when the system is started again, performing board configuration by using the first configuration file.
And storing the first configuration file, and directly acquiring the first configuration file to perform board configuration when the device is restarted.
It should be noted that, when the device is restarted, the first configuration file may be directly used to configure the board card, but in the use of the device, the selected board card may change, for example, a situation is that the selected board card is no longer needed, for example, a user actively unplugs a selected board card, in this situation, the selected board card is lost, but the user wants the device to continue the board card configuration and ensure normal operation; there is also a case where a selected board has a fault, for example, a damaged board program or a board is not plugged, and in this case, the user wants to give a prompt message to check to avoid that an incorrect board configuration file is actually running. Therefore, in view of the above possible situations, when the device is started, the board configuration needs to be subjected to the "fool-proof process", specifically referring to fig. 3.
Fig. 3 is a flowchart of the method of step S320 in fig. 2, and referring to fig. 3, on the basis of the above scheme, optionally, the method includes:
and S321, when the system is started again, sending a second detection message corresponding to the second board card, wherein the second board card is any one of the selected board cards, and the second detection message is used for detecting whether the second board card exists or not until the detection message corresponding to the second board card is sent to each selected board card of the selected board cards.
Taking the configuration process of the microcomputer protection device in the first embodiment of the present invention as an example, the selected board cards of the microcomputer protection device are the management board card, the protection board card and the digital sampling board card 1. When the digital sampling board card 1 is started again, second detection messages corresponding to the management board card, the protection board card and the digital sampling board card 1 are sequentially sent to detect whether the management board card, the protection board card and the digital sampling board card 1 exist or not.
And S322, recording the information of the second board card to a second information table if the second feedback message is received.
The second information table records the board card information of the received second feedback message, that is, the information of the selected board card which is not lost and has not failed in the device.
And S323, comparing the information of the board card recorded in the second information table and the first information table, and if the comparison information is the same, normally completing configuration.
And comparing the information of the board cards recorded in the second information table and the first information table, namely, judging whether the selected board card which is missing or has a fault exists in the comparison device. If the comparison information is the same, the configuration is normally completed, and exemplarily, if none of the device boards is lost and no fault occurs, the corresponding second feedback messages can be received after the second detection messages corresponding to the management board, the protection board and the digital sampling board 1 are sent, so that the information of the management board, the protection board and the digital sampling board 1 is recorded in the second information table. In step S250, the first information table records the information of the management board card, the protection board card and the digital sampling board card 1, so that the information of the board cards recorded in the second information table and the first information table is the same, which indicates that none of the board cards of the device is missing and has no fault, and the configuration can be completed normally.
And S324, if the comparison information is different, suspending the configuration, and generating and displaying second prompt information.
If the comparison information is different, the selected board card is missing or has a fault, and the configuration is suspended.
And S325, recording information of a third board card in a third recording table, wherein the third board card is a board card which is recorded in the first information table and is lacked in the second information table.
For example, if a second feedback message is not received after sending a second detection message corresponding to the digital sampling board 1, that is, the second information recording table does not record the information of the digital sampling board 1, and the first recording table records the information of the digital sampling board 1, therefore, the third board is the digital sampling board 1, and after the second recording table is compared with the first recording table, the information of the digital sampling board 1 is recorded in the third information table.
And S326, generating and displaying second prompt information, wherein the second prompt information comprises information of the third board card.
And generating and displaying second prompt information, wherein the second prompt information comprises information of a third board card, namely information of the digital sampling board card 1, and exemplarily, generating and displaying that whether the digital sampling board card 1 is missing or not and continues to be configured.
And S327, if the third board card is determined not to be used any more, deleting the configuration information of the third board card in the first configuration file, and regenerating a second configuration file.
And S328, restarting and carrying out board configuration by using the second configuration file.
For example, if the digital sampling board 1 does not need to be reused and the user can perform a confirmation operation, the configuration information of the digital sampling board 1 in the first configuration file is deleted, the second configuration file is regenerated, and the board configuration is restarted and performed again by using the second configuration file.
If the digital sampling board card 1 is in fault and still needs to be used, the user can check the board card according to the prompt information, and determine the fault type of the digital sampling board card 1 so as to perform corresponding processing.
According to the embodiment of the invention, after the original configuration file is obtained, the first detection message corresponding to the first board card is sent, wherein the first board card is any one of the board cards to be selected, and whether the first board card exists or not can be detected; if the first feedback message is received, the first board card is indicated to exist, and the configuration information of the first board card in the original configuration file is reserved; and if the first feedback message is not received and the first board card is the selectable board card, deleting the configuration information of the first board card in the original configuration file and regenerating the first configuration file until the detection message corresponding to the first configuration file is sent to each board card to be selected in the plurality of board cards to be selected. The method provided by the embodiment of the invention can be applied to board card configuration of a plurality of microcomputer protection devices or board card configuration of other devices, and the board card configuration file suitable for each microcomputer protection device can be obtained by obtaining the original configuration file, so that a large amount of repeated work caused by that developers generate the board card configuration file for each microcomputer protection device independently is avoided, the number of filing versions of the device is greatly reduced, the labor cost is reduced, and the efficiency is improved. In addition, the embodiment of the invention also provides a method for performing fool-proof processing on the board configuration, so that the wrong board configuration information is prevented from running in an actual device, the reliability of the board configuration is improved, the labor cost is further reduced, and the efficiency is improved.
EXAMPLE III
Fig. 4 is a schematic structural diagram of a board configuration device according to a third embodiment of the present invention, which is applicable to a board configuration situation. The board configuration device provided by the embodiment of the invention can execute the board configuration method provided by any embodiment, and has the corresponding functional modules and beneficial effects of the execution method. Referring to fig. 4, the apparatus includes an original profile obtaining module 410, a first probe packet sending module 420, and a first profile updating module 430.
The original configuration file obtaining module 410 is configured to obtain an original configuration file when the initial startup is performed, where the original configuration file includes configuration information of a plurality of boards to be selected, and the boards to be selected are divided into boards to be selected and optional boards;
the first detection message sending module 420 is configured to send a first detection message corresponding to a first board card, where the first board card is any one of the board cards to be selected, and the first detection message is used to detect whether the first board card exists until the detection message corresponding to the first detection message is sent to each of the board cards to be selected;
the first configuration file updating module 430 is configured to, if a first feedback message is received, retain configuration information of the first board card in the original configuration file, where the first feedback message is used to indicate that the first board card exists; and if the first feedback message is not received and the first board card is the selectable board card, deleting the configuration information of the first board card in the original configuration file and regenerating a first configuration file, wherein the first configuration file comprises the configuration information of at least one selected board card.
Optionally, the first configuration file updating module 430 is further configured to generate a first prompt message if the first feedback message is not received and the first board card is a board card that needs to be selected, where the first prompt message is used to indicate that the configuration fails.
Optionally, the first configuration file updating module 430 includes a first recording unit 431, and the first recording unit 431 is configured to record the information of the first board to the first information table after the configuration information of the first board in the original configuration file is reserved.
Optionally, the board configuration apparatus includes a first storage module 440 and a configuration module 450. The first storage module 440 is configured to store a first configuration file, and the configuration module 450 is configured to perform board configuration by using the first configuration file when the system is restarted.
Optionally, the configuration module 450 includes a second detection packet sending unit 451, a second recording unit 452, and a comparing unit 453. The second detection message sending unit 451 is configured to send a second detection message corresponding to a second board card when the second board card is restarted, where the second board card is any one of the selected board cards, and the second detection message is used to detect whether the second board card exists, until the detection message corresponding to the second board card is sent to each of the selected board cards; the second recording unit 452 is configured to record information of the second board card to the second information table if the second feedback message is received; the comparison unit 453 is configured to compare the second information table with the board information recorded in the first information table, and if the comparison information is the same, the configuration is normally completed, and if the comparison information is different, the configuration is suspended, and the second prompt information is generated and displayed.
Optionally, the configuration module 450 further includes a third recording unit 454 and a display unit 455. The third recording unit 454 is configured to record information of a third board card in a third recording table, where the third board card is a board card that is recorded in the first information table and is absent from the second information table; the display unit 455 is configured to display information of the third board.
Optionally, the configuration module 450 further includes a second configuration file updating unit 456 and a first configuration unit 457. The second configuration file updating unit 456 is configured to delete the configuration information of the third board card in the first configuration file and regenerate the second configuration file if it is determined that the third board card is no longer used; the first configuration unit 457 is configured to restart and perform board configuration using the second configuration file.
According to the embodiment of the invention, after the original configuration file is obtained, the first detection message corresponding to the first board card is sent, wherein the first board card is any one board card in the board cards to be selected, and whether the first board card exists or not can be detected; if the first feedback message is received, the first board card is indicated to exist, and the configuration information of the first board card in the original configuration file is reserved; and if the first feedback message is not received and the first board card is the selectable board card, deleting the configuration information of the first board card in the original configuration file and regenerating the first configuration file until the detection message corresponding to the first configuration file is sent to each board card to be selected in the plurality of board cards to be selected. The method provided by the embodiment of the invention can be applied to board card configuration of a plurality of microcomputer protection devices or board card configuration of other devices, and the board card configuration file suitable for each microcomputer protection device can be obtained by obtaining the original configuration file, so that a large amount of repeated work caused by that developers generate the board card configuration file for each microcomputer protection device independently is avoided, the number of filing versions of the device is greatly reduced, the labor cost is reduced, and the efficiency is improved.
Example four
Fig. 5 is a schematic structural diagram of a server according to a fourth embodiment of the present invention. FIG. 5 illustrates a block diagram of an exemplary server 512 suitable for use in implementing embodiments of the present invention. The server 512 shown in fig. 5 is only an example and should not bring any limitations to the function and scope of the use of the embodiments of the present invention.
As shown in FIG. 5, the server 512 is in the form of a general purpose server. Components of server 512 may include, but are not limited to: one or more processors 516, a storage device 528, and a bus 518 that couples the various system components including the storage device 528 and the processors 516.
Bus 518 represents one or more of any of several types of bus structures, including a memory device bus or memory device controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
The server 512 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by server 512 and includes both volatile and nonvolatile media, removable and non-removable media.
Storage 528 may include computer system readable media in the form of volatile Memory, such as Random Access Memory (RAM) 530 and/or cache Memory 532. The server 512 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 535 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk such as a Compact disk Read-Only Memory (CD-ROM), Digital Video disk Read-Only Memory (DVD-ROM) or other optical media may be provided. In these cases, each drive may be connected to bus 518 through one or more data media interfaces. Storage 528 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 550 having a set (at least one) of program modules 552 may be stored, for instance, in storage 528, such program modules 552 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may include an implementation of a network environment. The program modules 552 generally perform the functions and/or methodologies of the described embodiments of the invention.
The server 512 may also communicate with one or more external devices 515 (e.g., keyboard, pointing terminal, display 525, etc.), with one or more terminals that enable a user to interact with the server 512, and/or with any terminals (e.g., network card, modem, etc.) that enable the server 512 to communicate with one or more other computing terminals. Such communication may occur via input/output (I/O) interfaces 522. Further, server 512 may communicate with one or more networks (e.g., a Local Area Network (LAN), Wide Area Network (WAN), and/or a public Network such as the Internet) via Network adapter 520. As shown in FIG. 5, the network adapter 520 communicates with the other modules of the server 512 via the bus 518. It should be appreciated that although not shown, other hardware and/or software modules may be used in conjunction with the server 512, including but not limited to: microcode, end drives, Redundant processors, external disk drive Arrays, RAID (Redundant Arrays of Independent Disks) systems, tape drives, and data backup storage systems, among others.
The processor 516 executes various functional applications and data processing by running the program stored in the storage device 528, for example, implementing the board configuration method provided by the embodiment of the present invention, the method includes:
when the system is started for the first time, acquiring an original configuration file, wherein the original configuration file comprises configuration information of a plurality of board cards to be selected, and the board cards to be selected are divided into necessary board cards and optional board cards;
sending a first detection message corresponding to a first board card, wherein the first board card is any one of board cards to be selected, and the first detection message is used for detecting whether the first board card exists or not until the detection message corresponding to the first detection message is sent to each of the board cards to be selected;
if the first feedback message is received, the configuration information of the first board card in the original configuration file is reserved, wherein the first feedback message is used for indicating the existence of the first board card;
and if the first feedback message is not received and the first board card is the selectable board card, deleting the configuration information of the first board card in the original configuration file and regenerating a first configuration file, wherein the first configuration file comprises the configuration information of at least one selected board card.
EXAMPLE five
The fifth embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the method for configuring a board card provided in the fifth embodiment of the present invention is implemented, where the method includes:
when the system is started for the first time, acquiring an original configuration file, wherein the original configuration file comprises configuration information of a plurality of board cards to be selected, and the board cards to be selected are divided into necessary board cards and optional board cards;
sending a first detection message corresponding to a first board card, wherein the first board card is any one of board cards to be selected, and the first detection message is used for detecting whether the first board card exists or not until the detection message corresponding to the first detection message is sent to each of the board cards to be selected;
if the first feedback message is received, the configuration information of the first board card in the original configuration file is reserved, wherein the first feedback message is used for indicating the existence of the first board card;
and if the first feedback message is not received and the first board card is the selectable board card, deleting the configuration information of the first board card in the original configuration file and regenerating a first configuration file, wherein the first configuration file comprises the configuration information of at least one selected board card.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, or the like, as well as conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or terminal. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (12)

1. A method of configuring a card, comprising:
when the system is started for the first time, acquiring an original configuration file, wherein the original configuration file comprises configuration information of a plurality of board cards to be selected, and the board cards to be selected are divided into necessary board cards and optional board cards;
sending a first detection message corresponding to a first board card, wherein the first board card is any one of the board cards to be selected, and the first detection message is used for detecting whether the first board card exists or not until the detection message corresponding to the first detection message is sent to each of the board cards to be selected;
if a first feedback message is received, retaining the configuration information of the first board card in the original configuration file, wherein the first feedback message is used for indicating the existence of the first board card;
if the first feedback message is not received and the first board card is a selectable board card, deleting the configuration information of the first board card in the original configuration file and regenerating a first configuration file, wherein the first configuration file comprises the configuration information of at least one selected board card;
after the configuration information of the first board card in the original configuration file is retained, the method further includes:
recording the information of the first board card to a first information table;
when the power is on again, the first configuration file is used for carrying out board card configuration, and the method comprises the following steps:
when the system is started again, sending a second detection message corresponding to a second board card, wherein the second board card is any one board card in the selected board cards, and the second detection message is used for detecting whether the second board card exists or not until the detection message corresponding to the second board card is sent to each selected board card in the selected board cards;
if a second feedback message is received, recording the information of the second board card to a second information table;
and comparing the information of the board card recorded in the second information table and the first information table, if the comparison information is the same, normally completing configuration, and if the comparison information is different, suspending configuration, and generating and displaying second prompt information.
2. The board configuration method according to claim 1, further comprising:
and if the first feedback message is not received and the first board card is a necessary board card, generating first prompt information, wherein the first prompt information is used for indicating configuration failure.
3. The board configuration method according to claim 1, further comprising, after deleting the configuration information of the first board in the original configuration file and regenerating the first configuration file:
storing the first configuration file.
4. The board configuration method according to claim 1, wherein if the comparison information is different, the configuration is suspended, and second prompt information is generated and displayed, including:
if the comparison information is different, the configuration is suspended;
recording information of a third board card in a third recording table, wherein the third board card is a board card recorded in the first information table and lacking in the second information table;
and generating and displaying second prompt information, wherein the second prompt information comprises the information of the third board card.
5. The board configuration method according to claim 4, further comprising, after displaying the information of the third board:
if the third board card is determined not to be used any more, deleting the configuration information of the third board card in the first configuration file, and regenerating a second configuration file;
restarting and using the second configuration file to configure the board card.
6. A card configuration device, comprising:
the system comprises an original configuration file acquisition module, a configuration file selection module and a configuration file selection module, wherein the original configuration file acquisition module is used for acquiring an original configuration file when the original configuration file is started for the first time, the original configuration file comprises configuration information of a plurality of board cards to be selected, and the board cards to be selected are divided into necessary board cards and optional board cards;
the first detection message sending module is used for sending a first detection message corresponding to a first board card, wherein the first board card is any one board card in the board cards to be selected, and the first detection message is used for detecting whether the first board card exists or not until the detection message corresponding to the first detection message is sent to each board card to be selected in the board cards to be selected;
a first configuration file updating module, configured to, if a first feedback message is received, retain configuration information of the first board card in the original configuration file, where the first feedback message is used to indicate that the first board card exists; if the first feedback message is not received and the first board card is a selectable board card, deleting the configuration information of the first board card in the original configuration file and regenerating a first configuration file, wherein the first configuration file comprises the configuration information of at least one selected board card;
the first profile update module comprises:
a first recording unit, configured to record information of the first board card to a first information table after the configuration information of the first board card in the original configuration file is reserved;
the configuration module is used for carrying out board card configuration by using the first configuration file when the system is restarted;
the configuration module includes:
a second detection message sending unit, configured to send a second detection message corresponding to a second board card when the second board card is restarted, where the second board card is any one of the selected board cards, and the second detection message is used to detect whether the second board card exists, until the second detection message corresponding to the second detection message is sent to each of the selected board cards;
the second recording unit is used for recording the information of the second board card to a second information table if a second feedback message is received;
and the comparison unit is used for comparing the information of the board card recorded in the second information table and the first information table, normally completing configuration if the comparison information is the same, and suspending configuration if the comparison information is different, and generating and displaying second prompt information.
7. The board configuration device according to claim 6, wherein the first configuration file update module is further configured to generate a first prompt message if the first feedback packet is not received and the first board is a board that needs to be selected, where the first prompt message is used to indicate that the configuration fails.
8. The board card configuration device according to claim 6, further comprising:
and the first storage module is used for storing the first configuration file.
9. The board configuration device according to claim 6, wherein the configuration module further comprises:
a third recording unit, configured to record information of a third board in a third record table, where the third board is a board that is recorded in the first information table and is absent from the second information table;
and the display unit is used for generating and displaying second prompt information, and the second prompt information comprises the information of the third board card.
10. The board card configuration device according to claim 9, wherein the configuration module further comprises:
a second configuration file updating unit, configured to delete the configuration information of the third board card in the first configuration file and regenerate a second configuration file if it is determined that the third board card is no longer used;
and the first configuration unit is used for restarting and using the second configuration file to configure the board card.
11. A server, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, the one or more programs cause the one or more processors to implement the board configuration method of any of claims 1-5.
12. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the board configuration method according to any one of claims 1 to 5.
CN201810634811.5A 2018-06-20 2018-06-20 Board card configuration method, device, server and storage medium Active CN108874441B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810634811.5A CN108874441B (en) 2018-06-20 2018-06-20 Board card configuration method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810634811.5A CN108874441B (en) 2018-06-20 2018-06-20 Board card configuration method, device, server and storage medium

Publications (2)

Publication Number Publication Date
CN108874441A CN108874441A (en) 2018-11-23
CN108874441B true CN108874441B (en) 2022-08-09

Family

ID=64339830

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810634811.5A Active CN108874441B (en) 2018-06-20 2018-06-20 Board card configuration method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN108874441B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109918230B (en) * 2019-02-20 2021-01-26 杭州迪普科技股份有限公司 Method and system for recovering abnormity of service board card
CN110750405B (en) * 2019-10-28 2023-06-30 天津津航计算技术研究所 Software compatibility method based on hardware board card identification
CN111064747B (en) * 2019-12-30 2022-07-08 奇安信科技集团股份有限公司 Information processing method and system, server, electronic device, medium, and product
CN116820863A (en) * 2023-07-10 2023-09-29 北京鲲鹏凌昊智能技术有限公司 Cascade test method, cascade test device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012028013A1 (en) * 2010-09-01 2012-03-08 中兴通讯股份有限公司 Implementing method for main/standby configuration of board cards, and board card
CN104811400A (en) * 2014-01-26 2015-07-29 杭州迪普科技有限公司 Distributed network apparatus
CN107357619A (en) * 2017-07-07 2017-11-17 广州视源电子科技股份有限公司 A kind of generation method, device, equipment and the storage medium of board configuration file

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012028013A1 (en) * 2010-09-01 2012-03-08 中兴通讯股份有限公司 Implementing method for main/standby configuration of board cards, and board card
CN104811400A (en) * 2014-01-26 2015-07-29 杭州迪普科技有限公司 Distributed network apparatus
CN107357619A (en) * 2017-07-07 2017-11-17 广州视源电子科技股份有限公司 A kind of generation method, device, equipment and the storage medium of board configuration file

Also Published As

Publication number Publication date
CN108874441A (en) 2018-11-23

Similar Documents

Publication Publication Date Title
CN108874441B (en) Board card configuration method, device, server and storage medium
CN110764945A (en) Crash log processing method, device, equipment and storage medium
US8448138B2 (en) Recording user-driven events within a computing system
CN109388622B (en) Log information processing method, device and equipment and readable storage medium
CN110990411B (en) Data structure generation method and device, and calling method and device
CN109783345B (en) Method and system for testing small program performance
CN110727597A (en) Method for completing use case based on log troubleshooting invalid codes
CN110659210A (en) Information acquisition method and device, electronic equipment and storage medium
US10514972B2 (en) Embedding forensic and triage data in memory dumps
CN111930703A (en) Automatic log file capturing method and device and computer equipment
CN111694684B (en) Abnormal construction method and device of storage device, electronic device and storage medium
CN113384896A (en) Unity-based resource packaging method, device, equipment and medium
CN113672306B (en) Server component self-checking abnormity recovery method, device, system and medium
CN110881224B (en) Network long connection method, device, equipment and storage medium
CN113160726B (en) Power-on self-detection method and power-on self-detection device
CN113342431B (en) Function call stack backtracking and program exception handling method, device, equipment and medium
CN109918231B (en) Data reforming abnormity repairing method, device, equipment and storage medium
CN114968644A (en) System software dump method and device, electronic equipment and readable storage medium
CN114138367A (en) Service implementation method, device, equipment and storage medium on self-service equipment
CN108509252B (en) Virtual machine starting device and method and host
CN113656301A (en) Interface testing method, device, equipment and storage medium
CN112925796A (en) Write consistency control method, device, equipment and storage medium
CN113760631A (en) Page loading duration determination method, device, equipment and storage medium
CN109426589B (en) File repair method and device
CN112114811A (en) Compiling method, device and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant