CN113656222A - Serial port connection method, serial port connection device and electronic equipment - Google Patents

Serial port connection method, serial port connection device and electronic equipment Download PDF

Info

Publication number
CN113656222A
CN113656222A CN202110750686.6A CN202110750686A CN113656222A CN 113656222 A CN113656222 A CN 113656222A CN 202110750686 A CN202110750686 A CN 202110750686A CN 113656222 A CN113656222 A CN 113656222A
Authority
CN
China
Prior art keywords
serial port
target
input signal
server
external serial
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.)
Pending
Application number
CN202110750686.6A
Other languages
Chinese (zh)
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.)
China Great Wall Technology Group Co ltd
Original Assignee
China Great Wall Technology Group 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 China Great Wall Technology Group Co ltd filed Critical China Great Wall Technology Group Co ltd
Priority to CN202110750686.6A priority Critical patent/CN113656222A/en
Publication of CN113656222A publication Critical patent/CN113656222A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/221Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test buses, lines or interfaces, e.g. stuck-at or open line faults

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Systems (AREA)

Abstract

The application discloses a serial port connection method and device and electronic equipment. The serial port connection method comprises the following steps: acquiring input signals of each external serial port; detecting whether a target input signal exists in the input signal, wherein the target input signal is used for indicating that a target external serial port has data transmission, and the target external serial port is an external serial port corresponding to the target input signal; and if the target input signal exists, connecting the server serial port with the target external serial port. This application is through the incoming signal who detects outside serial ports, determines the outside serial ports that has data transmission, the outside serial ports of target promptly, later is connected server serial ports and the outside serial ports of target to improve the efficiency and the promptness that server serial ports and outside serial ports are connected.

Description

Serial port connection method, serial port connection device and electronic equipment
Technical Field
The application belongs to the technical field of serial port debugging, and particularly relates to a serial port connection method, a serial port connection device, electronic equipment and a computer readable storage medium.
Background
Inside the server, there are both a service system and a Board Management Controller (BMC), which have independent serial ports. For convenience of system debugging and subsequent system maintenance, the serial ports of the servers are connected to an external serial port connector, and remote communication is realized through an SOL (Serial Over LAN) function.
At present, the connection of the serial port of the server is mostly completed by manual testing. The method causes that part of external serial ports without data transmission occupy the server serial ports, and the external serial ports with data transmission cannot be connected to the server serial ports in time, so that the problems of low connection efficiency and low timeliness exist.
Disclosure of Invention
The application provides a serial port connection method, a serial port connection device, an electronic device and a computer readable storage medium, which can improve the efficiency and timeliness of the server serial port connection with an external serial port.
In a first aspect, the present application provides a serial port connection method, including:
acquiring input signals of each external serial port;
detecting whether a target input signal exists in the input signals, wherein the target input signal is used for indicating that a target external serial port has data transmission, and the target external serial port is an external serial port corresponding to the target input signal;
and if the target input signal exists, connecting the server serial port with the target external serial port.
In a second aspect, the present application provides a serial port connection device, including:
the acquisition module is used for acquiring input signals of each external serial port;
the first detection module is used for detecting whether a target input signal exists in the input signals, the target input signal is used for indicating that a target external serial port has data transmission, and the target external serial port is an external serial port corresponding to the target input signal;
and the first connection module is used for connecting the server serial port with the target external serial port if the target input signal exists.
In a third aspect, the present application provides an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to the first aspect when executing the computer program.
In a fourth aspect, the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of the first aspect.
In a fifth aspect, the present application provides a computer program product comprising a computer program which, when executed by one or more processors, performs the steps of the method of the first aspect as described above.
Compared with the prior art, the application has the beneficial effects that: according to the method and the device, the input signal of the external serial port is obtained firstly, then the target input signal is determined from the input signal, the target external serial port corresponding to the target input signal is determined based on the target input signal, and finally the server serial port is connected with the target external serial port. The method can be used for timely connecting the external serial port with data transmission, so that the efficiency and the timeliness of the connection between the server serial port and the external serial port are improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic flowchart of a serial port connection method provided in an embodiment of the present application;
fig. 2 is a schematic diagram of a serial port connection structure in a specific application scenario provided in the embodiment of the present application;
fig. 3 is a schematic structural diagram of a serial port connection device according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
The serial port connection method provided by the embodiment of the application can be applied to electronic devices such as a tablet computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a Personal Digital Assistant (PDA), and the like, and the embodiment of the application does not limit the specific types of the electronic devices at all.
In order to explain the technical solution proposed in the present application, the following description will be given by way of specific examples.
Fig. 1 shows a schematic flow chart of a serial port connection method provided in the present application, which may be applied to any one of the electronic devices described above by way of example and not limitation.
Step 101, obtaining input signals of each external serial port.
External serial ports may generally include a Front panel serial port (Front UART), a back panel serial port (reader/RTM UART), and an SOL remote serial port. Whether each external serial port has data input or not can be detected, the input signal of each external serial port can be acquired, so that the external serial port with data input can be determined according to the input signal subsequently, and the effective connection between the serial port of the server and the external serial port is realized. The input signal refers to a serial port signal timing sequence, namely a level signal corresponding to a serial port.
Step 102, detecting whether a target input signal exists in the input signal.
In order to debug and perform subsequent maintenance on a system of a server, a serial port of the server needs to be connected to an external serial port. The number of the serial ports of the server is limited, so that the serial ports of the server are generally connected to an external serial port with data input in a detection mode, so that the system of the server can be conveniently debugged and maintained by receiving data from the external serial port. The external serial port with data input, namely the target external serial port, is determined, whether a target input signal exists in the input signal can be detected, the target input signal is used for indicating that the target external serial port has data transmission, and the external serial port corresponding to the target data signal is the target external serial port.
In some embodiments, based on the timing characteristics of the input signal of the serial port, the target input signal may be determined by:
and A1, judging whether the input signal has jump or not.
And A2, if the input signal with the jump exists, determining the input signal with the jump as the target input signal.
The input signal of the external serial port is a Transistor-Transistor Logic (TTL) level of positive Logic, which is abbreviated as TTL level. For a positive logic TTL level, its start bit is a bit with a value of 0, i.e., the start bit is a low level for one bit time; the stop bit is a bit with a value of 1, i.e. the stop bit is high for one bit time. For an external serial port with an idle line or a finished data transmission, a signal of the TTL level is always at a high level, namely, a value is 1. However, it should be noted that there are two cases of signal transition, one is high level transition to low level, and the other is low level transition to high level, and for a line with data transmission, the signal transition is always in an alternate transition of high level and low level. To determine whether the target input signal exists, it can be determined whether there is an input signal that transitions from high to low or an input signal that transitions alternately from high to low at all times. If such input signals are present, such input signals may be determined as target input signals.
And 103, if the target input signal exists, connecting the server serial port with a target external serial port.
After the target input signal is determined, the target external serial port can be further determined according to the target input signal. And after the target external serial port is determined, connecting the server serial port with the target external serial port so as to facilitate data transmission. Through the process, the efficiency and the timeliness of the connection between the server serial port and the external serial port can be improved.
In some embodiments, if there are a plurality of target input signals, in order to ensure stable transmission of important data, the step 103 specifically includes:
b1, detecting whether the number of the target input signals is larger than that of the server serial ports.
And B2, if the number of the target input signals is larger than that of the server serial ports, sequentially connecting the server serial ports with the target external serial ports according to the preset priority of the target external serial ports.
If a plurality of target input signals exist, a plurality of target external serial ports are to be connected. At this time, it is necessary to first determine whether the currently available server serial port can meet the connection requirement of the current target external serial port. If the currently available server serial port cannot meet the connection requirement of the current target external serial port, the preset priority of each target external serial port can be determined first, and then the available server serial port and each target external serial port are sequentially connected according to the priority of each target external serial port.
For ease of understanding, the following are illustrated: if 4 target input signals are determined simultaneously, 4 target external serial ports have data waiting to be transmitted. At this time, only 2 available server serial ports cannot meet the connection requirements of the target external serial ports at the same time, and the preset priority of the 4 target external serial ports needs to be determined. The method comprises the steps of presetting external serial ports with high priority, generally transmitting important data, preferentially connecting the external serial ports, then arranging the 4 target external serial ports according to the sequence of the preset priority from high to low, and sequentially connecting the server serial ports with the target external serial ports according to the arrangement sequence, namely, utilizing 2 server serial ports to be connected with the former two target external serial ports, and when the former two target external serial ports have no data transmission, respectively connecting the 2 server serial ports with the latter two target external serial ports, thereby ensuring the reliability of the important data transmission. Optionally, in order to ensure the integrity of data transmission, after 2 server serial ports are used to connect with the target external serial ports arranged in the first two positions, the remaining two target external serial ports may be discarded without connection.
In some embodiments, in order to avoid occupation of the server serial port by an idle external serial port, after connecting the server serial port with the target external serial port, the serial port connection method may include:
and C1, if the target input signal is changed into a non-target input signal in a preset time period, detecting whether a new target input signal exists.
C2, if there is new target input signal, switching the server serial port to connect to the new target external serial port.
For the target external serial port connected with the server serial port, whether data transmission is finished or not can be detected, namely whether the target external serial port is in an idle state without data transmission or not can be detected. Specifically, whether a target input signal is converted into a non-target input signal within a preset time period, for example, within 10 seconds, that is, whether a TTL level signal of a target external serial port is always 1 is detected. If the value is always 1, the target external serial port has no data transmission at present and is in an idle state. At the moment, if a new target input signal exists, the server serial port is switched and connected to a new target external serial port, wherein the new target external serial port is the external serial port corresponding to the new target input signal. By the method, the effective utilization rate of the server serial port and the timeliness of the connection of the new target external serial port can be improved. It should be understood that the switching connection here belongs to a specific application scenario of connection, that is, when a target external serial port connected to a server serial port is in an idle state, the server serial port may be switched to a new target external serial port, so as to improve flexibility of server serial port connection.
It can be understood that all the serial port connection methods described above belong to an intelligent connection scheme.
In some embodiments, a forced switch of the veneer management system may be received in addition to the intelligent connection. After the server serial port is connected with the target external serial port, the serial port connection method may include:
d1, if receiving the switching instruction of the single board management system, determining the serial port of the server to be switched and the external serial port to be connected according to the switching instruction.
And D2, connecting the serial port of the server to be switched to the external serial port to be connected.
If a forced switching instruction of the single board management system is received, the server serial port to be switched and the external serial port to be connected can be determined according to the switching specification, and then the server serial port and the external serial port to be connected are connected, so that the switching of the server serial port is realized.
In some embodiments, in order to improve the stability of important data transmission, the step D1 specifically includes:
d11, detecting whether an unconnected server serial port exists.
D12, if there is no unconnected server serial port, determining the server serial port to be switched according to the preset priority of each target external serial port.
D13, determining the external serial port to be connected according to the switching instruction.
After receiving a switching instruction of the board management system, the switching instruction has been specified for the external serial port to be connected. For a server serial port to be switched, firstly detecting whether an unconnected server serial port exists; if the serial ports of the current server are in a connection state, determining the external serial ports in connection, namely the preset priority of each target external serial port; and finally, selecting the target external serial port with the lowest preset priority as the serial port of the server to be switched. Therefore, after the external serial port to be connected and the server serial port to be switched are determined, the server serial port to be switched and the external serial port to be connected can be connected in a forced switching mode.
It should be understood that in the scenario where there is an unconnected server serial port, there may be two cases:
one is the case where the number of unconnected server serial ports is less than the number of external serial ports to be connected. For example, there are 1 serial port of the unconnected server and 3 external serial ports to be connected. 1 unconnected server can be connected with 1 external serial port; then determining 2 target external serial ports with the lowest preset priority from the target external serial ports, and taking the server serial ports connected with the 2 target external serial ports as server serial ports to be switched; and finally, connecting the 2 serial ports of the server to be switched with the 2 external serial ports to be connected.
The other is the case that the number of the unconnected server serial ports is equal to or larger than the number of the external serial ports to be connected. When the number of the unconnected server serial ports is equal to that of the external serial ports to be connected, the unconnected server serial ports can be sequentially connected with the external serial ports to be connected. And when the number of the unconnected server serial ports is larger than that of the external serial ports to be connected, the server serial ports with the number equal to that of the external serial ports to be connected can be randomly selected from the unconnected server serial ports and are sequentially connected with the external serial ports to be connected.
In some embodiments, in order to facilitate management of the server serial port, after connecting the server serial port with the target external serial port, the serial port connection method may include:
and recording the connection event of the server serial port through the single board management system.
Due to the fact that the number of the serial ports of the server and/or the number of the external serial ports are possibly large, errors occur in the data transmission process, and debugging of the server is affected. Therefore, every connection of the server serial port can be recorded, so that when a user subsequently manages the server serial port, the server serial port can be tracked and traced in real time, and the manageability of the server serial port is improved.
According to the method and the device, the input signal of the external serial port is obtained, the target input signal is determined from the input signal, the target external serial port corresponding to the target input signal is determined based on the target input signal, and finally the server serial port is connected with the target external serial port. The method can be used for timely connecting the external serial port with data transmission, so that the efficiency and the timeliness of the connection between the server serial port and the external serial port are improved.
Furthermore, when a plurality of target external serial ports are to be connected and the number of available server serial ports cannot meet the connection requirement, the target external serial ports can be connected according to the preset priority of the target external serial ports so as to improve the reliability of important data transmission.
Further, if a switching instruction of the board management system is received, the switching instruction of the board management system is preferentially satisfied. In the switching process, if the number of the external serial ports to be connected is larger than that of the available server serial ports, the server serial ports to be switched can be determined according to the preset priority level of the connected target external serial ports, and therefore the reliability of important data transmission is improved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
For convenience of understanding, the serial port connection method proposed in the embodiments of the present application is described below in a practical application scenario.
Fig. 2 shows a serial port switching method in a specific application scenario. The server serial port comprises a single board management system serial port and a system serial port, and the two serial ports can pass through a Field-Programmable Gate Array (FPGA) or a Complex Programmable Logic Device (CPLD). The CPLD/FPGA is internally provided with a data selector (MUX) which is used for taking any one path as a current data transmission line according to the requirement in the process of multi-path data transmission. After the single board management system serial port and the system serial port pass through the data selector, the serial port and the system serial port can be multiplexed to an external serial port. Such as the front panel serial port, the back panel serial port, and the SOL remote serial port shown in the figure. The data selector may be provided in two, such as a first data selector and a second data selector in the illustration. The first data selector can default to output a system serial port, and can also be set through the single board management system and configured as a troubleshooting serial port of the single board management system.
The second data selector may be configured in an intelligent switching mode. In the mode, the CPLD/FPGA detects input signals by acquiring the input signals of a front panel serial port, a rear panel serial port and an SOL remote serial port, and determines whether a target input signal exists. If the TTL level signal of the front panel serial port is detected to jump from high level to low level, the front panel serial port is indicated to have data transmission, and the second data selector can connect the currently available server serial port to the front panel serial port. After connection, if no jump of the TTL level signal of the front panel serial port is detected within a preset time period, the fact that the front panel serial port has no data transmission is indicated, and the second data selector can switch the server serial port connected with the front panel serial port to other external serial ports with data transmission. However, if other external serial ports with data transmission are not detected temporarily, the switching can be temporarily not performed until other external serial ports with data transmission are detected, and then the server serial port is switched to the other external serial ports with data transmission.
Fig. 3 shows a block diagram of a serial port connection device 3 provided in the embodiment of the present application, which corresponds to the serial port connection method described in the foregoing embodiment, and only shows portions related to the embodiment of the present application for convenience of description.
Referring to fig. 3, the serial port connection device 3 includes:
an obtaining module 301, configured to obtain an input signal of each external serial port;
the first detection module 302 is configured to detect whether a target input signal exists in the input signal, where the target input signal is used to indicate that a target external serial port has data transmission, and the target external serial port is an external serial port corresponding to the target input signal;
the first connection module 303 is configured to connect the server serial port with a target external serial port if the target input signal exists.
Optionally, the first detecting module 302 may include:
the judging unit is used for judging whether the input signal has a jumping input signal or not;
and the determining unit is used for determining the input signal which jumps as the target input signal if the input signal which jumps exists.
Optionally, the first connection module 303 may include:
the first detection unit is used for detecting whether the number of the target input signals is greater than that of the server serial ports;
and the first connecting unit is used for sequentially connecting the server serial ports with the target external serial ports according to the preset priority of the target external serial ports if the number of the target input signals is greater than that of the server serial ports.
Optionally, the serial port connection device 3 may further include:
the second detection module is used for detecting whether a new target input signal exists or not if the target input signal is converted into a non-target input signal within a preset time period;
and the second connecting module is used for switching and connecting the server serial port to a new target external serial port if a new target input signal exists, wherein the new target external serial port is an external serial port corresponding to the new target input signal.
Optionally, the serial port connection device 3 may further include:
the determining module is used for determining a serial port of a server to be switched and an external serial port to be connected according to a switching instruction if the switching instruction of the single board management system is received;
and the third connecting module is used for connecting the serial port of the server to be switched to the external serial port to be connected.
Optionally, the determining module may include:
the second detection unit is used for detecting whether an unconnected server serial port exists or not;
the second determining unit is used for determining the serial port of the server to be switched according to the preset priority of each target external serial port if the unconnected serial port of the server does not exist;
and the third determining unit is used for determining the external serial port to be connected according to the switching instruction.
Optionally, the serial port connection device 3 may further include:
and the recording module is used for recording the connection event of the server serial port through the single board management system.
It should be noted that, for the information interaction and execution process between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the method embodiment of the present application, and thus reference may be made to the method embodiment section for details, which are not described herein again.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 4, the electronic apparatus 4 of this embodiment includes: at least one processor 40 (only one is shown in fig. 4), a memory 41, and a computer program 42 stored in the memory 41 and operable on the at least one processor 40, wherein when the computer program 42 is executed by the processor 40, the steps in any of the embodiments of the serial port connection method described above are implemented, for example, the step 101 and the step 103 shown in fig. 1.
The Processor 40 may be a Central Processing Unit (CPU), and the Processor 40 may be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 41 may in some embodiments be an internal storage unit of the electronic device 4, such as a hard disk or a memory of the electronic device 4. The memory 41 may also be an external storage device of the electronic device 4 in other embodiments, such as a plug-in hard disk provided on the electronic device 4, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and so on. Further, the memory 41 may also include both an internal storage unit of the terminal device 4 and an external storage device. The memory 41 is used for storing an operating device, an application program, a BootLoader (BootLoader), data, and other programs, such as program codes of a computer program. The memory 41 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the above-mentioned method embodiments.
The embodiments of the present application provide a computer program product, which when running on a mobile terminal, enables the mobile terminal to implement the steps in the above method embodiments when executed.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing apparatus/electronic device, a recording medium, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other ways. For example, the above-described apparatus/network device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A serial port connection method is characterized by comprising the following steps:
acquiring input signals of each external serial port;
detecting whether a target input signal exists in the input signals, wherein the target input signal is used for indicating that a target external serial port has data transmission, and the target external serial port is an external serial port corresponding to the target input signal;
and if the target input signal exists, connecting a server serial port with the target external serial port.
2. The serial port connection method according to claim 1, wherein the detecting whether the target input signal exists in the input signals comprises:
judging whether a jump input signal exists in the input signal;
and if the jumping input signal exists, determining the jumping input signal as the target input signal.
3. The serial port connection method according to claim 1, wherein if the target input signal exists, connecting a server serial port with the target external serial port comprises:
detecting whether the number of the target input signals is larger than that of the server serial ports;
and if the number of the target input signals is larger than that of the server serial ports, sequentially connecting the server serial ports with the target external serial ports according to the preset priority of the target external serial ports.
4. The serial port connection method according to any one of claims 1 to 3, further comprising, after connecting the server serial port with the target external serial port:
within a preset time period, if the target input signal is converted into a non-target input signal, detecting whether a new target input signal exists;
and if the new target input signal exists, switching and connecting the serial port of the server to a new target external serial port, wherein the new target external serial port is an external serial port corresponding to the new target input signal.
5. The serial port connection method according to any one of claims 1 to 3, further comprising, after connecting the server serial port with the target external serial port:
if a switching instruction of the single board management system is received, determining a serial port of a server to be switched and an external serial port to be connected according to the switching instruction;
and connecting the serial port of the server to be switched to the external serial port to be connected.
6. The serial port connection method according to claim 5, wherein the determining the serial port of the server to be switched and the external serial port to be connected according to the switching instruction comprises:
detecting whether an unconnected server serial port exists;
if the unconnected server serial port does not exist, determining the server serial port to be switched according to the preset priority of each target external serial port;
and determining the external serial port to be connected according to the switching instruction.
7. The serial port connection method according to any one of claims 1 to 3, further comprising, after connecting the server serial port with the target external serial port:
and recording the connection event of the server serial port through the single board management system.
8. A serial port connecting device, comprising:
the acquisition module is used for acquiring input signals of each external serial port;
the first detection module is used for detecting whether a target input signal exists in the input signals, the target input signal is used for indicating that data transmission exists in a target external serial port, and the target external serial port is an external serial port corresponding to the target input signal;
and the first connection module is used for connecting the server serial port with the target external serial port if the target input signal exists.
9. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the serial port connection method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, implements the serial port connection method according to any one of claims 1 to 7.
CN202110750686.6A 2021-07-01 2021-07-01 Serial port connection method, serial port connection device and electronic equipment Pending CN113656222A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110750686.6A CN113656222A (en) 2021-07-01 2021-07-01 Serial port connection method, serial port connection device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110750686.6A CN113656222A (en) 2021-07-01 2021-07-01 Serial port connection method, serial port connection device and electronic equipment

Publications (1)

Publication Number Publication Date
CN113656222A true CN113656222A (en) 2021-11-16

Family

ID=78489877

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110750686.6A Pending CN113656222A (en) 2021-07-01 2021-07-01 Serial port connection method, serial port connection device and electronic equipment

Country Status (1)

Country Link
CN (1) CN113656222A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201516662A (en) * 2013-10-30 2015-05-01 Hon Hai Prec Ind Co Ltd Switching device and detecting system
CN109101354A (en) * 2017-06-20 2018-12-28 深圳中电长城信息安全系统有限公司 A kind of monitoring method and its device of fault message
CN109891400A (en) * 2019-01-24 2019-06-14 深圳市汇顶科技股份有限公司 Method, apparatus and storage medium based on SPI asynchronous process event
CN109902014A (en) * 2019-02-28 2019-06-18 苏州浪潮智能科技有限公司 A kind of server system shares method, apparatus, controlled terminal and the storage medium of serial ports
CN110597749A (en) * 2019-08-23 2019-12-20 锐捷网络股份有限公司 Serial port switching method and device
CN111064780A (en) * 2017-03-01 2020-04-24 贵州白山云科技股份有限公司 Multitask content updating method, device, equipment and medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201516662A (en) * 2013-10-30 2015-05-01 Hon Hai Prec Ind Co Ltd Switching device and detecting system
CN111064780A (en) * 2017-03-01 2020-04-24 贵州白山云科技股份有限公司 Multitask content updating method, device, equipment and medium
CN109101354A (en) * 2017-06-20 2018-12-28 深圳中电长城信息安全系统有限公司 A kind of monitoring method and its device of fault message
CN109891400A (en) * 2019-01-24 2019-06-14 深圳市汇顶科技股份有限公司 Method, apparatus and storage medium based on SPI asynchronous process event
CN109902014A (en) * 2019-02-28 2019-06-18 苏州浪潮智能科技有限公司 A kind of server system shares method, apparatus, controlled terminal and the storage medium of serial ports
CN110597749A (en) * 2019-08-23 2019-12-20 锐捷网络股份有限公司 Serial port switching method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ARUN KUMAR JADHAV .ETAL: "Optimization of the performance of high speed serial communication", IEEE, 21 June 2018 (2018-06-21) *
王春媚: "多串口并行通信数据传输系统设计", 现代电子技术, no. 04, 28 February 2017 (2017-02-28) *

Similar Documents

Publication Publication Date Title
CN108923957B (en) Distribution network terminal DTU fault elimination method and device and terminal equipment
CN109582655B (en) Method and device for positioning system log and computer readable storage medium
CN108683528B (en) Data transmission method, central server, server and data transmission system
CN111050310A (en) Network switching method, device, terminal equipment and medium
CN108712308B (en) Method and device for detecting network equipment in virtual network
CN112732982A (en) Fault code storage method and device, terminal equipment and readable storage medium
CN109446145A (en) A kind of channel server master board I2C extended chip, circuit and control method
CN115550291A (en) Reset system and method for switch, storage medium, and electronic device
CN101667953B (en) Reporting method of rapid looped network physical link state and device therefor
CN111200653B (en) Multi-platform communication method, multi-platform communication device and intermediate server
CN112822087A (en) Data distinguishing method, data distinguishing device, router and network relay equipment
CN113656222A (en) Serial port connection method, serial port connection device and electronic equipment
CN115623464B (en) Fault processing method and device for Bluetooth module of electric energy meter and electric energy meter
CN107731154B (en) LED display screen data backup device and method and terminal equipment
CN115729872A (en) Computing device and detection method for PCIE cable connection
CN115202949A (en) Chip signal monitoring device and method, computer equipment and storage medium
CN109783286A (en) Built-in test method, test device and terminal device and storage medium
CN115643160A (en) Data acquisition method, device, equipment and medium based on daisy chain communication
CN113873026A (en) Dynamic timeout response method, device, terminal equipment and storage medium
CN112947955B (en) Architecture updating method and device of application program, electronic equipment and storage medium
CN110417461B (en) Optical cable positioning method and device for multiple fault points and terminal equipment
CN109191701B (en) Power metering method, system and server
CN110837450B (en) Test method and device of USB TYPE-C docking station, electronic equipment and storage medium
CN110876852B (en) Network game data processing method and system for micro-service
CN113300909A (en) Parallel operation UPS communication abnormity detection method and device and parallel operation UPS system

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