CN116627861B - Data processing method and system based on expander, electronic equipment and storage medium - Google Patents

Data processing method and system based on expander, electronic equipment and storage medium Download PDF

Info

Publication number
CN116627861B
CN116627861B CN202310915410.8A CN202310915410A CN116627861B CN 116627861 B CN116627861 B CN 116627861B CN 202310915410 A CN202310915410 A CN 202310915410A CN 116627861 B CN116627861 B CN 116627861B
Authority
CN
China
Prior art keywords
information
target
data
expander
register
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
CN202310915410.8A
Other languages
Chinese (zh)
Other versions
CN116627861A (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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202310915410.8A priority Critical patent/CN116627861B/en
Publication of CN116627861A publication Critical patent/CN116627861A/en
Application granted granted Critical
Publication of CN116627861B publication Critical patent/CN116627861B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • G06F13/102Program control for peripheral devices where the programme performs an interfacing function, e.g. device driver
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04842Selection of displayed objects or displayed text elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Computer Security & Cryptography (AREA)
  • Digital Computer Display Output (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a data processing method, a system, electronic equipment and a storage medium based on an expander, and relates to the technical field of data interaction, wherein the method comprises the following steps: acquiring first input information, wherein the first input information comprises operation information for determining target physical port information and target interactive function information of a target expander; responding to the first input information, acquiring corresponding target register address information according to target physical port information, and generating data interaction instruction information according to the target register address information and target interaction function information; and sending the data interaction instruction information to the target expander to obtain a data interaction processing result, wherein the data interaction processing result is obtained after the target expander executes data interaction processing corresponding to the target interaction function information on target register data, and the target register data is register data corresponding to the target register address information in the target expander. The invention improves the efficiency of the data processing process.

Description

Data processing method and system based on expander, electronic equipment and storage medium
Technical Field
The present invention relates to the field of data interaction technologies, and in particular, to a data processing method, system, electronic device, and storage medium based on an expander.
Background
In a storage system, an Expander (Expander) is used to expand the components connected between storage devices and provide additional ports and bandwidth, e.g., a hard disk drive is typically connected to a host or storage controller through a serial SCSI interface (Serial Attached SCSI, SAS for short), the Expander allowing multiple storage devices to be connected to a single host or storage controller while providing more connectivity and availability through the number of expanded SAS ports.
The expansion of SAS ports is achieved by the expander, and the expansion can be achieved to 36/48/64, so that a plurality of Physical (PHY) ports are corresponding, each PHY port has independent register configuration space (including a physical layer register and a link layer register) for physically transmitting data, and Input/Output (IO) service is processed, so that each PHY port may correspond to hundreds of registers.
Since the expander runs tens of independent PHY links, each with hundreds of independent registers, this large amount of information cannot be fully logged. Corresponding register information is queried or processed through related instructions, and one instruction is input at a time, so that corresponding information is queried or corresponding PHY functions are realized. However, for querying or processing multiple register information, tens or even hundreds of instructions need to be entered, resulting in the inefficiency of the data processing process of existing expanders. Therefore, there is a need for a data processing method, system, electronic device and storage medium based on expanders to solve the above problems.
Disclosure of Invention
Aiming at the problems existing in the prior art, the invention provides a data processing method, a system, electronic equipment and a storage medium based on an expander.
The invention provides a data processing method based on an expander, which is applied to a user terminal and comprises the following steps:
acquiring first input information, wherein the first input information comprises operation information for determining target physical port information and target interactive function information of a target expander;
responding to the first input information, acquiring corresponding target register address information according to the target physical port information, and generating data interaction instruction information according to the target register address information and the target interaction function information;
and sending the data interaction instruction information to the target expander to obtain a data interaction processing result, wherein the data interaction processing result is obtained after the target expander executes data interaction processing corresponding to the target interaction function information on target register data, and the target register data is register data corresponding to the target register address information in the target expander.
According to the data processing method based on the expander, the first input information is obtained, and the method comprises the following steps:
Acquiring the state information of the hook items on a table display interface of the user side, wherein the table display interface comprises a physical port option and an interactive function option;
determining the target physical port information according to the hook item state information corresponding to the physical port option;
determining the target interactive function information according to the hook item state information corresponding to the interactive function option;
and acquiring the first input information according to the target physical port information and the target interactive function information.
According to the data processing method based on the expander provided by the invention, before the acquiring of the hook item state information on the form display interface of the user side, the method further comprises the following steps:
acquiring configuration file information of the target expander;
analyzing the configuration file information to obtain mapping relations between each physical port and register addresses in the target expander and register instruction type information corresponding to each physical port, wherein each register instruction type information corresponds to different physical port instruction control functions;
based on the mapping relation, generating the table display interface according to the port numbers of the physical ports and the register instruction type information;
The responding to the first input information, according to the target physical port information, obtaining the corresponding target register address information, includes:
and determining the address information of the target register corresponding to the target physical port information according to the mapping relation.
According to the data processing method based on the expander, the target interaction function information comprises inquiry function interaction information and control function interaction information;
the generating data interaction instruction information according to the target register address information and the target interaction function information includes:
if the target interactive function information is the query function interactive information, generating a query command prompt and determining first data type information, wherein the first data type information is the data type information of register data to be queried;
generating the data interaction instruction information according to a target mapping relation and the first data type information based on the inquiry command prompt, so as to inquire register data in the target expander through the data interaction instruction information; the target mapping relationship is a mapping relationship between the target physical port information and the target register address information.
According to the data processing method based on the expander, the analyzing the configuration file information further comprises the following steps:
acquiring the corresponding relation between each physical port and an expansion slot in the target expander;
the method further comprises the steps of:
determining a fault expansion slot in the target expander according to the slot fault information;
and acquiring a physical port corresponding to the fault expansion slot based on the corresponding relation, so as to query register data through the physical port corresponding to the fault expansion slot and the mapping relation.
According to the data processing method based on the expander, according to the address information of the target register and the target interactive function information, data interactive instruction information is generated, and the method further comprises the following steps:
if the target interaction function information is the control function interaction information, generating the inquiry command prompt and the control command prompt, and determining second data type information, wherein the second data type information is the data type information of register data to be subjected to data writing;
based on the inquiry command prompt, acquiring all register instruction type information and current parameter values corresponding to the register data to be subjected to data writing according to the target mapping relation and the second data type information;
Determining target register instruction type information or a target parameter modification value according to the control function interaction information, wherein the target parameter modification value is used for modifying the current parameter value;
and generating the data interaction instruction information according to the target register instruction type information or the target parameter modification value, the target mapping relation and the second data type information based on the control command prompt.
According to the data processing method based on the expander, after the configuration file information of the target expander is obtained, the method further comprises the following steps:
determining a target transmission port type according to the type of the hardware equipment correspondingly connected with the target expander, wherein the target transmission port type at least comprises a serial port type, a parallel port type and a network port type;
and generating corresponding transmission port switching prompt information according to the type of the target transmission port so as to display the corresponding transmission port switching prompt information through a display terminal of the user terminal.
According to the data processing method based on the expander, the interaction function options comprise a physical port initialization state information interaction option, a register address information interaction option, an input and output information interaction option, physical control function interaction information and a case management information interaction option.
The invention also provides a data processing method based on the expander, which is applied to the expander and comprises the following steps:
acquiring data interaction instruction information sent by a user side, wherein the data interaction instruction information comprises target register address information and target interaction function information; the target register address information is obtained by the user side according to a target mapping relation and target physical port information; the target mapping relationship is a mapping relationship between each physical port and a register address in the expander, which is obtained after the user side analyzes the configuration file information of the expander;
and carrying out data interaction processing corresponding to the target interaction function information on the target register data, and sending the obtained data interaction processing result to the user side, wherein the target register data is register data corresponding to the target register address information in the expander.
According to the data processing method based on the expander provided by the invention, the data interaction instruction information sent by the user side is obtained, and the method comprises the following steps:
based on a port driving layer, receiving instruction data sent by the user side in an interrupt mode;
And carrying out integrity detection on the received instruction data, and if the received complete data is determined, acquiring the data interaction instruction information.
According to the data processing method based on the expander, the data interaction processing corresponding to the target interaction function information is performed on the target register data, and the data processing method comprises the following steps:
analyzing the data interaction instruction information based on an instruction execution layer, and acquiring register data to be queried according to the target register address information and first data type information if a command prompt obtained through analysis is a query command prompt, wherein the first data type information is data type information of the register data to be queried;
and sending the register data to be queried to the user side.
According to the data processing method based on the expander, the method further comprises the following steps:
if the command prompt obtained through analysis is a control command prompt, determining register data to be subjected to data writing according to the target register address information and second data type information, wherein the second data type information is the data type information of the register data to be subjected to data writing;
After the register data to be subjected to data writing is sent to the user side, acquiring target register instruction type information or a target parameter modification value, wherein the target register instruction type information corresponds to a physical port instruction control function; the target parameter modification value is used for modifying the current parameter value of the register data to be subjected to data writing;
executing a corresponding physical port instruction control function according to the target register instruction type information to obtain a physical port instruction control result; or modifying the current parameter value in the register data to be subjected to data writing according to the target parameter modification value to obtain a parameter modification result;
and returning the physical port instruction control result or the parameter modification result to the user side.
According to the data processing method based on the expander provided by the invention, before the data interaction instruction information sent by the user side is obtained, the method further comprises the following steps:
receiving second input information, wherein the second input information comprises operation information for inquiring configuration file information of the expander;
and transmitting configuration file information to the user side in response to the second input information, wherein the configuration file information comprises mapping relations between each physical port and register addresses in the expander and register instruction type information corresponding to each physical port, and each register instruction type information corresponds to different physical port instruction control functions.
According to the data processing method based on the expander, the method further comprises the following steps:
acquiring hardware equipment type information of connected equipment;
and sending the hardware equipment type information to the user side so that the user side can establish connection between a target transmission port and the expander according to the hardware equipment type information, wherein the target transmission port at least comprises a serial port, a parallel port and a network port.
According to the data processing method based on the expander, the method further comprises the following steps:
and matching the target register instruction type information through a preset instruction model, and executing the data interaction instruction information if the target register instruction type information is successfully matched with a preset physical port instruction control function in the preset instruction model, wherein the expander is arranged in the preset instruction model and can execute a plurality of preset physical port instruction control functions.
The invention also provides a data processing system based on the expander, which is applied to the user side and comprises:
the interaction module is used for acquiring first input information, wherein the first input information comprises operation information for determining target physical port information and target interaction function information of a target expander;
The processing module is used for responding to the first input information, acquiring corresponding target register address information according to the target physical port information, and generating data interaction instruction information according to the target register address information and the target interaction function information;
the debugging module is used for sending the data interaction instruction information to the target expander to obtain a data interaction processing result, wherein the data interaction processing result is obtained after the target expander executes data interaction processing corresponding to the target interaction function information on target register data, and the target register data is register data corresponding to the target register address information in the target expander.
According to the invention, the data processing system based on the expander comprises:
the display interface input unit is used for acquiring the state information of the hook items on the form display interface of the user side, wherein the form display interface comprises a physical port option and an interactive function option;
the port information processing unit is used for determining the target physical port information according to the hook item state information corresponding to the physical port option;
The function information processing unit is used for determining the target interactive function information according to the hook item state information corresponding to the interactive function option;
and the input information generating unit is used for acquiring the first input information according to the target physical port information and the target interactive function information.
The invention also provides a data processing system based on the expander, which is applied to the expander and comprises:
the port driving module is used for acquiring data interaction instruction information sent by the user side, wherein the data interaction instruction information comprises target register address information and target interaction function information; the target register address information is obtained by the user side according to a target mapping relation and target physical port information; the target mapping relationship is a mapping relationship between each physical port and a register address in the expander, which is obtained after the user side analyzes the configuration file information of the expander;
and the instruction execution module is used for carrying out data interaction processing corresponding to the target interaction function information on the target register data and sending the obtained data interaction processing result to the user terminal, wherein the target register data is register data corresponding to the target register address information in the expander.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the expander-based data processing method as described in any of the above when executing the program.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements an expander-based data processing method as described in any of the above.
According to the expander-based data processing method, system, electronic equipment and storage medium, the mapping relation between the PHY ports and the register addresses established in the early stage can be used for quickly inquiring the total information of the registers corresponding to each PHY port in the expander, so that dynamic control of single or multiple PHY ports is realized, and the efficiency of a data processing process is improved.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the invention, and other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of an expander-based data processing method according to the present invention;
FIG. 2 is a second flow chart of the expander-based data processing method according to the present invention;
FIG. 3 is a schematic diagram of an instruction object based on an expander according to the present invention;
FIG. 4 is a flowchart showing the overall expander-based instruction interaction provided by the present invention;
FIG. 5 is a schematic diagram of an expander-based data processing system according to the present invention;
FIG. 6 is a second schematic diagram of an expander-based data processing system according to the present invention;
fig. 7 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The storage system processes mass data transmitted between the server and the hard disk with high reliability and high speed as requirements, and for a system interface, a central processing unit (Central Processing Unit, CPU for short) is externally provided with a high-speed serial computer expansion bus standard (Peripheral Component Interconnect Express, PCIE for short) interface when processing service data, and the hard disk device is generally provided with an SAS interface, so that the PCIE interface is usually converted into the SAS interface and is butted to each hard disk by an expander to ensure IO communication between the storage system and each hard disk; in addition, the expander can also realize a chassis management function, and can detect the states of various hardware in the chassis in real time to determine whether fault abnormality occurs.
In the development process, a corresponding interaction interface is provided through the expander, so that the following operation is performed on each PHY port: initialization configuration, opening or closing, inquiry of various status registers, debugging configuration parameters, control register configuration, fault injection test and the like. In the maintenance process, when the hard disk fails, the state of the register is checked through the expander, so that the failure cause is judged.
Existing expanders typically run tens of independent PHY links with hundreds of independent registers per PHY link. When hard disk failure occurs and the link state needs to be checked, each PHY link has more than ten registers such as Change count, invalid DWORDs, diversity Errors, dowrd Sync lost, etc., more than 360 registers for an expander with 36 PHY links, and more than 680 registers for an expander with 68 PHY links. According to the existing log record and instruction query mode, query instructions need to be executed one by one, on one hand, a user needs to know specific instructions, and on the other hand, the user needs to interact many times. For such a large amount of information, the information cannot be recorded in the log, and when development, debugging and fault positioning are performed in the prior art, a large amount of instructions need to be manually input according to data processing requirements (such as inquiring certain register data or modifying parameters of the register data), so that the efficiency is low, and the development, the debugging and the fault positioning are not facilitated.
Fig. 1 is a schematic flow chart of an expander-based data processing method provided by the present invention, and as shown in fig. 1, the present invention provides an expander-based data processing method, applied to a user terminal, including:
step 101, obtaining first input information, wherein the first input information comprises operation information for determining target physical port information and target interactive function information of a target expander.
In the invention, corresponding expander information inquiry and control options are provided for a user on a display terminal of a user terminal (such as an operation platform of a server terminal), the content of the checked options is further converted into an interactive instruction, the interactive instruction is sent to the expander, the expander executes corresponding data processing processes (such as data inquiry and parameter modification) according to the interactive instruction, and the expander returns the processing result to the user terminal.
Specifically, on the basis of the foregoing embodiment, the acquiring the first input information includes:
acquiring the state information of the hook items on a table display interface of the user side, wherein the table display interface comprises a physical port option and an interactive function option;
determining the target physical port information according to the hook item state information corresponding to the physical port option;
Determining the target interactive function information according to the hook item state information corresponding to the interactive function option;
and acquiring the first input information according to the target physical port information and the target interactive function information.
In the invention, a visualization tool is developed through a user side, so that a method for inquiring and controlling expander information is provided for a user. Specifically, in the tool, the communication ports (such as serial ports, parallel ports and network ports) are utilized to interact with the expander, so that information required by a user, namely option information checked by the user on an operation interface of the visualization tool, is converted into batch interaction instructions, the receiving and sending of the instructions are automatically completed, and the execution result on one side of the expander is visually displayed. In the invention, the extender receives the interactive instruction, executes the interactive instruction in an instruction mode and returns a corresponding result.
In the invention, the visualization tool forms various interactive interfaces and instructions according to the design, development and maintenance stages and aiming at related information (such as expander model information, register address information, register function types and the like) acquired by different types of expanders, so that the user side can utilize a communication port to interact with the expander to automatically convert the operation of the user on the visualization tool into the query instruction or the control instruction of each PHY_ID, thereby saving the batch instruction execution of the user, greatly displaying and greatly improving the data processing efficiency aiming at the development, debugging and product maintenance stages.
In the invention, a user side forms a table display interface of a two-dimensional array table through a visualization tool. In an embodiment, if the interactive function is a query function, that is, the PHY port number to be queried at this time in the table display interface is checked on the visualization tool at the user side, after the expander returns the query information, a corresponding query task is obtained and displayed on the table display interface, where the transverse direction in the table display interface is various PHY information, and the ID of each PHY port is longitudinally corresponding. In another embodiment, if the interactive function is a control function, PHY port numbers to be queried at this time in the table display interface are checked on the visualization tool at the user side, and meanwhile, the visualization tool also provides control function options corresponding to each PHY port number on the table display interface according to register control functions of different types of expanders, so that after any option is checked, an instruction identifiable by the expanders can be automatically cleared, and corresponding control functions are further realized through register data corresponding to the PHY ports. Specifically, the interactive function options include PHY port initialization status information interactive options, register address information interactive options, input/output information interactive options, physical control function interactive information and chassis management information interactive options, which can be set correspondingly on the form display interface according to the query and control requirements.
In the invention, the visual tool provides a convenient operation mode for a user, only information on the interface is needed to be clicked, the tool is used for escaping into batch instructions interacted with the expander, a plurality of instructions can be sent simultaneously, the number of the instructions is equal to the number of PHYs, the result can be displayed according to the PHY port structure, and the user experience is improved while the data processing efficiency is improved.
Step 102, responding to the first input information, obtaining corresponding target register address information according to the target physical port information, and generating data interaction instruction information according to the target register address information and the target interaction function information.
In an embodiment, a "read" button is selected on a table display interface through a visualization tool at the user side, and each "read" button corresponds to one PHY port ID, that is, register data of a PHY port to be currently queried can be selected through the user side, and then the read operation is converted into a query instruction sent to the expander; when a plurality of ports are inquired, the instructions which are referred to as each PHY port ID are sent one by one through a batch sending instruction so as to inquire the register information corresponding to each PHY port ID. In the invention, corresponding options can be set on the table display interface according to the data type information of the data to be queried, for example, the options are set as query register instruction information options, and after the options are checked, the expander feeds back the corresponding register instruction query result according to the received query instruction.
In another embodiment, a "write" button is selected on the form display interface by a visualization tool at the user side; meanwhile, a plurality of control information options (generated based on functions which can be realized by different types of expanders) are transversely displayed on the table display interface, and then each control information option on the table display interface is checked according to different control requirements. In this embodiment, each control information option corresponds to a Command Prompt (CMD) of a different class, so that a user can conveniently select a corresponding control manner, for example, initialization configuration of each PHY port, reading and writing of a physical layer register, reading and writing of a link layer register, reading and writing of chassis management information, and the like, so as to escape currently-selected option information into a control instruction sent to the expander. Table 1 is a table content of a table display interface for controlling the enabling and signal flipping of PHY ports, and reference may be made to table 1 as follows:
TABLE 1
In table 1, if R/W is checked, it indicates that the corresponding PHY port needs to perform a corresponding read/write operation, after determining that PHY ports 1 to 4 are checked, further determining, according to checked control information options, that the corresponding control function that the expander is required to implement at this time, for example, "PHY Enable" and "RX Swap" options of PHY ports 1 to 3 are checked, the expander receives a corresponding control instruction, further sets PHY ports 1 to 3, enables the first 3 PHYs, and meanwhile performs RX (receive) signal inversion on the 3 PHYs; accordingly, the "PHY Enable" and "TX Swap" options of the PHY port 4 are checked, and the expander receives the corresponding control instruction, so as to set the PHY port 4, enable the PHY port 4, and simultaneously perform TX (output) signal flipping on the PHY port 4.
In this embodiment, according to the interactive function information, corresponding register data is first queried, the queried register data is displayed on the table display interface, and a modification function is provided on the table display interface, so that parameter modification is performed on the register data corresponding to different PHY ports. Preferably, in this embodiment, for the register control function of different PHY ports, corresponding parameter function options may be directly displayed on the table display interface, that is, corresponding parameter setting values are directly filled in the options, without the need for the user to reset the whole register instruction, for example, in oscilloscope measurement, bit ranges of different registers correspond to different functions, and on the table display interface, parameter setting values of each function option correspond to bit ranges, so that when parameter modification is performed, only parameters of corresponding bit ranges are modified, and signal quality under a large number of parameters can be obtained in a short time. Table 2 is a table content of a table display interface for output signal debugging, and can be referred to as table 2:
TABLE 2
In table 2, according to the checked read-write options, it is determined that the parameter values corresponding to PHY1 to PHY4 need to be modified (specific values may be actually filled in), and then according to the filled parameter modification values, after the expander receives the corresponding parameter modification instruction, the writing of the parameters is quickly completed. Preferably, in this embodiment, for parameter modification of the interactive function scene, the current parameter value is obtained through a read operation, and displayed through a visual interface, so that a user can refer to the displayed current parameter value, and then parameter setting values of function options corresponding to a table display interface are modified, so as to improve stability of the device.
In the invention, each option in the table display interface has constructed the mapping relation of PHY port information and register address information in the early stage, at the same time, the register addresses of different PHY port IDs correspond to different control functions, thus establishing the function option of the table display interface, when a certain function option is checked, the user terminal generates data interaction instruction information according to the PHY port information and the corresponding register address information and the function type to be realized by the function option, and then sends the data interaction instruction information to the expander, so that the expander carries out corresponding processing according to the register data of the corresponding PHY port, and returns the query result or the control result to the user terminal.
Step 103, the data interaction instruction information is sent to the target expander, and a data interaction processing result is obtained, wherein the data interaction processing result is obtained after the target expander executes data interaction processing corresponding to the target interaction function information on target register data, and the target register data is register data corresponding to the target register address information in the target expander.
In the invention, the user side obtains the data interaction processing result returned by the expander, for example, inquires the information of one or more PHY port IDs, obtains the response of one side of the expander to the instruction through the visualization tool, and displays the inquired result in the visualization tool in an interface mode after the information inquiry of all PHY port IDs is finished. In an embodiment, when a register instruction needs to be queried, a user clicks a read instruction and checks a register instruction query option (the option can set multiple sub-items according to actual needs), further, based on the check option information, the user end parses PHY port information and register address information of the register instruction currently needing to be queried in batches, and sends the parsed query instruction to an expander, after all queries are completed, the user end displays query results in a two-dimensional table manner through a visualization tool, and specifically can be referred to as table 3:
TABLE 3 Table 3
In the form of table 3, the register instruction of each PHY port is obtained by fast polling, so that possible fault types can be conveniently and rapidly located.
According to the expander-based data processing method, through the mapping relation between the PHY ports and the register addresses established in the earlier stage, the full information of the register corresponding to each PHY port in the expander can be quickly queried, dynamic control of single or multiple PHY ports is achieved, and the efficiency of the data processing process is improved.
On the basis of the foregoing embodiment, before the acquiring the hook status information on the table display interface of the user side, the method further includes:
acquiring configuration file information of the target expander;
analyzing the configuration file information to obtain mapping relations between each physical port and register addresses in the target expander and register instruction type information corresponding to each physical port, wherein each register instruction type information corresponds to different physical port instruction control functions;
based on the mapping relation, generating the table display interface according to the port numbers of the physical ports and the register instruction type information;
The responding to the first input information, according to the target physical port information, obtaining the corresponding target register address information, includes:
and determining the address information of the target register corresponding to the target physical port information according to the mapping relation.
According to the invention, aiming at the fact that the number and the configuration of PHY ports of expanders of each model are different, the register space which can be accessed by the expanders of different models is different, and the visualization tool in the user side is applicable to expanders of various models by acquiring the model configuration files of the expanders of different models, so that corresponding table display interfaces are generated according to the expanders of each model. Specifically, when the visualization tool is started, firstly, according to the transmitted port, a corresponding debugging terminal such as a serial port tool, a network security Shell protocol (SSH for short) and the like is used; then, the visualization tool enters an initialization stage, automatically initiates an expander model query instruction, analyzes the configuration file of the model pair according to the queried expander model, and analyzes the obtained configuration file information to contain: the PHY number of the expander, the register address, the correspondence of each PHY port ID and SLOT slot_id, the chassis management information configuration, the register instruction type, and the like. The mapping relation between each PHY port and the register address is established by analyzing the configuration file corresponding to the current expander, and further register instruction type information of different types of registers (such as a control register, a status register, an error count register and the like) is determined, so that the visualization tool generates a corresponding table display interface according to the previously established mapping relation and the like of the expanders of various types, and a user can conveniently operate corresponding interactive functions on the user side.
On the basis of the embodiment, the target interactive function information comprises query function interactive information and control function interactive information;
the generating data interaction instruction information according to the target register address information and the target interaction function information includes:
if the target interactive function information is the query function interactive information, generating a query command prompt and determining first data type information, wherein the first data type information is the data type information of register data to be queried;
generating the data interaction instruction information according to a target mapping relation and the first data type information based on the inquiry command prompt, so as to inquire register data in the target expander through the data interaction instruction information; the target mapping relationship is a mapping relationship between the target physical port information and the target register address information.
In the invention, the hooked items on the visualization tool correspond to different functions, and for the function of inquiring the expander, after the hooked item is inquired, an inquiry command is firstly generated, and then the relevant parameters of the inquiry command are set according to the address information and the data type information of the hooked register data to be inquired, so that a complete inquiry command is formed.
On the basis of the foregoing embodiment, the parsing the configuration file information further includes:
acquiring the corresponding relation between each physical port and an expansion slot in the target expander;
the method further comprises the steps of:
determining a fault expansion slot in the target expander according to the slot fault information;
and acquiring a physical port corresponding to the fault expansion slot based on the corresponding relation, so as to query register data through the physical port corresponding to the fault expansion slot and the mapping relation.
In the invention, when the hard disk communication of a certain SLOT in the expander is abnormal, the PHY port ID corresponding to the SLOT SLOT_ID can be queried according to the corresponding relation between the PHY port and the expansion SLOT obtained by the prior analysis, and then the corresponding register data is queried according to the PHY port ID, thereby rapidly analyzing the fault of the SLOT.
On the basis of the foregoing embodiment, the generating data interaction instruction information according to the destination register address information and the destination interaction function information further includes:
if the target interaction function information is the control function interaction information, generating the inquiry command prompt and the control command prompt, and determining second data type information, wherein the second data type information is the data type information of register data to be subjected to data writing;
Based on the inquiry command prompt, acquiring all register instruction type information and current parameter values corresponding to the register data to be subjected to data writing according to the target mapping relation and the second data type information;
determining target register instruction type information or a target parameter modification value according to the control function interaction information, wherein the target parameter modification value is used for modifying the current parameter value;
and generating the data interaction instruction information according to the target register instruction type information or the target parameter modification value, the target mapping relation and the second data type information based on the control command prompt.
In the present invention, referring to table 1 and table 2, after the PHY port to be controlled currently and the register function option to be implemented are checked on the table display interface, a query command prompt is generated based on the PHY port to be implemented first and sent to the extender, so as to obtain all register instruction type information and current parameter values corresponding to the PHY port in the extender, and further, at the user end, the table display interface composed of the register instruction type information and the table display interface composed of the current parameter values are generated through the visualization tool (as shown in table 1 and table 2, a table display interface may also be generated according to actual requirements, that is, the control information option may be checked in the interface, and parameter value modification may also be performed). Further, according to the selected result or parameter modification value of different control information options, a corresponding control command prompt is generated, so that after receiving the control command, the expander executes the command on the corresponding register data to realize the control function.
On the basis of the foregoing embodiment, after the obtaining the configuration file information of the target extender, the method further includes:
determining a target transmission port type according to the type of the hardware equipment correspondingly connected with the target expander, wherein the target transmission port type at least comprises a serial port type, a parallel port type and a network port type;
and generating corresponding transmission port switching prompt information according to the type of the target transmission port so as to display the corresponding transmission port switching prompt information through a display terminal of the user terminal.
In the invention, the transmission port between the user terminal and the expander comprises a serial port, a parallel port, a network port and the like, and proper transmission port prompt information is generated according to the type of the hardware equipment correspondingly connected with the target expander, so that a user selects a proper interface to realize instruction transmission between the user terminal and the expander, for example, the equipment connected with the expander is a hard disk, and the serial port can be adopted; when the network equipment is connected, a network port can be adopted, so that the data transmission efficiency is improved.
Fig. 2 is a second flow chart of a data processing method based on an expander, as shown in fig. 2, provided by the invention, the data processing method based on the expander is applied to the expander, and includes:
Step 201, obtaining data interaction instruction information sent by a user side, wherein the data interaction instruction information comprises target register address information and target interaction function information; the target register address information is obtained by the user side according to a target mapping relation and target physical port information; the target mapping relationship is a mapping relationship between each physical port and a register address in the expander, which is obtained after the user side analyzes the configuration file information of the expander;
step 202, performing data interaction processing corresponding to the target interaction function information on the target register data, and sending an obtained data interaction processing result to the user terminal, wherein the target register data is register data corresponding to the target register address information in the expander.
The program running in the expander is Firmware program (FW for short), the existing expander runs a real-time operating system, has no abundant general instructions, cannot directly execute the program on the FW according to the needs, and needs to implement debugging by means of a platform for executing a Linux system, so that development of an independent access interface by means of an SAS in-band channel is needed, and normal functions may be affected.
In the invention, by improving the FW of the expander, an instruction interaction module is newly added in the FW, and the instruction interaction module comprises a port driving layer and an instruction execution layer. The method comprises the steps of receiving instruction data sent by a user terminal through a port driving layer, analyzing the received instruction data into a specific command prompt through an instruction execution layer, executing the command prompt, and returning an execution result to the user terminal so as to enable a display terminal of the user terminal to display the execution result.
The invention also provides an expander chip, wherein the expander chip is provided with FWs provided by the embodiment, and can realize expansion of SAS links, such as expansion 36, 48, 64 and other PHY links with a considerable quantity; meanwhile, according to the data interaction instruction information sent by the user side, the corresponding register inquiry and control process can be completed quickly, and the data processing efficiency is improved.
On the basis of the above embodiment, the obtaining the data interaction instruction information sent by the user side includes:
based on a port driving layer, receiving instruction data sent by the user side in an interrupt mode;
and carrying out integrity detection on the received instruction data, and if the received complete data is determined, acquiring the data interaction instruction information.
In the invention, the port driving layer realizes the driving program of the instruction transmission port, detects the data received by the port in an interrupt mode, informs the instruction execution layer of acquiring the data interaction instruction information after determining that the complete data is received, and returns the Response of the instruction execution layer to the user side, so that the expander can quickly receive the instruction data sent by the user side.
After the instruction execution layer receives the instruction data of the port driving layer, namely data interaction instruction information, the instruction data is analyzed into a specific command prompt, and the command prompt is executed, specifically, the data interaction processing corresponding to the target interaction function information is performed on the target register data, which comprises the following steps:
analyzing the data interaction instruction information based on an instruction execution layer, and acquiring register data to be queried according to the target register address information and first data type information if a command prompt obtained through analysis is a query command prompt, wherein the first data type information is data type information of the register data to be queried;
and sending the register data to be queried to the user side.
On the basis of the above embodiment, the method further includes:
if the command prompt obtained through analysis is a control command prompt, determining register data to be subjected to data writing according to the target register address information and second data type information, wherein the second data type information is the data type information of the register data to be subjected to data writing;
after the register data to be subjected to data writing is sent to the user side, acquiring target register instruction type information or a target parameter modification value, wherein the target register instruction type information corresponds to a physical port instruction control function; the target parameter modification value is used for modifying the current parameter value of the register data to be subjected to data writing;
executing a corresponding physical port instruction control function according to the target register instruction type information to obtain a physical port instruction control result; or modifying the current parameter value in the register data to be subjected to data writing according to the target parameter modification value to obtain a parameter modification result;
and returning the physical port instruction control result or the parameter modification result to the user side.
In the invention, when the CMD is a write command, the returned write state comprises a write success result and a write failure result, and for the control command obtained by analysis, the command execution layer returns the control result to the user side; when the CMD is a read instruction, the returned read state comprises a read success result, a read failure result and a corresponding read result (read_data), namely a query result; further, the return result is taken as Response data through the instruction execution layer. In one embodiment, CMD is defined in the format: { cmd+in }, wherein, depending on the actual application, a specific CMD is defined, such as: inquiring the model of the Expander, initializing configuration of each PHY, reading and writing physical layer registers, reading and writing link layer registers, reading and writing chassis management information and the like. It should be noted that, in the present invention, when the command indicator is a control command indicator, the register data is first read according to the related information (such as address information, PHY port information, etc.) of the register data to be written, and then the corresponding control command indicator is executed according to the read register data, so as to complete the corresponding function.
In the invention, according to the analysis result of the data interaction instruction information sent by the user terminal, the parameter entering comprises the following steps: 1. PHY port IDs to execute corresponding instructions for each ID; 2. information category of query and control; 3. a register address; 4. the specific value set, i.e. the parameter modification value.
According to the expander-based data processing method, through the mapping relation between the PHY ports and the register addresses established in the earlier stage, the full information of the register corresponding to each PHY port in the expander can be quickly queried, dynamic control of single or multiple PHY ports is achieved, and the efficiency of the data processing process is improved.
On the basis of the foregoing embodiment, before the obtaining the data interaction instruction information sent by the user side, the method further includes:
receiving second input information, wherein the second input information comprises operation information for inquiring configuration file information of the expander;
and transmitting configuration file information to the user side in response to the second input information, wherein the configuration file information comprises mapping relations between each physical port and register addresses in the expander and register instruction type information corresponding to each physical port, and each register instruction type information corresponds to different physical port instruction control functions.
In the invention, after the expander is electrified and connected with the user terminal, the configuration information query instruction sent by the user terminal is received, so that the user terminal can quickly complete relevant configuration according to different types of expanders after receiving the configuration file information of the expander, and the corresponding configuration of the various types of expanders is provided for the visualization tool, so that a table display interface conforming to the type of expander is generated on the visualization tool for the user to perform corresponding information query and control.
On the basis of the above embodiment, the method further includes:
acquiring hardware equipment type information of connected equipment;
and sending the hardware equipment type information to the user side so that the user side can establish connection between a target transmission port and the expander according to the hardware equipment type information, wherein the target transmission port at least comprises a serial port, a parallel port and a network port.
In the invention, the transmission port between the user terminal and the expander comprises a serial port, a parallel port, a network port and the like, after the expander sends the type information of the self-connected hardware equipment to the user terminal, one side of the user terminal selects a proper transmission port to realize instruction transmission between the user terminal and the expander, for example, the equipment connected with the expander is a hard disk, and the serial port can be adopted; when the network equipment is connected, a network port can be adopted, so that the data transmission efficiency is improved.
On the basis of the above embodiment, the method further includes:
and matching the target register instruction type information through a preset instruction model, and executing the data interaction instruction information if the target register instruction type information is successfully matched with a preset physical port instruction control function in the preset instruction model, wherein the expander is arranged in the preset instruction model and can execute a plurality of preset physical port instruction control functions.
In the invention, a preset instruction model is established in advance aiming at the query function and the control function which can be realized by different types of expanders, and error instructions generated by unreasonable selection of some function options or unreasonable parameter setting cannot be matched with the existing instructions in the preset instruction model, so that the problem that the stability of equipment is affected when the expanders execute the error instructions is avoided.
Fig. 3 is a schematic diagram of an instruction operation object based on an expander provided by the present invention, and fig. 4 is a general flowchart of instruction interaction based on an expander provided by the present invention, and referring to fig. 3 and fig. 4, a user determines a current operation, such as a query operation or a control operation, on a user side, selects a corresponding query option or a corresponding function option on a table display interface through a display layer of a visualization tool, further converts the selected information into instruction data corresponding to each PHY port ID through an instruction analysis layer, and selects a suitable interface through a debugging tool to send the instruction data to the expander; after receiving the instruction data, the port driving layer of the expander analyzes the instruction data into a specific CMD instruction through the instruction execution layer, executes a corresponding function, acquires Response data of the instruction, and performs Response (the data can be operated by a functional program or read from a register); when the user receives the Response data, the Response data is displayed on the interface of the visualization tool.
In another embodiment, for the controlled interaction flow, the expander first queries the corresponding data to be written; then, the user modifies the parameter value content on the form display interface and clicks the write button; further, the visualization tool analyzes the modified parameter value content into CMD, and sends the CMD to the expander through the port driving layer; then, the instruction execution layer of the expander analyzes a specific CMD instruction, and executes a corresponding function to complete corresponding parameter modification or the expander executes corresponding control operation based on the modified parameter; finally, the user may perform the query step again, checking whether the setting is successful through the visualization tool.
The invention automatically converts the options of the user into the required instructions, acquires various complex information from the expander end, displays the information on the interface of the user end in a matrix form mode, ensures that the user only needs to click a few buttons, omits the complicated process of executing hundreds of instructions, and can acquire the link information of each PHY port, the query and control of IO interaction information, the information query and fault injection of executing chassis management and other operations. Meanwhile, the user side can be compatible with expanders of various types without depending on specific equipment, and under the dual operation of the data processing method and the log record, the efficiency of function debugging and problem positioning is greatly improved, and the maintenance cost is reduced.
The expander-based data processing system provided by the present invention is described below, and the expander-based data processing system described below and the expander-based data processing method described above may be referred to correspondingly to each other.
FIG. 5 is a schematic diagram of a data processing system based on an expander, as shown in FIG. 5, the invention provides a data processing system based on an expander, which is applied to a user side and includes an interaction module 501, a processing module 502 and a debugging module 503, wherein the interaction module 501 is configured to obtain first input information, and the first input information includes operation information for determining target physical port information and target interaction function information of a target expander; the processing module 502 is configured to respond to the first input information, obtain corresponding target register address information according to the target physical port information, and generate data interaction instruction information according to the target register address information and the target interaction function information; the debug module 503 is configured to send the data interaction instruction information to the target expander, and obtain a data interaction processing result, where the data interaction processing result is obtained after the target expander performs data interaction processing corresponding to the target interaction function information on target register data, and the target register data is register data corresponding to the target register address information in the target expander.
According to the expander-based data processing system provided by the invention, through the mapping relation between the PHY ports and the register addresses established in the earlier stage, the total information of the registers corresponding to each PHY port in the expander can be quickly queried, the dynamic control of a single or a plurality of PHY ports is realized, and the efficiency of the data processing process is improved.
On the basis of the above embodiment, the interaction module includes:
the display interface input unit is used for acquiring the state information of the hook items on the form display interface of the user side, wherein the form display interface comprises a physical port option and an interactive function option;
the port information processing unit is used for determining the target physical port information according to the hook item state information corresponding to the physical port option;
the function information processing unit is used for determining the target interactive function information according to the hook item state information corresponding to the interactive function option;
and the input information generating unit is used for acquiring the first input information according to the target physical port information and the target interactive function information.
FIG. 6 is a second schematic structural diagram of the data processing system based on an expander provided by the present invention, as shown in FIG. 6, the present invention provides a data processing system based on an expander, which is applied to the expander, and includes a port driving module 601 and an instruction executing module 602, where the port driving module 601 is configured to obtain data interaction instruction information sent by a user side, and the data interaction instruction information includes target register address information and target interaction function information; the target register address information is obtained by the user side according to a target mapping relation and target physical port information; the target mapping relationship is a mapping relationship between each physical port and a register address in the expander, which is obtained after the user side analyzes the configuration file information of the expander; the instruction execution module 602 performs data interaction processing corresponding to the target interaction function information on the target register data, and sends an obtained data interaction processing result to the user side, where the target register data is register data corresponding to the target register address information in the expander.
According to the expander-based data processing system provided by the invention, through the mapping relation between the PHY ports and the register addresses established in the earlier stage, the total information of the registers corresponding to each PHY port in the expander can be quickly queried, the dynamic control of a single or a plurality of PHY ports is realized, and the efficiency of the data processing process is improved.
The system provided by the invention is used for executing the method embodiments, and specific flow and details refer to the embodiments and are not repeated herein.
Fig. 7 is a schematic structural diagram of an electronic device according to the present invention, as shown in fig. 7, the electronic device may include: a Processor (Processor) 701, a communication interface (Communications Interface) 702, a Memory (Memory) 703 and a communication bus 704, wherein the Processor 701, the communication interface 702 and the Memory 703 communicate with each other through the communication bus 704. The processor 701 may invoke logic instructions in the memory 703 to perform an expander-based data processing method comprising: acquiring first input information, wherein the first input information comprises operation information for determining target physical port information and target interactive function information of a target expander; responding to the first input information, acquiring corresponding target register address information according to the target physical port information, and generating data interaction instruction information according to the target register address information and the target interaction function information; the data interaction instruction information is sent to the target expander, and a data interaction processing result is obtained, wherein the data interaction processing result is obtained after the target expander executes data interaction processing corresponding to the target interaction function information on target register data, and the target register data is register data corresponding to the target register address information in the target expander;
Or, acquiring data interaction instruction information sent by a user side, wherein the data interaction instruction information comprises target register address information and target interaction function information; the target register address information is obtained by the user side according to a target mapping relation and target physical port information; the target mapping relationship is a mapping relationship between each physical port and a register address in the expander, which is obtained after the user side analyzes the configuration file information of the expander; and carrying out data interaction processing corresponding to the target interaction function information on the target register data, and sending the obtained data interaction processing result to the user side, wherein the target register data is register data corresponding to the target register address information in the expander.
Further, the logic instructions in the memory 703 may be implemented in the form of software functional units and may be stored in a computer readable storage medium when sold or used as a stand alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the expander-based data processing method provided by the methods described above, the method comprising: acquiring first input information, wherein the first input information comprises an operation of determining target physical port information and target interactive function information of a target expander; responding to the first input information, acquiring corresponding target register address information according to the target physical port information, and generating data interaction instruction information according to the target register address information and the target interaction function information; the data interaction instruction information is sent to the target expander, and a data interaction processing result is obtained, wherein the data interaction processing result is obtained after the target expander executes data interaction processing corresponding to the target interaction function information on target register data, and the target register data is register data corresponding to the target register address information in the target expander;
Or, acquiring data interaction instruction information sent by a user side, wherein the data interaction instruction information comprises target register address information and target interaction function information; the target register address information is obtained by the user side according to a target mapping relation and target physical port information; the target mapping relationship is a mapping relationship between each physical port and a register address in the expander, which is obtained after the user side analyzes the configuration file information of the expander; and carrying out data interaction processing corresponding to the target interaction function information on the target register data, and sending the obtained data interaction processing result to the user side, wherein the target register data is register data corresponding to the target register address information in the expander.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the expander-based data processing method provided by the above embodiments, the method comprising: acquiring first input information, wherein the first input information comprises operation information for determining target physical port information and target interactive function information of a target expander; responding to the first input information, acquiring corresponding target register address information according to the target physical port information, and generating data interaction instruction information according to the target register address information and the target interaction function information; the data interaction instruction information is sent to the target expander, and a data interaction processing result is obtained, wherein the data interaction processing result is obtained after the target expander executes data interaction processing corresponding to the target interaction function information on target register data, and the target register data is register data corresponding to the target register address information in the target expander;
Or, acquiring data interaction instruction information sent by a user side, wherein the data interaction instruction information comprises target register address information and target interaction function information; the target register address information is obtained by the user side according to a target mapping relation and target physical port information; the target mapping relationship is a mapping relationship between each physical port and a register address in the expander, which is obtained after the user side analyzes the configuration file information of the expander; and carrying out data interaction processing corresponding to the target interaction function information on the target register data, and sending the obtained data interaction processing result to the user side, wherein the target register data is register data corresponding to the target register address information in the expander.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (20)

1. The data processing method based on the expander is characterized by being applied to a user side and comprising the following steps of:
acquiring first input information, wherein the first input information comprises operation information for determining target physical port information and target interactive function information of a target expander, the target physical port information and the target interactive function information are acquired based on a table display interface of the user side, and when the target interactive function information is control function interactive information, parameter set values of various parameter function options correspond to bit ranges of a register control function on the table display interface;
responding to the first input information, acquiring corresponding target register address information according to the target physical port information, and generating data interaction instruction information according to the target register address information and the target interaction function information;
the data interaction instruction information is sent to the target expander, and a data interaction processing result is obtained, wherein the data interaction processing result is obtained after the target expander executes data interaction processing corresponding to the target interaction function information on target register data, and the target register data is register data corresponding to the target register address information in the target expander;
The form display interface is generated by:
acquiring configuration file information of the target expander;
analyzing the configuration file information to obtain mapping relations between each physical port and register addresses in the target expander and register instruction type information corresponding to each physical port, wherein each register instruction type information corresponds to different physical port instruction control functions;
and generating the table display interface according to the port numbers of the physical ports and the register instruction type information based on the mapping relation.
2. The expander-based data processing method of claim 1, wherein the obtaining the first input information comprises:
acquiring the state information of the hook items on a table display interface of the user side, wherein the table display interface comprises a physical port option and an interactive function option;
determining the target physical port information according to the hook item state information corresponding to the physical port option;
determining the target interactive function information according to the hook item state information corresponding to the interactive function option;
And acquiring the first input information according to the target physical port information and the target interactive function information.
3. The expander-based data processing method of claim 2, wherein said obtaining corresponding destination register address information from said destination physical port information in response to said first input information comprises:
and determining the address information of the target register corresponding to the target physical port information according to the mapping relation.
4. The expander-based data processing method of claim 3, wherein the target interactive function information comprises query function interactive information and control function interactive information;
the generating data interaction instruction information according to the target register address information and the target interaction function information includes:
if the target interactive function information is the query function interactive information, generating a query command prompt and determining first data type information, wherein the first data type information is the data type information of register data to be queried;
generating the data interaction instruction information according to a target mapping relation and the first data type information based on the inquiry command prompt, so as to inquire register data in the target expander through the data interaction instruction information; the target mapping relationship is a mapping relationship between the target physical port information and the target register address information.
5. The expander-based data processing method of claim 3, wherein said parsing the profile information further comprises:
acquiring the corresponding relation between each physical port and an expansion slot in the target expander;
the method further comprises the steps of:
determining a fault expansion slot in the target expander according to the slot fault information;
and acquiring a physical port corresponding to the fault expansion slot based on the corresponding relation, so as to query register data through the physical port corresponding to the fault expansion slot and the mapping relation.
6. The expander-based data processing method of claim 4, wherein generating data interaction instruction information from the destination register address information and the destination interaction function information, further comprises:
if the target interaction function information is the control function interaction information, generating the inquiry command prompt and the control command prompt, and determining second data type information, wherein the second data type information is the data type information of register data to be subjected to data writing;
based on the inquiry command prompt, acquiring all register instruction type information and current parameter values corresponding to the register data to be subjected to data writing according to the target mapping relation and the second data type information;
Determining target register instruction type information or a target parameter modification value according to the control function interaction information, wherein the target parameter modification value is used for modifying the current parameter value;
and generating the data interaction instruction information according to the target register instruction type information or the target parameter modification value, the target mapping relation and the second data type information based on the control command prompt.
7. The expander-based data processing method of claim 3, wherein after the obtaining the profile information of the target expander, the method further comprises:
determining a target transmission port type according to the type of the hardware equipment correspondingly connected with the target expander, wherein the target transmission port type at least comprises a serial port type, a parallel port type and a network port type;
and generating corresponding transmission port switching prompt information according to the type of the target transmission port so as to display the corresponding transmission port switching prompt information through a display terminal of the user terminal.
8. The expander-based data processing method of claim 2, wherein the interactive function options include a physical port initialization state information interactive option, a register address information interactive option, an input output information interactive option, a physical control function interactive information, and a chassis management information interactive option.
9. A data processing method based on an expander, applied to the expander, comprising:
acquiring data interaction instruction information sent by a user side, wherein the data interaction instruction information comprises target register address information and target interaction function information; the target register address information is obtained by the user side according to a target mapping relation and target physical port information; the target mapping relationship is a mapping relationship between each physical port and a register address in the expander, which is obtained after the user side analyzes the configuration file information of the expander; the target physical port information and the target interactive function information are obtained based on a table display interface of the user side, and when the target interactive function information is control function interactive information, parameter set values of various parameter function options correspond to bit ranges of a register control function on the table display interface;
performing data interaction processing corresponding to the target interaction function information on the target register data, and sending an obtained data interaction processing result to the user side, wherein the target register data is register data corresponding to the target register address information in the expander;
The table display interface is generated for the user terminal by the following modes:
acquiring configuration file information of the target expander;
analyzing the configuration file information to obtain mapping relations between each physical port and register addresses in the target expander and register instruction type information corresponding to each physical port, wherein each register instruction type information corresponds to different physical port instruction control functions;
and generating the table display interface according to the port numbers of the physical ports and the register instruction type information based on the mapping relation.
10. The expander-based data processing method of claim 9, wherein the obtaining the data interaction instruction information sent by the user side includes:
based on a port driving layer, receiving instruction data sent by the user side in an interrupt mode;
and carrying out integrity detection on the received instruction data, and if the received complete data is determined, acquiring the data interaction instruction information.
11. The expander-based data processing method of claim 9, wherein the performing data interaction processing corresponding to the target interaction function information on the target register data includes:
Analyzing the data interaction instruction information based on an instruction execution layer, and acquiring register data to be queried according to the target register address information and first data type information if a command prompt obtained through analysis is a query command prompt, wherein the first data type information is data type information of the register data to be queried;
and sending the register data to be queried to the user side.
12. The expander-based data processing method of claim 11, wherein the method further comprises:
if the command prompt obtained through analysis is a control command prompt, determining register data to be subjected to data writing according to the target register address information and second data type information, wherein the second data type information is the data type information of the register data to be subjected to data writing;
after the register data to be subjected to data writing is sent to the user side, acquiring target register instruction type information or a target parameter modification value, wherein the target register instruction type information corresponds to a physical port instruction control function; the target parameter modification value is used for modifying the current parameter value of the register data to be subjected to data writing;
Executing a corresponding physical port instruction control function according to the target register instruction type information to obtain a physical port instruction control result; or modifying the current parameter value in the register data to be subjected to data writing according to the target parameter modification value to obtain a parameter modification result;
and returning the physical port instruction control result or the parameter modification result to the user side.
13. The expander-based data processing method of claim 9, wherein before the obtaining the data interaction instruction information sent by the user side, the method further comprises:
receiving second input information, wherein the second input information comprises operation information for inquiring configuration file information of the expander;
and transmitting configuration file information to the user side in response to the second input information, wherein the configuration file information comprises mapping relations between each physical port and register addresses in the expander and register instruction type information corresponding to each physical port, and each register instruction type information corresponds to different physical port instruction control functions.
14. The expander-based data processing method of claim 13, wherein the method further comprises:
acquiring hardware equipment type information of connected equipment;
and sending the hardware equipment type information to the user side so that the user side can establish connection between a target transmission port and the expander according to the hardware equipment type information, wherein the target transmission port at least comprises a serial port, a parallel port and a network port.
15. The expander-based data processing method of claim 12, wherein the method further comprises:
and matching the target register instruction type information through a preset instruction model, and executing the data interaction instruction information if the target register instruction type information is successfully matched with a preset physical port instruction control function in the preset instruction model, wherein the expander is arranged in the preset instruction model and can execute a plurality of preset physical port instruction control functions.
16. A data processing system based on an expander, applied to a user terminal, comprising:
the interaction module is used for acquiring first input information, wherein the first input information comprises operation information for determining target physical port information and target interaction function information of a target expander, the target physical port information and the target interaction function information are acquired based on a table display interface of the user side, and when the target interaction function information is control function interaction information, parameter set values of various parameter function options correspond to bit ranges of a register control function on the table display interface;
The processing module is used for responding to the first input information, acquiring corresponding target register address information according to the target physical port information, and generating data interaction instruction information according to the target register address information and the target interaction function information;
the debugging module is used for sending the data interaction instruction information to the target expander to obtain a data interaction processing result, wherein the data interaction processing result is obtained after the target expander executes data interaction processing corresponding to the target interaction function information on target register data, and the target register data is register data corresponding to the target register address information in the target expander;
the form display interface is generated by:
acquiring configuration file information of the target expander;
analyzing the configuration file information to obtain mapping relations between each physical port and register addresses in the target expander and register instruction type information corresponding to each physical port, wherein each register instruction type information corresponds to different physical port instruction control functions;
And generating the table display interface according to the port numbers of the physical ports and the register instruction type information based on the mapping relation.
17. The expander-based data processing system of claim 16, wherein the interaction module comprises:
the display interface input unit is used for acquiring the state information of the hook items on the form display interface of the user side, wherein the form display interface comprises a physical port option and an interactive function option;
the port information processing unit is used for determining the target physical port information according to the hook item state information corresponding to the physical port option;
the function information processing unit is used for determining the target interactive function information according to the hook item state information corresponding to the interactive function option;
and the input information generating unit is used for acquiring the first input information according to the target physical port information and the target interactive function information.
18. A data processing system based on an expander, applied to the expander, comprising:
the port driving module is used for acquiring data interaction instruction information sent by the user side, wherein the data interaction instruction information comprises target register address information and target interaction function information; the target register address information is obtained by the user side according to a target mapping relation and target physical port information; the target mapping relationship is a mapping relationship between each physical port and a register address in the expander, which is obtained after the user side analyzes the configuration file information of the expander; the target physical port information and the target interactive function information are obtained based on a table display interface of the user side, and when the target interactive function information is control function interactive information, parameter set values of various parameter function options correspond to bit ranges of a register control function on the table display interface;
The instruction execution module is used for carrying out data interaction processing corresponding to the target interaction function information on the target register data and sending an obtained data interaction processing result to the user side, wherein the target register data is register data corresponding to the target register address information in the expander;
the table display interface is generated for the user terminal by the following modes:
acquiring configuration file information of the target expander;
analyzing the configuration file information to obtain mapping relations between each physical port and register addresses in the target expander and register instruction type information corresponding to each physical port, wherein each register instruction type information corresponds to different physical port instruction control functions;
and generating the table display interface according to the port numbers of the physical ports and the register instruction type information based on the mapping relation.
19. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the expander-based data processing method of any one of claims 1 to 8 or the expander-based data processing method of any one of claims 9 to 15 when executing the computer program.
20. A non-transitory computer readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements the expander-based data processing method of any one of claims 1 to 8, or the expander-based data processing method of any one of claims 9 to 15.
CN202310915410.8A 2023-07-25 2023-07-25 Data processing method and system based on expander, electronic equipment and storage medium Active CN116627861B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310915410.8A CN116627861B (en) 2023-07-25 2023-07-25 Data processing method and system based on expander, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310915410.8A CN116627861B (en) 2023-07-25 2023-07-25 Data processing method and system based on expander, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116627861A CN116627861A (en) 2023-08-22
CN116627861B true CN116627861B (en) 2024-02-20

Family

ID=87613882

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310915410.8A Active CN116627861B (en) 2023-07-25 2023-07-25 Data processing method and system based on expander, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116627861B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104123246A (en) * 2013-04-23 2014-10-29 鸿富锦精密工业(深圳)有限公司 Interface expansion device and serial attached SCSI expander
CN108123845A (en) * 2016-11-30 2018-06-05 中兴通讯股份有限公司 A kind of method and SAS expander for realizing SAS domain loop monitors
CN116467240A (en) * 2023-04-12 2023-07-21 苏州浪潮智能科技有限公司 SAS expander topology configuration method, SAS expander topology configuration device, SAS expander and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104123246A (en) * 2013-04-23 2014-10-29 鸿富锦精密工业(深圳)有限公司 Interface expansion device and serial attached SCSI expander
CN108123845A (en) * 2016-11-30 2018-06-05 中兴通讯股份有限公司 A kind of method and SAS expander for realizing SAS domain loop monitors
CN116467240A (en) * 2023-04-12 2023-07-21 苏州浪潮智能科技有限公司 SAS expander topology configuration method, SAS expander topology configuration device, SAS expander and storage medium

Also Published As

Publication number Publication date
CN116627861A (en) 2023-08-22

Similar Documents

Publication Publication Date Title
US10680921B2 (en) Virtual intelligent platform management interface for hardware components
CN108683562B (en) Anomaly detection positioning method and device, computer equipment and storage medium
US9454423B2 (en) SAN performance analysis tool
CN107848522B (en) System and method for transmitting diagnostic commands to a vehicle
US9811480B2 (en) Universal serial bus emulation of peripheral devices
US20200241985A1 (en) Methods, electronic devices, storage systems, and computer program products for error detection
US7114112B2 (en) Method, system, and program for simulating Input/Output (I/O) requests to test a system
US9772956B2 (en) Universal serial bus emulation of a host connection
CN105183575A (en) Processor fault diagnosis method, device and system
US7376546B2 (en) User configurable ultra320 SCSI target device simulator and error injector
US7610482B1 (en) Method and system for managing boot trace information in host bus adapters
US20100312541A1 (en) Program test device and program
CN112542206A (en) LPDDR test method, device, readable storage medium and electronic equipment
EP3117327B1 (en) Universal serial bus emulation of peripheral devices
CN112214373B (en) Hardware monitoring method and device and electronic equipment
US6868375B1 (en) Emulation of dynamically reconfigurable computer system
CN116627861B (en) Data processing method and system based on expander, electronic equipment and storage medium
CN113032246A (en) SSD (solid State disk) firmware operation method and device, readable storage medium and electronic equipment
CN114610557B (en) Method and device for testing equipment driving unit
US20030159102A1 (en) Method for testing a universal serial bus host controller
CN115794530A (en) Hardware connection testing method, device, equipment and readable storage medium
CN116089124A (en) Communication method, device and medium of simulation system
CN112286573A (en) Method, device and system for modifying configuration parameters of module controller
CN111475398A (en) Server NIC diagnosis method, system, terminal and storage medium
CN115328712B (en) Detection method of KVM switch and related 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