Virtual serial port terminal system and its implementation method, device and computer storage medium

By designing a virtual serial port terminal system in the uboot environment, and using the serial port connection between the main chip and the slave chip to realize terminal interaction, the problem of the lack of virtual serial port terminal technology in the uboot environment is solved, and the login and control functions of the terminal serial port are realized.

CN114328349BActive Publication Date: 2024-09-06武汉晟企汇科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111578244.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-22
Publication Date
2024-09-06
Estimated Expiration
2041-12-22

AI Technical Summary

Technical Problem

In the uboot environment, there is a lack of universal virtual serial port terminal technology and the terminal interaction function cannot be realized.

Method used

A virtual serial port terminal system is designed, including a master chip and a slave chip, which are connected through the first terminal serial port and multiple first serial port physical links to realize the terminal interaction function in the uboot environment. The main chip contains a serial port management module and a terminal management module. The logical components include a terminal takeover/release module, a serial port initialization configuration module and a subsystem interaction module, which are used to configure and manage the serial port mode, and realize data transmission through the data orientation module and output module.

Benefits of technology

The virtual terminal function is implemented through the serial port bus in the uboot environment, allowing login and control of the terminal serial ports of other systems, solving the problem of being unable to realize the terminal interactive function.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114328349B
    Figure CN114328349B
Patent Text Reader

Abstract

The present invention discloses a virtual serial port terminal system, a method for implementing the virtual serial port terminal system, a device and a computer storage medium. The virtual serial port terminal system is applied to a uboot environment, and includes: a master chip, the master chip includes a first terminal serial port and multiple first serial port physical links, wherein the first terminal serial port is connected to multiple first serial port physical links; a slave chip, the number of the slave chips is the same as the number of the first serial port physical links, each of the slave chips includes a second terminal serial port, and each of the slave chips is connected to one of the first serial port physical links of the master chip through the second terminal serial port, so as to perform terminal interaction for the slave chip through the first terminal serial port in the uboot environment. The present invention can realize the virtual terminal function through the serial port bus in the uboot environment, thereby realizing the login and control of other terminal serial ports in the uboot environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of virtual serial port terminals, and in particular to a virtual serial port terminal system, a method for realizing the virtual serial port system, a device and a computer storage medium. Background Art

[0002] At present, virtual serial terminal technology has been widely used in Linux (full name GNU / Linux, a free and freely disseminated UNIX-like operating system) or Windows (an operating system developed by Microsoft Corporation of the United States) environment. For example, the Linux environment has serial port debugging tools such as picocom, kermit or minicom.

[0003] However, there is no universal open source implementation of virtual serial terminal technology based on uboot (Universal Boot Loader, a boot loader mainly used for embedded systems in accordance with GPL terms). Therefore, although uboot can implement serial communication functions based on uart (Universal Asynchronous Receiver / Transmitter) on some platforms, it is only limited to the implementation of serial communication commands and does not have the function of controlling the terminal to interact. Summary of the invention

[0004] The main purpose of the present invention is to provide a virtual serial port terminal system, a method for realizing the virtual serial port system, a device and a computer storage medium, aiming to solve the technical problem that there is currently no universal virtual serial port terminal technology based on uboot, and thus it is impossible to realize the terminal interaction function based on the virtual serial port terminal in the uboot environment.

[0005] To achieve the above object, the present invention provides a virtual serial port terminal system, which is applied to the uboot environment and includes:

[0006] A main chip, the main chip comprising a first terminal serial port and multiple first serial port physical links, wherein the first terminal serial port is connected to the multiple first serial port physical links;

[0007] Slave chips, the number of the slave chips is the same as the number of the first serial port physical links, each of the slave chips comprises a second terminal serial port, each of the slave chips is connected to one of the first serial port physical links of the master chip through the second terminal serial port, so as to perform terminal interaction for the slave chip through the first terminal serial port in the uboot environment.

[0008] Optionally, the main chip includes: a serial port management module and a terminal management module, wherein the serial port management module is connected to the terminal management module, the serial port management module is connected to multiple first serial port physical links, and the terminal management module is connected to the first terminal serial port.

[0009] Optionally, the serial port management module includes a logic component and a configuration component, the logic component includes: a terminal takeover / release module, a serial port initialization configuration module and a subsystem interaction module, the logic component is connected to the configuration component through the serial port initialization configuration module and the subsystem interaction module, and the logic component is connected to the terminal management module through the terminal takeover / release module.

[0010] Optionally, the slave chip also includes: multiple second serial port physical links, and the slave chip is connected to multiple new slave chips as a new master chip through the multiple second serial port physical links, wherein the number of the new slave chips is the same as the number of the second serial port material links.

[0011] In addition, to achieve the above object, the present invention also provides a method for implementing a virtual serial port terminal system, the method is applied to the virtual serial port terminal system as described above, and the method comprises the following steps:

[0012] Receiving uboot input data according to the first terminal serial port of the main chip, wherein the serial port mode of the first terminal serial port is a virtual serial port interaction mode;

[0013] Determine the target chip pointed to by the uboot input data in each of the chips, and transmit the uboot input to the second terminal serial port of the target chip;

[0014] Receive the uboot output data transmitted by the second terminal serial port, and output the uboot output data through the first terminal serial port.

[0015] Optionally, after the step of receiving uboot input data according to the first terminal serial port of the main chip, the implementation method further includes:

[0016] Determine whether the uboot input data is a preset virtual serial port exit instruction;

[0017] If yes, restoring the serial port configuration of the first terminal serial port;

[0018] If not, the step of determining the target chip pointed to by the uboot input data in each of the chips and transmitting the uboot input to the second terminal serial port of the target chip is performed.

[0019] Optionally, the implementation method further includes:

[0020] Receiving a uboot virtual serial port initialization instruction based on the first terminal serial port, and switching the serial port mode of the first terminal serial port according to the uboot virtual serial port initialization instruction;

[0021] The step of switching the serial port mode of the first terminal serial port according to the uboot virtual serial port initialization instruction includes:

[0022] Extract initialization configuration parameters from the uboot virtual serial port initialization instruction;

[0023] The serial port initialization configuration module of the main chip is called to perform initialization configuration for the first terminal serial port according to the initialization configuration parameters, so as to switch the first terminal serial port from the terminal serial port mode to the virtual serial port interaction mode.

[0024] Optionally, the implementation method further includes:

[0025] Establishing a data connection between the uboot serial port tool and the first terminal serial port;

[0026] The uboot virtual serial port initialization instruction is generated according to the uboot serial port tool, and the uboot virtual serial port initialization instruction is received through the data connection based on the first terminal serial port.

[0027] In addition, to achieve the above-mentioned purpose, the present invention further provides an implementation device of a virtual serial port terminal system, the implementation device is applied to the virtual serial port terminal system as described above, and the implementation device comprises:

[0028] An input module, used for receiving uboot input data according to the first terminal serial port of the main chip, wherein the serial port mode of the first terminal serial port is a virtual serial port interaction mode;

[0029] A data orientation module, used for determining the target chip pointed to by the uboot input data in each of the chips, and transmitting the uboot input to the second terminal serial port of the target chip;

[0030] The output module is used to receive the uboot output data transmitted by the second terminal serial port, and output the uboot output data through the first terminal serial port.

[0031] In addition, to achieve the above-mentioned purpose, the present invention also provides an implementation device of a virtual serial port terminal system, the implementation device of the virtual serial port terminal system comprising: a memory, a processor, and an implementation program of the virtual serial port terminal system stored in the memory and executable on the processor, the implementation program of the virtual serial port terminal system implementing the steps of the implementation method of the virtual serial port terminal system as described above when executed by the processor.

[0032] In addition, to achieve the above-mentioned purpose, the present invention also proposes a computer storage medium, on which a virtual serial port terminal system implementation program is stored. When the virtual serial port terminal system implementation program is executed by a processor, the steps of the implementation method of the virtual serial port terminal system as described above are implemented.

[0033] In the present invention, a master chip including a first terminal serial port and multiple first serial port physical links connected to the first terminal serial port is set in a virtual serial port system, and a number of slave chips equal to the number of the first serial port physical links is set, and each slave chip is connected to one of the first serial port physical links of the master chip through its own second terminal serial port, so as to perform terminal interaction for the slave chip through the first terminal serial port in the uboot environment. In this way, the virtual serial port system is applied in the uboot environment, and the virtual terminal function can be realized through the serial port bus in the uboot environment, so as to realize the login and control of the terminal serial ports of other systems in the uboot environment, which effectively solves the technical problem that there is no universal virtual serial port terminal technology based on uboot at present, and thus the terminal interaction function cannot be realized based on the virtual serial port terminal in the uboot environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 It is a schematic diagram of the overall architecture involved in an embodiment of a virtual serial port terminal system of the present invention;

[0035] Figure 2 A schematic diagram of a flow chart of accessing a serial port from a chip terminal according to an embodiment of a virtual serial port terminal system of the present invention;

[0036] Figure 3 This is a schematic diagram of the application design of the main chip in an embodiment of the virtual serial port terminal system of the present invention;

[0037] Figure 4 This is a schematic diagram of the application design of a serial port management module in an embodiment of a virtual serial port terminal system of the present invention;

[0038] Figure 5 A schematic diagram of an application scenario of a terminal takeover / release module in an embodiment of a virtual serial port terminal system of the present invention;

[0039] Figure 6 A schematic diagram of an application scenario of a serial port initialization module in an embodiment of a virtual serial port terminal system of the present invention;

[0040] Figure 7 A schematic diagram of an application scenario of a subsystem interaction module in an embodiment of a virtual serial port terminal system of the present invention;

[0041] Figure 8 A schematic diagram of the structure of the hardware operating environment involved in the embodiment of the present invention;

[0042] Fig. 9 A schematic diagram of a flow chart of an implementation method of a virtual serial port terminal system according to an embodiment of the present invention;

[0043] Fig.10 It is a schematic diagram of functional modules involved in an embodiment of an implementation device of a virtual serial port terminal system of the present invention.

[0044] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0045] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0046] Please refer to Figure 1 , Figure 1 It is a schematic diagram of the overall architecture of the virtual serial port terminal system of the present invention.

[0047] The virtual serial port terminal system of the present invention uses the uboot environment to implement a virtual serial port terminal to perform terminal interaction functions. The terminal system of the present invention includes:

[0048] A main chip, the main chip comprising a first terminal serial port and multiple first serial port physical links, wherein the first terminal serial port is connected to the multiple first serial port physical links;

[0049] Slave chips, the number of the slave chips is the same as the number of the first serial port physical links, each of the slave chips comprises a second terminal serial port, each of the slave chips is connected to one of the first serial port physical links of the master chip through the second terminal serial port, so as to perform terminal interaction for the slave chip through the first terminal serial port in the uboot environment.

[0050] like Figure 1As shown, in this embodiment, the virtual serial port terminal system of the present invention includes at least one master chip, chip 1, and multiple slave chips, chip 2, chip 3, and chip 4. Among them, the master chip includes a first terminal serial port (the terminal serial port in chip 1 shown in the figure) and multiple first serial port physical links (serial port 1, serial port 2 to serial port n shown in the figure, n is a positive integer greater than 2), and the first terminal serial port is simultaneously connected to multiple first serial port physical links so as to achieve intercommunication at the software level.

[0051] In addition, each slave chip includes at least one second terminal serial port (the terminal serial ports in chip 2, chip 3 and chip 4 are shown in the figure), and the number of slave chips included in the virtual serial port terminal system of the present invention is the same as the number of first serial port physical links in the master chip, that is, each slave chip is connected to one of the multiple first serial port physical links of the master chip through its own second terminal serial port. Therefore, the virtual serial port terminal system of the present invention can be accessed and operated by the system operator in real time in any state by accessing the first terminal serial port of the master chip in the uboot environment to realize the terminal interaction function.

[0052] For details, please refer to Figure 2 The process of the virtual serial port accessing the serial port of the slave chip terminal. The operator of the virtual serial port terminal system of the present invention can use the serial port tool of the PC in the uboot environment to directly access the first terminal serial port of the main chip - chip 1, and execute the corresponding virtual serial port command on the first terminal serial port. It can then be achieved that the second terminal serial port of the slave chip - chip 2 (or one of the other slave chips) is directly accessed to perform any operation to achieve the function of terminal interaction of the virtual serial port terminal in the uboot environment.

[0053] It should be noted that the first terminal serial port of the main chip and the second terminal serial port of the slave chip described in this embodiment may also be referred to as debug serial ports in other feasible embodiments. It should be understood that based on different design requirements of actual applications, in different feasible implementation methods, the terminal serial port (including the first terminal serial port and the second terminal serial port) may of course be referred to as other names different from those listed here. The present invention does not limit the specific name of the terminal serial port.

[0054] For further information, please refer to Figure 3 , Figure 3 It is a schematic diagram of the application design of the main chip in the virtual serial port terminal system of the present invention in one embodiment.

[0055] In one embodiment, the main chip includes: a serial port management module and a terminal management module, wherein the serial port management module is connected to the terminal management module, the serial port management module is connected to multiple first serial port physical links, and the terminal management module is connected to the first terminal serial port.

[0056] like Figure 3 As shown, in this embodiment, the main chip in the virtual serial port terminal system of the present invention, chip 1, may include: a serial port management module and a terminal management module. Among them, the serial port management module is responsible for configuring and managing the multiple first serial port physical links in the main chip (serial port 1, serial port 2 to serial port n in the figure). The terminal management module mainly uses the serial port driver program provided in the platform where the virtual serial port terminal system of the present invention is deployed, so as to perform operations such as configuration and driving of the first terminal serial port of the main chip to adapt to the platform.

[0057] It should be noted that, in this embodiment, since the virtual serial port terminal system of the present invention can be deployed on different platforms for application in the uboot environment, and based on different design requirements of actual applications, the configuration and driver of the terminal serial port may naturally be different on the different platforms. Therefore, the present invention does not limit the specific operation content such as the configuration and driver of the platform on which the adaptation system is deployed for the first terminal serial port performed by the terminal management module in the main chip. As long as the terminal device executes a custom program or a platform-provided program based on the connection with the first terminal serial port to perform corresponding operations on the first terminal serial port, it can be sufficient.

[0058] For further information, please refer to Figure 4 , Figure 4 It is a schematic diagram of the application design of the serial port management module of the main chip in the virtual serial port terminal system of the present invention in one embodiment.

[0059] In one embodiment, the serial port management module includes a logic component and a configuration component, the logic component includes: a terminal takeover / release module, a serial port initialization configuration module and a subsystem interaction module, the logic component is connected to the configuration component through the serial port initialization configuration module and the subsystem interaction module, and the logic component is connected to the terminal management module through the terminal takeover / release module.

[0060] like Figure 4As shown, in this embodiment, the serial port management module contained in the main chip in the virtual serial port terminal system of the present invention is divided into two components: a logic component - a platform-independent logic layer, and a configuration component - a platform-related adaptation layer. Among them, the logic component shields the hardware-related parts and is the specific implementation subject of the virtual serial port terminal system of the present invention to realize the virtual serial port terminal function at the software level. The logic component further includes: a terminal takeover / release module, a serial port initialization configuration module and a subsystem interaction module. Among them, the logic component is connected to the terminal management module in the main chip through the terminal takeover / release module to be based on Figure 5 The application scenario of the terminal takeover / release module shown is that when the system is deployed on any platform, the terminal management module is used with the entry provided by the first terminal serial port driving the main chip in the uboot environment: the cmd_ub_uart tool based on the uboot environment is used to realize the function of the second terminal serial port of the virtual slave chip.

[0061] In addition, the logic component is connected to the configuration component through the serial port initialization configuration module and the subsystem interaction module, so as to Figure 6 The application scenario of the serial port initialization module shown in the figure realizes the configuration and registration of the second terminal serial port of each slave chip related to the initialization docking under the platform deployed by the system. Specifically: the logic component mainly realizes the two functions of serial port global registration and serial port initialization configuration based on the serial port initialization module (the uart initialization configuration module shown in the figure), wherein the serial port global registration is: the uart channels on all hardware under the platform deployed by the system are managed in the form of a linked list through the serial port initialization module and the configuration adapted to the platform is used for each channel to perform initialization operations (such as clearing the original configuration of the channel or the system registration information (configuration in the previous platform), and writing the relevant configuration or system registration information of the current platform, etc.), and the serial port initialization configuration is: the communication parameters of the baud rate of the second terminal serial port of the slave chip are configured through the serial port initialization module, and the data bits, checksums and stop bits before the formal virtual second terminal serial port is performed.

[0062] And, the logic components are based on Figure 7 The application scenario of the subsystem interaction module shown in the figure is to realize the directional transmission of input and output data of the uboot environment when the operator accesses and interacts with each slave chip through the master chip under the platform. Specifically: based on the read interface and write interface for data provided by the subsystem interaction module, the platform-related components deployed by the system are replaced to perform basic data read and write operations.

[0063] In this embodiment, based on the framework of the virtual serial port terminal system of the present invention, when the system is specifically deployed on different platforms, it is only necessary to assign the existing operation functions of the specific hardware serial port to the corresponding module components in the system during the initialization process as the lowest level implementation for each different platform, and the complete uboot-based virtual serial port terminal access and interaction functions can be achieved. In this way, when the virtual serial port system is deployed on a specific platform and applied in a uboot environment, the virtual terminal function can be realized through the serial port bus in the uboot environment, thereby realizing the login and control of the terminal serial port of other systems in the uboot environment, effectively solving the technical problem that there is no universal virtual serial port terminal technology based on uboot at present, and thus it is impossible to realize the terminal interaction function based on the virtual serial port terminal in the uboot environment.

[0064] Furthermore, in one embodiment, in the above-mentioned virtual serial port terminal system of the present invention, the slave chip also includes: multiple second serial port physical links, and the slave chip is connected to multiple new slave chips as a new master chip through the multiple second serial port physical links, wherein the number of the new slave chips is the same as the number of the second serial port material links.

[0065] In this embodiment, the virtual serial port terminal system of the present invention may also include multiple second serial port physical links like the main chip, so that the second serial port physical link can be used as a new main chip to connect with multiple other new slave chips, and the number of the new slave chips is the same as the number of the second serial port physical links included in the new main chip.

[0066] In this embodiment, the slave chip includes multiple second serial port physical links to form a new master chip to connect with the new slave chip and realize the virtual terminal serial port of the new slave chip. The process is the same as the process of connecting the master chip with each slave chip and virtualizing the terminal serial port of each slave chip in the virtual serial port terminal system of the present invention mentioned above. Therefore, the structure of the new master chip and the specific process of realizing the virtual serial port are not described here.

[0067] like Figure 8 As shown, Figure 8 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention.

[0068] It should be noted that the implementation device of the virtual serial port terminal system in the embodiment of the present invention can be a smart phone, a personal computer, a server and other devices, and no specific limitation is made here.

[0069] like Figure 8As shown, the implementation device of the virtual serial port terminal system may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0070] Those skilled in the art will understand that Figure 8 The device structure shown in the figure does not constitute a limitation on the implementation device of the virtual serial port terminal system, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0071] like Figure 8 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an implementation program of a virtual serial port terminal system. The operating system is a program that manages and controls the hardware and software resources of a device, and supports the implementation program of a virtual serial port terminal system and the operation of other software or programs. Figure 8 In the device shown, the user interface 1003 is mainly used for data communication with the client; the network interface 1004 is mainly used for establishing a communication connection with the server; and the processor 1001 can be used to call the implementation program of the virtual serial port terminal system stored in the memory 1005, and perform the following operations:

[0072] Receiving uboot input data according to the first terminal serial port of the main chip, wherein the serial port mode of the first terminal serial port is a virtual serial port interaction mode;

[0073] Determine the target chip pointed to by the uboot input data in each of the chips, and transmit the uboot input to the second terminal serial port of the target chip;

[0074] Receive the uboot output data transmitted by the second terminal serial port, and output the uboot output data through the first terminal serial port.

[0075] Further, after the step of receiving the uboot input data according to the first terminal serial port of the main chip, the processor 1001 can also be used to call the implementation program of the virtual serial port terminal system stored in the memory 1005, and perform the following operations:

[0076] Determine whether the uboot input data is a preset virtual serial port exit instruction;

[0077] If yes, restoring the serial port configuration of the first terminal serial port;

[0078] If not, the step of determining the target chip pointed to by the uboot input data in each of the chips and transmitting the uboot input to the second terminal serial port of the target chip is performed.

[0079] Furthermore, the processor 1001 may also be used to call an implementation program of the virtual serial port terminal system stored in the memory 1005, and perform the following operations:

[0080] Receiving a uboot virtual serial port initialization instruction based on the first terminal serial port, and switching the serial port mode of the first terminal serial port according to the uboot virtual serial port initialization instruction;

[0081] Wherein, the step of switching the serial port mode of the first terminal serial port according to the uboot virtual serial port initialization instruction includes:

[0082] Extract initialization configuration parameters from the uboot virtual serial port initialization instruction;

[0083] The serial port initialization configuration module of the main chip is called to perform initialization configuration for the first terminal serial port according to the initialization configuration parameters, so as to switch the first terminal serial port from the terminal serial port mode to the virtual serial port interaction mode.

[0084] Furthermore, the processor 1001 may also be used to call an implementation program of the virtual serial port terminal system stored in the memory 1005, and perform the following operations:

[0085] Establishing a data connection between the uboot serial port tool and the first terminal serial port;

[0086] The uboot virtual serial port initialization instruction is generated according to the uboot serial port tool, and the uboot virtual serial port initialization instruction is received through the data connection based on the first terminal serial port.

[0087] Based on the above structure, various embodiments of a method for implementing a virtual serial port terminal system are proposed.

[0088] Reference Fig. 9 , Fig. 9 The figure is a flowchart of a first embodiment of a method for implementing a virtual serial port terminal system of the present invention.

[0089] The embodiment of the present invention provides an embodiment of the implementation method of the virtual serial port terminal system. It should be noted that although the logical order is shown in the flow chart, in some cases, the steps shown or described can be executed in a different order than here. In this embodiment, the execution subject of the implementation method of the virtual serial port terminal system of the present invention can be a device or apparatus for performing a virtual serial port terminal in a uboot environment, for example, it can be a terminal device such as a smart phone, a personal computer, a server, etc., which is not limited in this embodiment. The following describes each embodiment with a terminal device replacing each of the above-mentioned execution subjects. In addition, in this embodiment, the implementation method of the virtual serial port terminal system of the present invention is applied to the above-mentioned virtual serial port terminal system to realize access and interaction with other multiple terminal serial ports through a virtual serial port in a uboot environment. The implementation method of the virtual serial port terminal system of the present invention includes:

[0090] Step S10, receiving uboot input data according to the first terminal serial port of the main chip, wherein the serial port mode of the first terminal serial port is a virtual serial port interaction mode;

[0091] In this embodiment, when the terminal device runs the uboot program to enter the uboot environment, and the serial port mode of the main chip in the virtual serial port terminal system is also in the virtual serial port interaction mode, the uboot input data input by the operator of the virtual serial port terminal system using the uboot serial port tool is received through the first terminal serial port of the main chip.

[0092] It should be noted that, in this embodiment, after the operator of the virtual serial port terminal system deploys the system to a specific platform, he / she performs initialization configuration of the terminal serial ports of the master and slave chips based on the terminal device of the platform, thereby initializing the configuration of the first terminal serial port of the master chip to switch the serial port mode from the ordinary terminal serial port mode to the virtual serial port interaction mode. The terminal device, that is, the operator of the system received based on the first terminal serial port, further uses the uboot serial port tool to fill in the uboot input data for accessing and controlling the terminal where the slave chip is located.

[0093] Furthermore, in one embodiment, the implementation method of the virtual serial port terminal system of the present invention may further include:

[0094] Step A10, receiving a uboot virtual serial port initialization instruction based on the first terminal serial port, and switching the serial port mode of the first terminal serial port according to the uboot virtual serial port initialization instruction;

[0095] After the operator of the virtual serial port terminal system deploys the system on the platform, the operator first generates a uboot virtual serial port initialization instruction by configuring the uboot serial port tool installed and run on the current terminal device, and then switches the first terminal serial port of the main chip in the virtual serial port terminal system from the ordinary terminal serial port mode to the virtual serial port interaction mode based on the uboot virtual serial port initialization instruction.

[0096] Furthermore, step A10 may include:

[0097] Step A101: extracting initialization configuration parameters from the uboot virtual serial port initialization instruction;

[0098] In this embodiment, when the operator of the virtual serial port terminal system generates a uboot virtual serial port initialization instruction through the uboot serial port tool installed on the terminal device and in operation, the operating function and other parameters of the hardware serial port of the platform to which the terminal device belongs are filled in accordingly based on the uboot serial port tool, and the uboot virtual serial port initialization instruction is generated as the initialization configuration parameters for initializing the first terminal serial port in the main chip and the second terminal serial port in the slave chip. Afterwards, when the terminal device obtains the uboot virtual serial port initialization instruction, it can parse the uboot virtual serial port initialization instruction to extract the initialization configuration parameters.

[0099] Furthermore, in one embodiment, the implementation method of the virtual serial port terminal system of the present invention may further include:

[0100] Step A20, establishing a data connection between the uboot serial port tool and the first terminal serial port;

[0101] Step A30, generating the uboot virtual serial port initialization instruction according to the uboot serial port tool, and receiving the uboot virtual serial port initialization instruction based on the first terminal serial port through the data connection.

[0102] In this embodiment, when the operator of the virtual serial port terminal system deploys the system to the platform where the terminal device is located, the terminal device immediately establishes a data connection between the uboot serial port tool and the first terminal serial port of the main chip in the virtual serial port terminal system when detecting that the uboot serial port tool that has been installed in advance starts to run. In this way, the terminal device can generate a uboot virtual serial port initialization instruction by filling in the operating function and other parameters of the platform's hardware serial port through the uboot serial port tool installed on the terminal device and in operation, and based on the first terminal serial port, use the established data connection to receive the uboot virtual serial port initialization instruction to perform subsequent initialization configuration and realize the terminal interaction function.

[0103] It should be noted that, in this embodiment, after the terminal device establishes a data connection between the uboot serial port tool and the first terminal serial port of the main chip, the uboot input data input by the operator of the subsequent receiving system is also implemented based on the use of the data connection.

[0104] Step A102: calling the serial port initialization configuration module of the main chip to perform initialization configuration for the first terminal serial port according to the initialization configuration parameters, so as to switch the first terminal serial port from the terminal serial port mode to the virtual serial port interaction mode.

[0105] After the terminal device extracts the initialization configuration parameters from the uboot virtual serial port initialization instruction, it immediately calls the serial port initialization configuration module of the logic component in the serial port management module of the main chip of the virtual serial port terminal system, and refers to the initialization configuration parameters at a logical level independent of the platform on which the terminal device is located to perform initialization configuration operations on the first terminal serial port of the main chip, thereby switching the serial port mode of the first terminal serial port from the ordinary terminal serial port mode to a virtual serial port interaction mode that can access and control the corresponding terminal from each second terminal serial port of the virtual slave chip.

[0106] Step S20, determining the target chip pointed to by the uboot input data in each of the chips, and transmitting the uboot input to the second terminal serial port of the target chip;

[0107] After receiving the uboot input data input by the operator of the virtual serial port terminal system using the uboot serial port tool, the terminal device further performs a redirection operation on the uboot input data, that is, determines the target chips pointed to by the multiple slave chips contained in the uboot input data in the system, and then transmits the uboot input data to the second terminal serial port of the target chip to realize terminal interaction processes such as access and control of the terminal to which the target chip belongs.

[0108] It should be noted that, in this embodiment, the uboot input data can specifically carry identification data entered by the operator to indicate the slave chip that currently needs to be accessed and interacted with, so that the terminal device can determine the target chip among the multiple connected slave chips based on the identification data, and after further taking over the target chip, pass the uboot input data to the target chip to realize terminal interaction processes such as access and control of the terminal to which the target chip belongs.

[0109] Further, in one embodiment, in the above step S10, after the first terminal serial port of the main chip receives the uboot input data, the implementation method of the virtual serial port terminal system of the present invention may further include:

[0110] Step S40, determining whether the uboot input data is a preset virtual serial port exit instruction;

[0111] In this embodiment, when the operator of the virtual serial port terminal system needs to switch different slave chips for access and control at the first terminal serial port of the master chip, if the terminal device has currently taken over one of the slave chips through the first terminal serial port, the operator can first control the release of the slave chip and take over another slave chip through the first terminal serial port again, so as to perform terminal interaction processes such as access and control for the newly taken over slave chip. When it is necessary to switch the slave chip for access and control, the operator of the virtual serial port terminal system can also define and generate a virtual serial port exit instruction through the uboot serial port tool, and also pass the virtual serial port exit instruction as uboot input data to the first terminal serial port of the master chip.

[0112] Therefore, each time the terminal device receives uboot input data through the data connection between the uboot serial port tool and the first terminal serial port of the main chip, it first determines whether the uboot input data is a virtual serial port exit instruction defined and generated by the operator.

[0113] Step S50, restoring the serial port configuration of the first terminal serial port;

[0114] When the terminal device determines whether the received uboot input data is a virtual serial port exit instruction defined and generated by the operator, if it is determined that the uboot input data is a virtual serial port exit instruction, the terminal device immediately restores the relevant configuration of the second terminal serial port of the target chip that has been virtually taken over on the first terminal serial port of the main chip, thereby releasing the target chip to allow the first terminal serial port to re-enter the virtual serial port interaction mode, and thereafter waits to receive new uboot input data to perform a redirection operation to take over the new target chip (at this time, the system operator only needs to redirect and take over the new slave chip based on the identification data of the slave chip in the uboot input data newly input by the uboot work).

[0115] Step S60: If not, then executing the step of determining the target chip pointed to by the uboot input data in each of the chips, and transmitting the uboot input to the second terminal serial port of the target chip.

[0116] When the terminal device determines whether the received uboot input data is a virtual serial port exit instruction defined and generated by the operator, if it is determined that the uboot input data is not a virtual serial port exit instruction, the terminal device directly executes the operation process described in the above step S20.

[0117] Step S30, receiving the uboot output data transmitted by the second terminal serial port, and outputting the uboot output data through the first terminal serial port.

[0118] After the terminal device passes the received uboot input data to the second terminal serial port of the target chip, thereby accessing and manipulating the terminal device to which the target chip belongs, the terminal device of the target chip will return the result after executing the response according to the uboot input data as uboot output data according to the original path. Therefore, after receiving the uboot output data returned by the terminal device of the target chip through the second terminal serial port, the terminal device directly outputs the uboot output data through the first terminal serial port of the main chip, that is, the uboot output data is output through the front-end user graphical interface of the uboot opening tool that has a data connection with the first terminal serial port, so that the operator can know the result of manipulating the terminal to which the target chip belongs.

[0119] In this embodiment, when the terminal device runs the uboot program to enter the uboot environment, and the serial port mode of the main chip in the virtual serial port terminal system is also in the virtual serial port interaction mode, the uboot input data input by the operator of the virtual serial port terminal system using the uboot serial port tool is received through the first terminal serial port of the main chip; then, a redirection operation of the uboot input data is further performed, that is, the target chips pointed to by the multiple slave chips included in the system by the uboot input data are determined, so as to pass the uboot input data to the second terminal serial port of the target chip to realize the terminal interaction process such as access and control of the terminal to which the target chip belongs; finally, the terminal device receives the uboot output data returned by the terminal device of the target chip through the second terminal serial port, and directly outputs the uboot output data through the first terminal serial port of the main chip to let the operator know the result of the control of the terminal to which the target chip belongs.

[0120] In this way, when the virtual serial port system is deployed on a specific platform and applied in the uboot environment, the virtual terminal function can be realized through the serial port bus in the uboot environment, thereby realizing login and control of the terminal serial port of other systems in the uboot environment, effectively solving the technical problem that there is currently no general virtual serial port terminal technology based on uboot, and thus the terminal interaction function cannot be realized based on the virtual serial port terminal in the uboot environment.

[0121] In addition, the embodiment of the present invention also provides a device for implementing a virtual serial port terminal system, referring to Fig.10 The implementation device of the virtual serial port terminal system of the present invention is applied to the virtual serial port terminal system as described above, and the implementation device includes:

[0122] An input module 10 is used to receive uboot input data according to the first terminal serial port of the main chip, wherein the serial port mode of the first terminal serial port is a virtual serial port interaction mode;

[0123] A data orientation module 20, used for determining a target chip pointed to by the uboot input data in each of the chips, and transmitting the uboot input to a second terminal serial port of the target chip;

[0124] The output module 30 is used to receive the uboot output data transmitted by the second terminal serial port, and output the uboot output data through the first terminal serial port.

[0125] Furthermore, the implementation device further includes:

[0126] A determination module, used to determine whether the uboot input data is a preset virtual serial port exit instruction;

[0127] a status recovery module, configured to restore the serial port configuration of the first terminal serial port if the determination module determines that the serial port is yes;

[0128] The execution module is used for executing the step of determining the target chip pointed to by the uboot input data in each of the chips and transmitting the uboot input to the second terminal serial port of the target chip if the determination module determines that the result is no.

[0129] Furthermore, the implementation device further includes:

[0130] An initialization module, configured to receive a uboot virtual serial port initialization instruction based on the first terminal serial port, and switch the serial port mode of the first terminal serial port according to the uboot virtual serial port initialization instruction;

[0131] The initialization module comprises:

[0132] A parameter extraction unit, used to extract initialization configuration parameters from the uboot virtual serial port initialization instruction;

[0133] The initialization configuration unit is used to call the serial port initialization configuration module of the main chip to perform initialization configuration on the first terminal serial port according to the initialization configuration parameters, so as to switch the first terminal serial port from the terminal serial port mode to the virtual serial port interaction mode.

[0134] Furthermore, the implementation device further includes:

[0135] A connection module is used to establish a data connection between the uboot serial port tool and the first terminal serial port; and to generate the uboot virtual serial port initialization instruction according to the uboot serial port tool, and receive the uboot virtual serial port initialization instruction through the data connection based on the first terminal serial port.

[0136] The extended contents of the specific implementation methods of the device for realizing the virtual serial port terminal system of the present invention are substantially the same as the embodiments of the method for realizing the virtual serial port terminal system described above, and will not be elaborated herein.

[0137] In addition, an embodiment of the present invention further provides a computer-readable storage medium, on which a virtual serial port terminal system implementation program is stored. When the virtual serial port terminal system implementation program is executed by a processor, the steps of the virtual serial port terminal system implementation method described below are implemented.

[0138] The various embodiments of the implementation device and computer-readable storage medium of the virtual serial port terminal system of the present invention can all refer to the various embodiments of the implementation method of the virtual serial port terminal system of the present invention, which will not be repeated here.

[0139] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0140] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0141] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0142] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A virtual serial port terminal system, characterized in that: The system is applied to the uboot environment, and the system includes: A main chip, the main chip comprising a first terminal serial port and multiple first serial port physical links, wherein the first terminal serial port is connected to the multiple first serial port physical links; Slave chips, the number of the slave chips is the same as the number of the first serial port physical links, each of the slave chips comprises a second terminal serial port, each of the slave chips is connected to one of the first serial port physical links of the master chip through the second terminal serial port, so as to perform terminal interaction for the slave chip through the first terminal serial port in the uboot environment; Wherein, the main chip includes: a serial port management module and a terminal management module; The serial port management module includes a logic component and a configuration component. The logic component includes: a terminal takeover / release module, a serial port initialization configuration module and a subsystem interaction module. The logic component is connected to the configuration component through the serial port initialization configuration module and the subsystem interaction module, and the logic component is connected to the terminal management module through the terminal takeover / release module.

2. The virtual serial port terminal system according to claim 1, characterized in that: The serial port management module is connected to the terminal management module, the serial port management module is connected to multiple first serial port physical links, and the terminal management module is connected to the first terminal serial port.

3. The virtual serial port terminal system according to any one of claims 1 to 2, characterized in that: The slave chip also includes: multiple second serial port physical links, and the slave chip is connected to multiple new slave chips as a new master chip through the multiple second serial port physical links, wherein the number of the new slave chips is the same as the number of the second serial port material links.

4. A method for implementing a virtual serial port terminal system, characterized in that: The implementation method is applied to the virtual serial port terminal system according to any one of claims 1 to 3, and the implementation method comprises the following steps: Receiving uboot input data according to the first terminal serial port of the main chip, wherein the serial port mode of the first terminal serial port is a virtual serial port interaction mode; Determine the target chip pointed to by the uboot input data in each of the slave chips, and transmit the uboot input to the second terminal serial port of the target chip; Receiving uboot output data transmitted by the second terminal serial port, and outputting the uboot output data through the first terminal serial port; Wherein, after the step of receiving uboot input data according to the first terminal serial port of the main chip, the implementation method further includes: Determine whether the uboot input data is a preset virtual serial port exit instruction; If yes, restoring the serial port configuration of the first terminal serial port; If not, the step of determining the target chip pointed to by the uboot input data in each of the chips and transmitting the uboot input to the second terminal serial port of the target chip is performed.

5. The method for implementing the virtual serial port terminal system according to claim 4, characterized in that: The implementation method also includes: Receiving a uboot virtual serial port initialization instruction based on the first terminal serial port, and switching the serial port mode of the first terminal serial port according to the uboot virtual serial port initialization instruction; The step of switching the serial port mode of the first terminal serial port according to the uboot virtual serial port initialization instruction includes: Extract initialization configuration parameters from the uboot virtual serial port initialization instruction; The serial port initialization configuration module of the main chip is called to perform initialization configuration for the first terminal serial port according to the initialization configuration parameters, so as to switch the first terminal serial port from the terminal serial port mode to the virtual serial port interaction mode.

6. The method for implementing the virtual serial port terminal system according to any one of claims 4 to 5, characterized in that: The implementation method also includes: Establishing a data connection between the uboot serial port tool and the first terminal serial port; The uboot virtual serial port initialization instruction is generated according to the uboot serial port tool, and the uboot virtual serial port initialization instruction is received through the data connection based on the first terminal serial port.

7. A device for implementing a virtual serial port terminal system, characterized in that: The implementation device of the virtual serial port terminal system includes: a memory, a processor, and an implementation program of the virtual serial port terminal system stored in the memory and executable on the processor. When the implementation program of the virtual serial port terminal system is executed by the processor, the steps of the implementation method of the virtual serial port terminal system according to any one of claims 4 to 6 are implemented.

8. A computer storage medium, characterized in that: The computer-readable storage medium stores an implementation program of the virtual serial port terminal system, and when the implementation program of the virtual serial port terminal system is executed by the processor, the steps of the implementation method of the virtual serial port terminal system according to any one of claims 4 to 6 are implemented.