Communication switching method and system, electronic equipment and storage medium

Through the combination of the communication switching control module and the data input channel switching module, the connection difficulties and error problems caused by the increase in the number of debugging serial ports are solved, efficient and accurate data transmission and debugging are achieved, and the serial port debugging process is simplified.

CN119105991APending Publication Date: 2024-12-10NETTRIX INFORMATION IND CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310673382.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-07
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

In the prior art, as the number of debugging serial ports increases, it is difficult to determine the actual corresponding object of each serial port connector, which may lead to incorrect connection and data transmission errors, reducing debugging efficiency.

Method used

The communication switching control module obtains candidate switching data from the target serial port connector, selects the target switching data, and accurately passes the debugging data to the target debug receiving object through the data input channel switching module, converts the data using edge triggering method, and according to the output level Type switch data channels, and use complex programmable logic devices to build switching modules.

Benefits of technology

It improves the accuracy and efficiency of data transmission, avoids channel switching errors and data output chaos, simplifies the serial debugging process, and reduces costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119105991A_ABST
    Figure CN119105991A_ABST
Patent Text Reader

Abstract

The invention discloses a communication switching method and system, electronic equipment and a storage medium. The method comprises the steps of determining target switching data in candidate switching data transmitted by a target serial port connector through a communication switching control module, and determining a target debugging receiving object from at least two candidate debugging receiving objects according to the target switching data; and switching a target data input channel associated with the target debugging receiving object to a conducting state through a data input channel switching module, and transmitting debugging data in the candidate switching data to the target debugging receiving object through the target data input channel. By running the technical scheme provided by the embodiment of the invention, the problems that in the prior art, a corresponding serial port connector is arranged for each debugging serial port, data interaction is carried out through the serial port connectors and the debugging serial ports, and due to the fact that the models of the serial port connectors are not uniform, the connection difficulty is possibly increased can be solved; and the serial port debugging accuracy and efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to communication technology, and in particular to a communication switching method, system, electronic equipment and storage medium. Background Art

[0002] In devices such as servers, debug serial ports such as Universal Asynchronous Receiver / Transmitter (UART) serial port and Inter-Integrated Circuit (I2C) serial port are usually set up to perform corresponding debugging operations on the device through the debug serial port.

[0003] In the prior art, a corresponding serial port connector is usually set for each debug serial port, so as to exchange data with the debug serial port through the serial port connector. However, as the number of debug serial ports increases, it is difficult to determine the debug serial port that each serial port connector actually corresponds to, which may result in connecting to the wrong serial port connector during debugging; and because the models of the serial port connectors are not uniform, it may increase the difficulty of connection and reduce the debugging efficiency. Summary of the invention

[0004] The present invention provides a communication switching method, system, electronic equipment and storage medium to improve the accuracy and efficiency of serial port debugging.

[0005] According to one aspect of the present invention, a communication switching method is provided, the method comprising:

[0006] Obtaining candidate switching data of a debugging initiating object from a target serial port connector through a communication switching control module, selecting target switching data belonging to a switching command from the candidate switching data, and determining a target debugging receiving object from at least two candidate debugging receiving objects according to the target switching data;

[0007] Through the data input channel switching module, a target data input channel associated with the target debugging receiving object is selected from the candidate data input channels included in the data input channel switching module, and the target data input channel is switched to an on state; and the debugging data of the debugging initiating object is obtained from the target serial port connector to pass the debugging data to the target debugging receiving object through the target data input channel.

[0008] Optionally, selecting target switching data belonging to the switching command from the candidate switching data includes:

[0009] The candidate switching data is converted into a preset coding format by a data conversion unit in the communication switching control module to obtain coded data;

[0010] The data identification unit in the communication switching control module determines the target data set from the encoded data according to the preset data position and the preset data bit number, and determines the target switching data according to at least two consecutive target data sets and the switching command.

[0011] The advantages of such a setting are: the candidate switching data is converted into a preset coding format to obtain coded data; the target data set is determined from the coded data according to the preset data position and the preset data bit number, so as to obtain valid data in the candidate switching data according to a specific data mode, thereby avoiding the target data set acquisition error caused by data omission or error during the transmission process, and improving the accuracy and effectiveness of data transmission. The target switching data is determined according to at least two consecutive target data sets and the switching command, thereby avoiding misidentification of other data in the candidate switching data as the target switching data, resulting in channel switching errors, thereby improving the accuracy of channel switching.

[0012] Optionally, converting the candidate switching data into a preset coding format includes:

[0013] The candidate switching data is converted into the preset coding format in an edge-triggered manner.

[0014] The advantage of such a setting is that in the prior art, a coding conversion method that is consistent with the baud rate of the transmitted data is usually set for different target debugging receiving objects, such as performing data conversion at preset intervals, etc. However, the baud rates corresponding to different target debugging receiving objects may be different. If data conversion is still performed at a uniform time interval, it may cause errors such as conversion omissions, thereby reducing the accuracy of coded data acquisition. By adopting an edge-triggered method to convert candidate switching data into a preset coding format, data conversion can be performed during data transmission at different baud rates, thereby improving the applicability and accuracy of data conversion.

[0015] Optionally, switching a target data input channel associated with the target debugging receiving object to an on state includes:

[0016] Acquire, from the communication switching control module, a level type of an output level determined according to the target debugging receiving object;

[0017] According to the level type, the target data input channel is determined, and the target data input channel is switched to a conducting state.

[0018] The advantage of such a setting is that: according to the level type of the output level of the communication switching control module, the target data input channel is determined, and the target data input channel is switched to the on state. Different target data input channels can be switched through different output levels, and there is no need to connect different serial port connectors to realize data input for different debugging receiving objects, thereby improving the switching efficiency of the data input channel; and when the data input channels are increased or decreased, the structure of the data input channel switching module can be directly changed accordingly, thereby improving the convenience of changes.

[0019] Optionally, also include:

[0020] Obtaining, from the communication switching control module, through the data output channel switching module, the level type of the output level determined according to the target debugging receiving object;

[0021] According to the level type, selecting a target data output channel associated with the target debugging receiving object from candidate data input channels included in the data output channel switching module, and switching the target data output channel to a conducting state;

[0022] The output data of the target debugging receiving object is transferred from the target serial port connector to the debugging initiating object through the target data output channel.

[0023] The advantage of this arrangement is that the output data of the target debugging receiving object is returned to the debugging initiating object through the data output channel switching module, thereby realizing data interaction between the target debugging receiving object and the debugging initiating object; and because when the target debugging object returns data, it is output only through the turned-on target data output channel, thereby avoiding the problem of data output confusion caused by the inability to identify the debugging receiving object corresponding to the output data due to too many debugging receiving objects, thereby improving the orderliness of data output.

[0024] Optionally, the target serial port connector is connected to the communication switching control module via a cable.

[0025] The advantage of this setting is that the target serial port connector is connected to the communication switching control module through a cable, and the target serial port connector can be set at a suitable position to facilitate the connection between the debugging initiator object and the target serial port connector. This solves the problem that most existing serial port connectors are on-board. If they are in a closed chassis, the chassis needs to be opened when connecting to them, which increases the difficulty of serial port debugging, and improves the convenience of serial port debugging.

[0026] Optionally, the communication switching control module and the data input channel switching module are constructed based on a complex programmable logic device associated with the target debugging receiving object.

[0027] The advantage of this setting is that the communication switching control module and the data input channel switching module are set up using existing complex programmable logic devices, without adding additional chips and other components, thereby reducing the cost of serial port debugging, and the complex programmable logic device is associated with the target debugging receiving object, so there is no need to establish the association relationship between the communication switching control module and the data input channel switching module and the target debugging receiving object from scratch, thereby improving the efficiency of constructing the communication switching control module and the data input channel switching module.

[0028] According to another aspect of the present invention, there is provided a communication switching system, the communication switching system comprising:

[0029] a communication switching control module, configured to obtain candidate switching data of a debugging initiating object from a target serial port connector, select target switching data belonging to a switching command from the candidate switching data, and determine a target debugging receiving object from at least two candidate debugging receiving objects according to the target switching data;

[0030] A data input channel switching module is used to select a target data input channel associated with the target debugging receiving object from the candidate data input channels included in the data input channel switching module, and switch the target data input channel to a conducting state; and obtain the debugging data of the debugging initiating object from the target serial port connector, so as to pass the debugging data to the target debugging receiving object through the target data input channel.

[0031] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0032] at least one processor; and

[0033] a memory communicatively connected to the at least one processor; wherein,

[0034] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the communication switching method described in any embodiment of the present invention.

[0035] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the communication switching method described in any embodiment of the present invention when executed.

[0036] The technical solution of the embodiment of the present invention is to obtain target switching data from a single target serial port connector through a communication switching control module, and determine the target debugging receiving object that needs to receive debugging data from at least two candidate debugging receiving objects; through a data input channel switching module, the debugging data obtained from a single target serial port connector is accurately transmitted to the corresponding target debugging receiving object through the conductive target data input channel, so that when the number of candidate debugging receiving objects is greater than or equal to two, the target debugging receiving object can obtain debugging data through a single target serial port connector, and solve the problem that a corresponding serial port connector is set for each debugging receiving object to perform data interaction with the debugging receiving object through the serial port connector, which may increase the difficulty of connection due to the non-uniform models of each serial port connector. And solve the problem that as the number of debugging serial ports increases, it is difficult to determine the debugging receiving object actually corresponding to each serial port connector, which may result in the need to find the corresponding serial port connector during debugging, which wastes debugging time, and may connect to the wrong serial port connector, resulting in data transmission errors; improve the accuracy and efficiency of debugging data transmission, thereby improving the accuracy and efficiency of serial port debugging.

[0037] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 A flow chart of a communication switching method provided in Embodiment 1 of the present invention;

[0039] Figure 2 A schematic diagram of the structure of a data input channel switching module provided in Embodiment 1 of the present invention;

[0040] Figure 3 A flow chart of a communication switching method provided in Embodiment 2 of the present invention;

[0041] Figure 4 A schematic diagram of the structure of a communication switching system provided in Embodiment 3 of the present invention;

[0042] Figure 5 It is a schematic diagram of the structure of an electronic device used to implement an embodiment of the present invention. DETAILED DESCRIPTION

[0043] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0044] It should be noted that the terms "first", "second", "target", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0045] Embodiment 1

[0046] Figure 1 This is a flow chart of a communication switching method provided in Embodiment 1 of the present invention. This embodiment is applicable to the case of switching serial port communication. The method can be executed by the communication switching system provided in the embodiment of the present invention. The device can be implemented by software and / or hardware. Figure 1 , the communication switching method provided in this embodiment includes:

[0047] Step 110: Obtain candidate switching data of the debug initiating object from the target serial port connector through the communication switching control module, select target switching data belonging to the switching command from the candidate switching data, and determine the target debug receiving object from at least two candidate debug receiving objects according to the target switching data.

[0048] The target serial port connector is a serial port connector for receiving candidate switching data, and its model is, for example, type-c, which is not limited in this embodiment. The candidate switching data is data inputted into the communication switching control module by the debugging initiating object through the target serial port connector, and the debugging initiating object can be a terminal side device such as a mobile phone, a tablet computer, a laptop computer, etc., which is not limited in this embodiment.

[0049] The target serial port connector passes the candidate switching data to the communication switching module, and the communication switching module determines the target switching data belonging to the switching command from the candidate switching data, wherein the candidate switching data is all the data input by the debugging initiating object to the communication switching control module, and the target switching data is the data belonging to the switching command in the candidate switching data. The switching command is used to determine the data input channel required to be switched, and the data input channel is used to transmit the debugging data in the candidate switching data to the target debugging receiving object; the debugging receiving object is the object that needs to be debugged, such as the baseboard management controller, integrated south bridge, etc. in the server.

[0050] The candidate debugging receiving objects may be all debugging receiving objects that have been pre-counted, and the target debugging receiving object may be the debugging receiving object that currently needs to be debugged. For example, the candidate debugging receiving objects may include a baseboard management controller and an integrated south bridge. If the target switching data indicates that the switching command requires switching the data input channel to a state connected to the baseboard management controller, then the target debugging object may be the baseboard control manager.

[0051] Optionally, the target serial port connector is connected to the communication switching control module via a cable.

[0052] Exemplarily, if the target debugging receiving object is located in a closed chassis, the communication switching control module may also be located in the closed chassis, and the target serial port connector is connected to the communication switching control module via a cable and may be located outside the closed chassis.

[0053] The advantage of this setting is that the target serial port connector is connected to the communication switching control module through a cable, and the target serial port connector can be set at a suitable position to facilitate the connection between the debugging initiator object and the target serial port connector. This solves the problem that most existing serial port connectors are on-board. If they are in a closed chassis, the chassis needs to be opened when connecting to them, which increases the difficulty of serial port debugging, and improves the convenience of serial port debugging.

[0054] Step 120: select a target data input channel associated with a target debugging receiving object from candidate data input channels included in the data input channel switching module through the data input channel switching module, and switch the target data input channel to an on state; and obtain debugging data of the debugging initiating object from the target serial port connector to pass the debugging data to the target debugging receiving object through the target data input channel.

[0055] The target data input channel is a data transmission channel that can transmit debug data to the target debug receiving object, and the candidate data input channels can be all data input channels included in the data input channel switching module. The data input channel connected to the debug serial port of the target debug receiving object among the candidate data input channels can be determined as the target data input channel. Among them, the debug serial port is an interface provided by the debug receiving object for interactive operations such as debugging, and can be a UART serial port, which is not limited in this embodiment; illustratively, the baseboard control manager provides a UART serial port for collecting on-chip operation logs and on-chip debugging, and the integrated south bridge provides a UART serial port for outputting diagnostic information during system startup.

[0056] After the target data input channel is switched to the on state, the data input channel switching module can directly obtain the debugging data sent by the debugging initiator from the target serial port connector, that is, the debugging data does not need to pass through the communication switching control module, thereby improving the efficiency and pertinence of debugging data transmission.

[0057] The data input channel switching module transmits the debugging data to the target debugging receiving object through the target data input channel, wherein the debugging data is data used to perform debugging operations on the debugging receiving object, such as on-chip debugging commands for the substrate control manager, etc. This embodiment does not limit this.

[0058] Optionally, switching a target data input channel associated with the target debug receiving object to an on state includes:

[0059] Acquire the level type of the output level determined according to the target debugging receiving object from the communication switching control module;

[0060] A target data input channel is determined according to the level type, and the target data input channel is switched to an on state.

[0061] The communication switching control module determines the corresponding output level according to the target debugging receiving object, and the output level type can be high level or low level; determines the target data input channel according to the level type, and illustratively, when the level type is high level, determines channel 1 as the target data input channel; when the level type is low level, determines channel 2 as the target data input channel. And switches the target data input channel to the on state.

[0062] Figure 2 A schematic diagram of the structure of a data input channel switching module provided in the first embodiment of the present invention is shown in FIG. Figure 2As shown, the data input channel switching module is a 1-to-2 bidirectional selection switch, which inputs the output level of the communication switching control module to the selection end SEL of the data input channel switching module, so that the data input channel switching module switches the selection of the data input channel IO_0 or the data input channel IO_1 according to the level type. For example, when the SEL end receives a high level, the input-output end IO connects the switch to S1, that is, the data input channel IO_1 is selected. When the SEL end receives a low level, the IO end connects the switch to S0, that is, the data input channel IO_0 is selected.

[0063] The advantage of such a setting is that: according to the level type of the output level of the communication switching control module, the target data input channel is determined, and the target data input channel is switched to the on state. Different target data input channels can be switched through different output levels, and there is no need to connect different serial port connectors to realize data input for different debugging receiving objects, thereby improving the switching efficiency of the data input channel; and when the data input channels are increased or decreased, the structure of the data input channel switching module can be directly changed accordingly, thereby improving the convenience of changes.

[0064] Optionally, also include:

[0065] Obtaining the level type of the output level determined according to the target debugging receiving object from the communication switching control module through the data output channel switching module;

[0066] According to the level type, a target data output channel associated with the target debugging receiving object is selected from the candidate data input channels included in the data output channel switching module, and the target data output channel is switched to a conducting state;

[0067] The output data of the target debugging receiving object is transferred from the target serial port connector to the debugging initiating object through the target data output channel.

[0068] The target data output channel is a data transmission channel that can transmit the output data of the target debugging receiving object to the target debugging receiving object. The candidate data output channels can be all the data output channels included in the data output channel switching module. The data output channel connected to the debugging serial port of the target debugging receiving object among the candidate data output channels can be determined as the target data input channel. The data output channel switching module switches the target data output channel to the on state to return the output data to the debugging initiating object via the target serial port connector. Among them, the output data can be the feedback data after the target debugging receiving object obtains the debugging data, or it can be the data that the target debugging receiving object actively sends to the debugging initiating object, and this embodiment does not limit this.

[0069] The level type of the output level determined according to the target debug receiving object can be the level type determined when the target data input channel associated with the target debug receiving object is switched to the on state, that is, the target data input channel and the target data output channel can be simultaneously determined and turned on by determining a single level type.

[0070] The structure of the data output channel switching module may be the same as that of the data input channel switching module, which is not limited in this embodiment.

[0071] The advantage of this arrangement is that the output data of the target debugging receiving object is returned to the debugging initiating object through the data output channel switching module, thereby realizing data interaction between the target debugging receiving object and the debugging initiating object; and because when the target debugging object returns data, it is output only through the turned-on target data output channel, thereby avoiding the problem of data output confusion caused by the inability to identify the debugging receiving object corresponding to the output data due to too many debugging receiving objects, thereby improving the orderliness of data output.

[0072] Optionally, the communication switching control module and the data input channel switching module are constructed based on a complex programmable logic device associated with the target debugging receiving object.

[0073] The CPLD may be a pre-set CPLD that can be associated with a target debugging receiving object. For example, if the target debugging receiving object is a baseboard management controller in a server, the CPLD may be a CPLD in the server.

[0074] By setting up a communication switching control module and a data input channel switching module through a complex programmable logic device, the communication switching control module and the data input channel switching module can be constructed by using some existing components in the complex programmable logic device, for example, a data input channel switching module can be constructed by using a bidirectional selection switch.

[0075] The advantage of this setting is that the communication switching control module and the data input channel switching module are set up using existing complex programmable logic devices, without adding additional chips and other components, thereby reducing the cost of serial port debugging, and the complex programmable logic device is associated with the target debugging receiving object, so there is no need to establish the association relationship between the communication switching control module and the data input channel switching module and the target debugging receiving object from scratch, thereby improving the efficiency of constructing the communication switching control module and the data input channel switching module.

[0076] The technical solution provided in this embodiment is to obtain target switching data from a single target serial port connector through a communication switching control module, and determine the target debugging receiving object that needs to receive debugging data from at least two candidate debugging receiving objects; through a data input channel switching module, the debugging data obtained from a single target serial port connector is accurately transmitted to the corresponding target debugging receiving object through the conductive target data input channel, so that when the number of candidate debugging receiving objects is greater than or equal to two, the target debugging receiving object can obtain debugging data through a single target serial port connector, and solve the problem that a corresponding serial port connector is set for each debugging receiving object to interact with the debugging receiving object through the serial port connector, which may increase the difficulty of connection due to the non-uniform models of each serial port connector. And solve the problem that as the number of debugging serial ports increases, it is difficult to determine the debugging receiving object actually corresponding to each serial port connector, which may result in the need to find the corresponding serial port connector during debugging, which wastes debugging time, and may be connected to the wrong serial port connector, resulting in data transmission errors; improve the accuracy and efficiency of debugging data transmission, thereby improving the accuracy and efficiency of serial port debugging.

[0077] Embodiment 2

[0078] Figure 3 This is a flow chart of a communication switching method provided in Embodiment 2 of the present invention. This technical solution is to supplement the process of determining target switching data from candidate switching data transmitted by a target serial port connector, and determining a target debugging receiving object from at least two candidate debugging receiving objects according to the target switching data. Compared with the above solution, this solution is specifically optimized to select target switching data belonging to a switching command from candidate switching data, including:

[0079] The candidate switching data is converted into a preset coding format by a data conversion unit in the communication switching control module to obtain coded data;

[0080] The data identification unit in the communication switching control module determines the target data set from the coded data according to the preset data position and the preset data bit number, and determines the target switching data according to at least two consecutive target data sets and the switching command. Specifically, the flowchart of the communication switching method is as follows: Figure 3 As shown:

[0081] Step 310: The candidate switching data is converted into a preset coding format by a data conversion unit in the communication switching control module to obtain coded data.

[0082] The data conversion unit converts the candidate switching data into a preset coding format, such as a coding format in which the samples are 0 or 1, and can be stored in a dedicated register.

[0083] Optionally, before converting the candidate switching data into a preset coding format, the data conversion unit may also perform clock synchronization and filtering on the candidate switching data to obtain valid candidate switching data, thereby improving the accuracy and efficiency of subsequent candidate switching data processing.

[0084] Optionally, converting the candidate switching data into a preset coding format includes:

[0085] The candidate switching data is converted into a preset encoding format by using an edge-triggered method.

[0086] The candidate switching data is converted into a preset coding format by edge triggering, that is, the data is sampled and converted into the corresponding coding format when the candidate switching data changes. For example, when the candidate switching data is at a high level, the sample is 1, if it does not change, it remains 1, and if it changes, it is sampled as 0.

[0087] The advantage of such a setting is that in the prior art, a coding conversion method that is consistent with the baud rate of the transmitted data is usually set for different target debugging receiving objects, such as performing data conversion at preset intervals, etc. However, the baud rates corresponding to different target debugging receiving objects may be different. If data conversion is still performed at a uniform time interval, it may cause errors such as conversion omissions, thereby reducing the accuracy of coded data acquisition. By adopting an edge-triggered method to convert candidate switching data into a preset coding format, data conversion can be performed during data transmission at different baud rates, thereby improving the applicability and accuracy of data conversion.

[0088] Step 320: determine the target data set from the encoded data according to the preset data position and the preset data bit number through the data identification unit in the communication switching control module, and determine the target switching data according to at least two consecutive target data sets and the switching command.

[0089] The data identification unit can determine the preset data position and the preset data bit number according to the definition of the serial asynchronous communication protocol, wherein the preset data position is used to determine the meaning of the location of the acquired data, and the preset data bit number is used to determine the number of data bits contained in each data position. For example, according to the definition, each character corresponds to one data start bit, seven bits of valid data, one parity bit and one data stop bit, etc., then every ten bits of encoded data can be converted into a corresponding character after judging the start and end bits, checking the parity bit and other processes, wherein the valid data is the data that needs to be extracted, and all valid data constitute the target data set.

[0090] Exemplarily, the obtained coded data is 01000000101, where the target data set is 1000001. Automatically filling in zeros can obtain 01000001, converting the target data set into decimal to obtain 65, and converting it according to the ASCII value to obtain the character A. According to this conversion method, the characters corresponding to each target data set can be obtained.

[0091] The target switching data is determined according to at least two continuous target data sets and the switching command. For example, if the continuously extracted target data sets are 0010 0110 and 0100 0010, then the string formed by the continuous target data sets can be determined to be &B; if the continuously extracted target data sets are 0010 0110 and 0100 0001, then the string formed by the continuous target data sets can be determined to be &A. The string is compared with the value associated with the switching command to determine the target switching data. For example, the value &B indicates that the switching command is to switch to the baseboard control manager, and the value &A indicates that the switching command is to switch to the integrated south bridge. When the string is &A, it is determined that the candidate switching data corresponding to &A is the target switching data belonging to the switching command, and the switching command is to switch to the integrated south bridge. Correspondingly, when the string is &Q, since there is no corresponding value associated with the switching command, the candidate switching data corresponding to &Q is the data that does not belong to the switching command in the candidate switching data.

[0092] Optionally, the candidate switching data can be input through a keyboard combination key of the debugging initiator object without the need for input in the form of a dip switch or a jumper, thereby improving the convenience of data input and the convenience of serial port debugging.

[0093] Step 330: Switch the target data input channel associated with the target debugging receiving object to an on state through the data input channel switching module, and transfer the debugging data in the candidate switching data to the target debugging receiving object through the target data input channel.

[0094] The embodiment of the present invention converts candidate switching data into a preset coding format to obtain coded data; determines a target data set from the coded data according to a preset data position and a preset data bit number, thereby obtaining valid data in the candidate switching data in a specific data manner, avoiding errors in obtaining the target data set due to omission or error in the data transmission process, and improving the accuracy and effectiveness of data transmission. Determine the target switching data according to at least two consecutive target data sets and a switching command, avoiding misidentification of other data in the candidate switching data as target switching data, resulting in channel switching errors, thereby improving the accuracy of channel switching.

[0095] In order to enable those skilled in the art to more clearly understand the present solution, the embodiment of the present invention also provides a specific implementation method.

[0096] Step 1: The candidate switching data of the debugging initiation object obtained from the target serial port connector is converted into a preset coding format by a data conversion unit in the communication switching control module to obtain coded data.

[0097] The candidate switching data can be converted into a preset coding format by edge triggering. The target serial port connector is connected to the communication switching control module through a cable.

[0098] Step 2: Determine the target data set from the encoded data according to the preset data position and the preset data bit number through the data identification unit in the communication switching control module, determine the target switching data belonging to the switching command according to at least two consecutive target data sets and the switching command, and determine the target debugging receiving object according to the target switching data.

[0099] Step 3: Select a target data input channel associated with the target debug receiving object from the candidate data input channels included in the data input channel switching module through the data input channel switching module, switch the target data input channel to the on state, and obtain the debug data of the debug initiating object from the target serial port connector to pass the debug data to the target debug receiving object through the target data input channel.

[0100] The level type of the output level determined according to the target debugging receiving object is obtained from the communication switching control module; the target data input channel is determined according to the level type, and the target data input channel is switched to a conducting state.

[0101] Step 4: Obtain the level type of the output level determined according to the target debugging receiving object from the communication switching control module through the data output channel switching module; select the target data output channel associated with the target debugging receiving object from the candidate data input channels included in the data output channel switching module according to the level type, and switch the target data output channel to the on state; and pass the output data of the target debugging receiving object from the target serial port connector to the debugging initiating object through the target data output channel.

[0102] Wherein, step 3 and step 4 may be performed simultaneously, and the output level determined by the target debugging receiving object in step 3 and step 4 may be the same output level.

[0103] The communication switching control module, the data input channel switching module and the data output channel switching module are constructed based on a complex programmable logic device associated with a target debugging receiving object.

[0104] Embodiment 3

[0105] Figure 4This is a schematic diagram of the structure of a communication switching system provided in Embodiment 3 of the present invention. The system can be implemented by hardware and / or software, can execute a communication switching method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. Figure 4 As shown, the system includes:

[0106] The communication switching control module 410 is used to obtain candidate switching data of the debugging initiating object from the target serial port connector 440, select target switching data belonging to the switching command from the candidate switching data, and determine the target debugging receiving object from at least two candidate debugging receiving objects 450 according to the target switching data;

[0107] The data input channel switching module 420 selects a target data input channel associated with the target debugging receiving object from the candidate data input channels included in the data input channel switching module, and switches the target data input channel to an on state; and obtains the debugging data of the debugging initiating object from the target serial port connector 440, so as to pass the debugging data to the target debugging receiving object through the target data input channel.

[0108] On the basis of the above technical solutions, optionally, the communication switching control module 410 includes:

[0109] A data conversion unit 411 is used to convert the candidate switching data into a preset coding format to obtain coded data;

[0110] The data identification unit 412 is used to determine the target data set from the encoded data according to the preset data position and the preset data bit number, and determine the target switching data according to at least two consecutive target data sets and the switching command.

[0111] On the basis of the above technical solutions, optionally, the data conversion unit 411 is specifically used to: convert the candidate switching data into the preset coding format by edge triggering.

[0112] On the basis of the above technical solutions, optionally, the data input channel switching module 420 is specifically used to:

[0113] Acquire, from the communication switching control module, a level type of an output level determined according to the target debugging receiving object;

[0114] According to the level type, the target data input channel is determined, and the target data input channel is switched to a conducting state.

[0115] Based on the above technical solutions, optionally, the communication switching system further includes:

[0116] A data output channel switching module 430, configured to obtain from the communication switching control module a level type of an output level determined according to the target debugging receiving object;

[0117] According to the level type, selecting a target data output channel associated with the target debugging receiving object from the candidate data input channels included in the data output channel switching module, and switching the target data output channel to a conducting state;

[0118] The output data of the target debugging receiving object is transmitted from the target serial port connector 440 to the debugging initiating object through the target data output channel.

[0119] On the basis of the above technical solutions, optionally, the target serial port connector 440 is connected to the communication switching control module 410 via a cable.

[0120] like Figure 4 As shown, the target serial port connector 440 may be located outside of the enclosed chassis (shown as a dotted line).

[0121] On the basis of the above-mentioned technical solutions, optionally, the communication switching control module 410 and the data input channel switching module 420 are constructed based on a complex programmable logic device 460 associated with the target debugging receiving object.

[0122] Embodiment 4

[0123] Figure 5 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0124] like Figure 5As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0125] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0126] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a communication switching method.

[0127] In some embodiments, the communication switching method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the communication switching method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the communication switching method in any other appropriate manner (e.g., by means of firmware).

[0128] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0129] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0130] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0131] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0132] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0133] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0134] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0135] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A communication switching method, characterized in that: The method comprises: Obtaining candidate switching data of a debugging initiating object from a target serial port connector through a communication switching control module, selecting target switching data belonging to a switching command from the candidate switching data, and determining a target debugging receiving object from at least two candidate debugging receiving objects according to the target switching data; Through the data input channel switching module, a target data input channel associated with the target debugging receiving object is selected from the candidate data input channels included in the data input channel switching module, and the target data input channel is switched to an on state; and the debugging data of the debugging initiating object is obtained from the target serial port connector to pass the debugging data to the target debugging receiving object through the target data input channel.

2. The method according to claim 1, characterized in that Selecting target switching data belonging to the switching command from the candidate switching data includes: The candidate switching data is converted into a preset coding format by a data conversion unit in the communication switching control module to obtain coded data; The data identification unit in the communication switching control module determines the target data set from the encoded data according to the preset data position and the preset data bit number, and determines the target switching data according to at least two consecutive target data sets and the switching command.

3. The method according to claim 2, characterized in that Converting the candidate switching data into a preset coding format includes: The candidate switching data is converted into the preset coding format in an edge-triggered manner.

4. The method according to claim 1, characterized in that: Switching a target data input channel associated with the target debugging receiving object to an on state includes: Acquire, from the communication switching control module, a level type of an output level determined according to the target debugging receiving object; According to the level type, the target data input channel is determined, and the target data input channel is switched to a conducting state.

5. The method according to claim 1, characterized in that Also includes: Obtaining, from the communication switching control module, through the data output channel switching module, the level type of the output level determined according to the target debugging receiving object; According to the level type, selecting a target data output channel associated with the target debugging receiving object from candidate data input channels included in the data output channel switching module, and switching the target data output channel to a conducting state; The output data of the target debugging receiving object is transferred from the target serial port connector to the debugging initiating object through the target data output channel.

6. The method according to any one of claims 1 to 5, characterized in that: The target serial port connector is connected to the communication switching control module via a cable.

7. The method according to any one of claims 1 to 5, characterized in that: The communication switching control module and the data input channel switching module are constructed based on a complex programmable logic device associated with the target debugging receiving object.

8. A communication switching system, characterized in that: The system comprises: a communication switching control module, configured to obtain candidate switching data of a debugging initiating object from a target serial port connector, select target switching data belonging to a switching command from the candidate switching data, and determine a target debugging receiving object from at least two candidate debugging receiving objects according to the target switching data; A data input channel switching module is used to select a target data input channel associated with the target debugging receiving object from the candidate data input channels included in the data input channel switching module, and switch the target data input channel to a conducting state; and obtain the debugging data of the debugging initiating object from the target serial port connector, so as to pass the debugging data to the target debugging receiving object through the target data input channel.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the communication switching method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the communication switching method according to any one of claims 1 to 7 when executed.

Citation Information

Patent Citations

  • Serial-port switching device and storage equipment

    CN107908582A

  • Method and system for realizing multi-serial port switching based on CPLD, and board card

    CN110362525A

  • Shared serial port identification method and device, computer equipment and storage medium

    CN115576752A