Management system and method of operating system instance and medium
By providing an operating system instance management system on the Internet of Vehicles cloud platform, utilizing identity authentication and two-way communication connections, combining the integration of Web socket and SSH protocols, and the real-time communication capabilities of WebRTC channels, the operating system instance management efficiency in the prior art is solved. The problem of low efficiency and low latency operating system instance debugging and management.
Patent Information
- Application Number
- CN202411612318.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2044-11-12
AI Technical Summary
When faced with a large number of operating system instance management solutions, the management efficiency is inefficient and it is difficult to debug and manage quickly and effectively.
Provides a management system for operating system examples, which is applied to the Internet of Vehicles cloud platform, including node management modules and debugging and processing modules. The node management module realizes user authentication and two-way communication connection through the identity authentication unit and the first connection establishment unit, and the debugging processing module uses the WebRTC channel to perform real-time debugging through the second connection establishment unit and the debugging unit.
All nodes and operating system instances can be accessed through one authentication, avoiding repeated logins and improving management efficiency. Combining the seamless integration of Web socket and SSH protocols to achieve low-latency interaction, users can get a similar experience in the browser as a traditional SSH terminal. Using the real-time communication capabilities of the WebRTC channel, it realizes rapid debugging of remote operating system instances and further improves management efficiency.
Smart Images

Figure CN119496646A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a management system, method and medium for an operating system instance. Background Art
[0002] In the current management scheme for operating system instances in the Internet of Vehicles cloud desktop, it usually relies on traditional SSH (Secure Shell) login and local ADB (Android Debug Bridge) tools to debug and manage multiple types of different operating system instances. However, as the number of operating system instances gradually increases, this method is difficult to quickly and effectively manage a large number of operating system instances, and the existing management scheme for operating system instances has the problem of low management efficiency. Summary of the invention
[0003] Based on the above problems, in order to improve the management efficiency of multiple operating system instances in the Internet of Vehicles cloud desktop, the present application embodiment provides a management system, method and medium for operating system instances.
[0004] The embodiments of the present application disclose the following technical solutions:
[0005] In a first aspect, an embodiment of the present application provides a management system for an operating system instance, which is applied to a vehicle networking cloud platform; the vehicle networking cloud platform includes: a node management module and a debugging processing module; the node management module includes: an identity authentication unit and a first connection establishment unit; the debugging processing module includes: a debugging unit and a second connection establishment unit;
[0006] The identity authentication unit is used to respond to a target instance debugging request from a user terminal, authenticate the user terminal according to the identity authentication signature of the user terminal, and obtain an identity authentication result; the identity authentication signature is generated based on the signature verification key pair of the vehicle network cloud platform;
[0007] The first connection establishing unit is used to establish a two-way communication connection between the user terminal and the target node based on the Web socket protocol and the SSH protocol session when the identity authentication result is passed; the target node includes a target operating system instance;
[0008] The second connection establishing unit is used to establish a WebRTC channel between the user terminal and the target operating system instance according to the two-way communication connection;
[0009] The debugging unit is used to respond to a target instance debugging command for the target operating system instance from the user terminal, transmit the target instance debugging command to the target operating system instance through the WebRTC channel, so as to debug the target operating system instance.
[0010] In a possible implementation, the WebRTC channel transmits the target instance debugging command to the target operating system instance based on the RTP protocol; the debugging processing module further includes: a connection monitoring unit, the connection monitoring unit being specifically configured to:
[0011] Monitoring the data transmission parameters of the WebRTC channel based on the RTCP protocol; the data transmission parameters include: data transmission rate and data transmission delay;
[0012] When at least one of the data transmission rate and the data transmission delay is lower than a corresponding preset threshold, the WebRTC channel between the user terminal and the target operating system instance is replaced.
[0013] In a possible implementation, the system further includes a plurality of debugging virtual machines; the debugging virtual machines are used to debug the target operating system instance based on the target instance debugging command;
[0014] The debugging processing module further includes: a load distribution unit; the load distribution unit is specifically used to:
[0015] According to the real-time load data of each debugging virtual machine and a time series analysis algorithm, load prediction is performed on each debugging virtual machine to obtain a predicted load of each debugging virtual machine;
[0016] Performing task analysis on the target instance debugging command to obtain the target debugging task complexity;
[0017] A debugging virtual machine for responding to the target instance debugging command is determined according to the target debugging task complexity and the predicted load of each debugging virtual machine.
[0018] In a possible implementation, the debugging unit is specifically configured to:
[0019] Establishing an instance debugging session according to the operating system type of the target operating system instance;
[0020] The target instance debugging command is received through the instance debugging session, and the target instance debugging command is transmitted to the target operating system instance through the WebRTC channel.
[0021] In a possible implementation, the system further includes: a log management module, the log management module includes: a log display unit; the log display unit is specifically used to:
[0022] Performing key log analysis on the output log of the target operating system instance based on a stream processing algorithm to capture a first log data stream from the output log;
[0023] According to the sliding window algorithm and the log display entry threshold, the first log data stream is displayed in the form of a sliding window on the interactive terminal of the user end.
[0024] In a possible implementation, the first log data stream includes a plurality of log files; the log management module further includes: a log filtering unit; the log filtering unit is specifically configured to:
[0025] According to the preset log screening keyword and Bloom filter, a hash result calculation is performed on the logs in each of the log files in the first log data stream to obtain a hash result of each log entry;
[0026] If the log file contains a log whose hash result is not equal to the preset value, the log file is filtered, and after the filtering process for the first log data stream is completed, a second log data stream is obtained.
[0027] In a possible implementation, the log management module further includes: a log storage unit; the log storage unit is specifically used to:
[0028] In response to the log download request of the user terminal, determining a target download log according to the log download request and the downloaded logs; the target download log is a newly added log for the downloaded logs;
[0029] The target download log is incrementally compressed using an incremental compression algorithm to obtain a target compressed log, and the target compressed log is merged and stored with the downloaded log.
[0030] In a possible implementation, the Web socket protocol is used to convert the target instance debugging request into input data of the SSH protocol session.
[0031] In a second aspect, an embodiment of the present application provides a method for managing an operating system instance, which is applied to a vehicle network cloud platform, and the method includes:
[0032] In response to a target instance debugging request from a user terminal, authenticating the user terminal according to an identity authentication signature of the user terminal to obtain an identity authentication result; the identity authentication signature is generated based on a signature verification key pair of the vehicle network cloud platform;
[0033] When the identity authentication result is passed, a two-way communication connection is established between the user terminal and the target node based on the Web socket protocol and the SSH protocol session; the target node includes a target operating system instance;
[0034] Establishing a WebRTC channel between the client and the target operating system instance according to the two-way communication connection;
[0035] In response to a target instance debugging command for the target operating system instance from the user terminal, the target instance debugging command is transmitted to the target operating system instance through the WebRTC channel to debug the target operating system instance.
[0036] In a third aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for managing an operating system instance described in the second aspect.
[0037] Compared with the prior art, the present application has the following beneficial effects: the embodiment of the present application provides a management system, method and medium for an operating system instance, and the system is applied to a vehicle network cloud platform, specifically including a node management module and a debugging processing module, wherein the node management module is provided with an identity authentication unit and a first connection establishment unit, and the debugging processing module is provided with a second connection establishment unit and a debugging unit.
[0038] When the user needs to debug the operating system instance in the Internet of Vehicles cloud platform, the identity authentication unit responds to the user's target instance debugging request, thereby verifying it according to the user's identity authentication signature. Since the user's identity authentication signature is generated based on the signature verification key pair of the Internet of Vehicles cloud platform, the user only needs to verify once to access all nodes and operating system instances in the Internet of Vehicles cloud platform, thereby avoiding the problem of repeated logins involved in applying traditional SSH logins and improving the management efficiency of operating system instances. Furthermore, when the user's identity authentication signature passes, on the basis of the traditional SSH protocol, the Web socket protocol and the SSH protocol session are combined to establish a two-way communication connection between the user and the target node to ensure low-latency interaction between the user and the target node, thereby simulating a complete debugging interaction environment through the seamless integration between the Websocket protocol and the SSH protocol, so that users can directly get an experience similar to that of the traditional SSH terminal in the browser, further improving the management efficiency of the operating system instance. Finally, based on the two-way communication established between the user client and the target node, a WebRTC channel is established between the user client and the target operating system instance through the two-way communication between the two, and the user client debugs the target operating system instance based on the WebRTC channel, thereby ensuring that the user client can use the real-time communication capabilities of WebRTC to remotely debug the operating system instance, thereby improving the management efficiency of the operating system instance in many ways. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0040] Figure 1 A schematic diagram of the structure of a management system of an operating system instance provided in an embodiment of the present application;
[0041] Figure 2 A schematic diagram of signaling interaction between modules in a management system provided in an embodiment of the present application;
[0042] Figure 3 A flowchart of a method for managing an operating system instance provided in an embodiment of the present application. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solutions and advantages of this application more clear, the following is a further detailed description of this application in combination with specific embodiments and with reference to the accompanying drawings. It should be noted that the embodiments described in the embodiments of this application are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0044] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be understood by people with ordinary skills in the field to which the present application belongs. The "first", "second" and similar words used in the embodiments of the present application do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "include" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right", etc. are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0045] In order to make the following embodiments clear, the technical terms involved in the embodiments of the present application are first introduced:
[0046] SSH is a network protocol used to provide security protection for network login and remote command execution in an insecure network environment. It mainly ensures the secure transmission of data through encryption technology to prevent sensitive data from being eavesdropped or tampered with during transmission.
[0047] ADB is a command line tool developed by Google, mainly used for communication and management between developers' computers and Android devices.
[0048] The WebSocket protocol is a network communication protocol that performs full-duplex communication on a single TCP connection. Unlike HTTP, WebSocket allows persistent two-way data flow between the server and the client, making real-time communication more efficient and convenient.
[0049] WebRTC (Web RealTime Communications) is an open source project that aims to provide real-time communication capabilities for browsers and mobile applications without installing plug-ins or third-party software. WebRTC supports real-time audio, video, and data communications and is widely used in video conferencing, online education, real-time gaming, and other scenarios.
[0050] RTP (Realtime Transport Protocol) is a network protocol used to transmit multimedia data such as audio and video over the Internet. RTP is mainly used in real-time communication applications such as video conferencing, online live broadcasting and real-time gaming. Its design goal is to provide low-latency and efficient data transmission.
[0051] RTCP (Real-time Transport Control Protocol) is a control protocol used in conjunction with the RTP protocol, mainly used to monitor and report the quality of RTP sessions. RTCP provides a mechanism that allows the sender and receiver to exchange control information to ensure the quality and efficiency of real-time communication.
[0052] PaaSDashboard (Platform Management Control Panel) provides a user interface that allows developers and service administrators to manage and monitor the PaaS services they use.
[0053] As described above, in the current management scheme for operating system instances in the Internet of Vehicles cloud desktop, it usually relies on traditional SSH (Secure Shell) login and local ADB (Android Debug Bridge) tools to debug and manage multiple types of different operating system instances. However, as the number of operating system instances gradually increases, this method is difficult to quickly and effectively manage a large number of operating system instances, and the existing management scheme for operating system instances has the problem of low management efficiency.
[0054] In order to solve the above problems, an embodiment of the present application provides a management system, method and medium for an operating system instance, wherein the system is applied to a vehicle network cloud platform, and specifically includes a node management module and a debugging processing module, wherein the node management module is provided with an identity authentication unit and a first connection establishment unit, and the debugging processing module is provided with a second connection establishment unit and a debugging unit.
[0055] When the user needs to debug the operating system instance in the Internet of Vehicles cloud platform, the identity authentication unit responds to the user's target instance debugging request, thereby verifying it according to the user's identity authentication signature. Since the user's identity authentication signature is generated based on the signature verification key pair of the Internet of Vehicles cloud platform, the user only needs to verify once to access all nodes and operating system instances in the Internet of Vehicles cloud platform, thereby avoiding the problem of repeated logins involved in applying traditional SSH logins and improving the management efficiency of operating system instances. Furthermore, when the user's identity authentication signature passes, on the basis of the traditional SSH protocol, the Web socket protocol and the SSH protocol session are combined to establish a two-way communication connection between the user and the target node to ensure low-latency interaction between the user and the target node, thereby simulating a complete debugging interaction environment through the seamless integration between the Websocket protocol and the SSH protocol, so that users can directly get an experience similar to that of the traditional SSH terminal in the browser, further improving the management efficiency of the operating system instance. Finally, based on the two-way communication established between the user client and the target node, a WebRTC channel is established between the user client and the target operating system instance through the two-way communication between the two, and the user client debugs the target operating system instance based on the WebRTC channel, thereby ensuring that the user client can use the real-time communication capabilities of WebRTC to remotely debug the operating system instance, thereby improving the management efficiency of the operating system instance in many ways.
[0056] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0057] See also Figure 1 and Figure 2 , Figure 1 A schematic diagram of the structure of a management system of an operating system instance provided in an embodiment of the present application, Figure 2 A schematic diagram of signaling interaction between modules in a management system provided in an embodiment of the present application. Figure 2What is shown is the management system of the operating system instance in the actual application scenario, and the corresponding operating system instance is the Redroid instance of the Android operating system. Accordingly, the Web shell module corresponds to the node management module in the embodiment of the present application, the Web ADB module corresponds to the debugging processing module, and the Web Log module corresponds to the log management module. Among them, the user end logs in and accesses through PaaSDashboard to obtain the management authority for the operating system instance in the Internet of Vehicles cloud platform.
[0058] In the next Figure 1 In the introduction, we can Figure 2 Combined understanding of the actions performed by each module and the functions implemented.
[0059] like Figure 1 As shown, the vehicle network cloud platform includes a node management module 100 and a debugging processing module 200. In the node management module 100, an identity authentication unit 1001 and a first connection establishment unit 1002 are provided. In the debugging processing module 200, a debugging unit 2001 and a second connection establishment unit 2002 are provided.
[0060] Among them, the identity authentication unit 1001 is used to respond to a target instance debugging request from the user terminal, authenticate the user terminal according to the identity authentication signature of the user terminal, and obtain an identity authentication result; the identity authentication signature is generated based on the signature verification key pair of the vehicle network cloud platform.
[0061] In the Internet of Vehicles cloud platform provided in the embodiment of the present application, each operating system instance is set in a corresponding target node. Therefore, when a user needs to debug a target operating system instance, it is necessary to obtain permission to access the target node.
[0062] As can be seen from the foregoing, in previous operating system debugging solutions, traditional SSH login requires users to repeatedly verify their access rights to the target node, and users need to repeatedly enter login information, resulting in low management efficiency of the operating system instance.
[0063] Therefore, in order to avoid users repeatedly entering login information, the embodiment of the present application uses a password-free authentication mechanism in asymmetric encryption to authenticate users. When a user logs in for the first time, a signature verification key pair is generated through the asymmetric encryption public key authentication mechanism. Among them, the private key of the signature verification key pair is deployed on the user side, and the public key is deployed on the platform side.
[0064] When the platform responds to the debugging request of the target instance on the user side, it extracts the authentication signature signed by the user based on the private key from the debugging request, and verifies the user's identity through the pre-deployed public key, so as to achieve fast authentication for the user side. Since the authentication is completed based on the authentication signature of the user side, there is no need for the user to repeatedly enter the login information, thereby improving the management efficiency of the operating system instance.
[0065] Furthermore, the first connection establishing unit 1002 is used to establish a two-way communication connection between the user terminal and the target node based on the Websocket protocol and the SSH protocol session when the identity authentication result is passed; the target node includes a target operating system instance.
[0066] In the traditional process of establishing a connection using the SSH protocol, SSH may need to re-establish a connection or rely on a polling mechanism for each data interaction, which will cause delays in the transmission of debugging commands and data, thereby affecting the debugging and management efficiency of the operating system instance.
[0067] Compared with the SSH protocol, the Web socket protocol is a protocol for full two-way communication on a single TCP connection, which allows both parties to send data at any time and maintain a connection at all times. Therefore, by seamlessly integrating the Web socket protocol with the SSH protocol and establishing two-way communication between the user end and the target node based on the two, the data transmission delay can be effectively reduced. Users can directly obtain a debugging experience similar to that of a traditional SSH terminal in the browser of the interactive terminal without installing additional plug-ins, thereby improving the management efficiency of the operating system instance.
[0068] Specifically, the core of the binding between the Web socket protocol and the SSH protocol session is to connect the data stream transmitted by the Web socket protocol with the input and output data of the SSH protocol session. The binding between the Web socket protocol and the SSH session can be understood as a bidirectional data pipeline. When the Web socket protocol session at the front end receives the target debugging request from the user end, the Web socket protocol session converts the request to the input data of the SSH protocol session and transmits it to the SSH protocol session. Similarly, the output data of the SSH protocol session will be fed back to the Websocket protocol session in real time, and the Web socket protocol session will perform the same data conversion and then transmit it back to the user end. The binding between the Websocket protocol session and the SSH protocol session can be regarded as a process of stream conversion mapping, that is, the user's input stream is mapped to the input stream of the SSH protocol session via the Web socket protocol session, and the output stream of the SSH protocol session is mapped back to the output stream of the Web socket protocol session.
[0069] In actual application scenarios, the vehicle network cloud platform often receives operating system instance debugging requests from multiple user terminals. In order to ensure that it can respond to the debugging request of each user terminal, an asynchronous I / O processing mechanism can be applied to ensure that it can still respond to the debugging request of each user in real time under high concurrency.
[0070] Specifically, asynchronous I / O is similar to an event-driven programming model, and an event-loop-based framework can be used to process multiple parallel debugging requests. When the Web socket protocol session receives a debugging request from the client, the debugging request is immediately passed to the SSH protocol session through an event-driven mechanism, and the output stream of the SSH protocol session is monitored based on the signal identifier of the debugging request. When the corresponding output stream is monitored, the corresponding result is immediately fed back to the corresponding client through the event mechanism. In this way, each debugging request and its corresponding response result run independently, thereby improving the system's concurrent processing capability for multiple debugging requests.
[0071] In a possible implementation, if the amount of data transmitted between the Web socket protocol session and the SSH protocol session is large, a fragmentation transmission and reassembly algorithm based on frame sequence numbers can be used to divide the overall data into multiple data fragments, and mark each data fragment with a sequence number. The receiving end receives data according to the sequence number order of the data fragments to ensure normal data transmission.
[0072] On the other hand, in order to ensure the communication security between the Web socket protocol session and the SSH protocol session, the Web socket protocol's own TLS encryption algorithm can be used to encrypt the data to ensure the security of data transmission. At the same time, in order to improve the energy efficiency of the system, the connection time between the Web socket protocol session and the SSH protocol session can also be monitored in real time. When the connection time between the two exceeds the set threshold, the connection between the two is disconnected, thereby improving the resource utilization of the system.
[0073] With respect to the second connection establishing unit 2001 in the debugging processing module, it is used to establish a WebRTC channel between the user terminal and the target operating system instance according to the two-way communication connection.
[0074] Different from the Web socket protocol, the WebRTC protocol can provide more efficient real-time communication capabilities. It can establish a low-latency communication channel between the user end and the target operating system instance, thereby meeting the debugging needs of the user end for the target operating system instance. Therefore, in order to maximize the management efficiency of the target operating system instance by the user end, on the basis of the two-way communication established between the user end and the target node, a WebRTC channel needs to be established between the user end and the target operating system instance, thereby minimizing the communication delay between the two and improving the debugging efficiency.
[0075] Specifically, when establishing a WebRTC channel, the connection information between the second connection establishment unit and the target operating system is exchanged through the signaling server. The connection information of both parties includes candidate connection paths and media parameters. The second connection establishment unit can search for all possible connection paths with the target operating system instance through the I CE algorithm. The I CE algorithm evaluates each candidate path in turn and selects the path with the lowest delay and the best quality for connection, thereby ensuring the data transmission performance of the WebRTC channel.
[0076] The debugging unit 2002 is used to respond to a target instance debugging command for the target operating system instance from the user terminal, transmit the target instance debugging command to the target operating system instance through the WebRTC channel, so as to debug the target operating system instance.
[0077] Finally, when a WebRTC channel has been established between the user end and the target operating system instance, the target instance debugging command of the user end for the target operating system instance can be quickly transmitted to the target operating system instance through the WebRTC channel, thereby achieving rapid debugging of the target operating system instance.
[0078] Specifically, during the process of the debugging unit transmitting the target instance debugging command, in order to ensure the compatibility of the debugging command with the target operating system instance operating system, the debugging unit will establish an instance debugging session according to the operating system type of the target operating system instance. Figure 2 For example, when the target operating system instance is a Redroid instance running on the Android operating system, the corresponding debugging session established is an ADB session. The ADB session will be displayed on the user's interactive terminal, and the user can quickly debug the target operating system instance by entering debugging commands in the ADB session.
[0079] The above is an overall introduction to the management system of the operating system capabilities provided in the embodiment of the present application. Next, other units and modules involved in the system will be introduced from multiple aspects.
[0080] From the above description of the WebRTC channel, it can be seen that when the second connection establishment unit establishes the WebRTC channel between the user terminal and the target operating system instance, it will use the ICE algorithm to determine the connection path with the lowest delay and the best transmission quality. Therefore, in order to ensure the transmission quality of the WebRTC channel in real time, the management system provided in the embodiment of the present application is also provided with a connection monitoring unit, which is specifically used to perform the following two steps:
[0081] Step 1: Monitor the data transmission parameters of the WebRTC channel based on the RTCP protocol; the data transmission parameters include: data transmission rate and data transmission delay,
[0082] Step 2: When at least one of the data transmission rate and the data transmission delay is lower than a corresponding preset threshold, replace the WebRTC channel between the user terminal and the target operating system instance.
[0083] In actual application scenarios, the WebRTC channel uses the RTP protocol to transmit debugging commands and result data fed back by the operating system instance. Therefore, the connection monitoring unit can monitor the data transmission rate and data transmission delay in the WebRTC channel by combining the RTCP and RTP protocols. When the data unpacking rate or data transmission delay in the channel is lower than the set threshold, it can immediately adjust and switch to other RTC channels to ensure real-time transmission and stability of debugging commands.
[0084] On the other hand, in an actual Internet of Vehicles cloud platform, debugging of each operating system instance is often performed by a debugging virtual machine in the cloud platform, and thus a plurality of debugging virtual machines are often provided in the Internet of Vehicles cloud platform.
[0085] In actual debugging scenarios, debugging tasks for different operating system instances often have different task complexities. In order to ensure that each debugging virtual machine does not have an excessive load when processing debugging tasks, a load distribution unit for distributing debugging tasks to each virtual machine is also provided in the debugging processing module of the embodiment of the present application. The load distribution unit is specifically used to perform the following three steps:
[0086] Step 1: According to the real-time load data of each debugging virtual machine and a time series analysis algorithm, a load prediction is performed on each debugging virtual machine to obtain a predicted load of each debugging virtual machine.
[0087] During the operation of the system, the load distribution unit will collect the real-time load data of each debugging virtual machine in real time. The real-time load data of the debugging virtual machine includes the CPU usage, memory occupancy, network bandwidth, and I / O operation execution status of the virtual machine. The real-time load data of each debugging virtual machine will be transmitted to the load distribution unit in real time to facilitate the load distribution unit to perform task allocation.
[0088] When the load distribution unit receives the real-time load data of each debugging virtual machine, it predicts the load usage of each debugging virtual machine in the future through a time series analysis algorithm, and obtains the predicted load of each debugging virtual machine, so as to facilitate subsequent task distribution based on the predicted load.
[0089] Step 2: Perform task analysis on the target instance debugging command to obtain the target debugging task complexity.
[0090] Step three: determining a debugging virtual machine for responding to the debugging command of the target instance according to the complexity of the target debugging task and the predicted load of each debugging virtual machine.
[0091] Furthermore, the load distribution unit performs task analysis on the target instance debugging command received in real time to determine the task complexity of the target debugging task. In this way, through the complexity of the debugging task and the predicted load of each debugging virtual machine, a debugging virtual machine whose future load will not be too large can be identified from multiple debugging virtual machines, and the debugging virtual machine is determined as the virtual machine that responds to the target instance debugging command, thereby ensuring load balancing among multiple debugging virtual machines and improving the operating stability of the system.
[0092] In actual application scenarios, when the target operating system instance responds to the target instance debugging command, it needs to feedback the corresponding response log to the user end through the WebRTC channel. When there are multiple debugging commands at the same time, there are often too many logs, making it difficult to display the logs.
[0093] Therefore, in order to solve the above problems, a special log management module is also provided in the management system provided in the embodiment of the present application. The log display management is controlled by the log display unit in the log management module, and the log display unit is mainly used to perform the following two steps:
[0094] Step 1: Perform key log analysis on the output log of the target operating system instance based on a stream processing algorithm to capture a first log data stream from the output log.
[0095] In the log display stage, in order to ensure that the latest log of the target operating system instance can be displayed, it is necessary to perform key log analysis on the input log of the target operating system instance based on the streaming algorithm, extract the latest generated log, and obtain the first log data stream.
[0096] Step 2: display the first log data stream in the form of a sliding window on the interactive terminal of the user end according to a sliding window algorithm and a log display entry threshold.
[0097] Accordingly, in the process of displaying the newly generated first log data stream to the user end, in order to ensure that the log can be updated and displayed in real time while avoiding overload of the interface information display on the user end, it is necessary to reduce the display entries of the log to below the entry threshold through the sliding window algorithm and the log display entry threshold of the user end. At the same time, the displayed log is updated through a sliding window to ensure that the real-time updated log can be displayed in the display interface of the user end in a timely manner.
[0098] In addition, in the process of controlling log display, the first log data stream fed back by the target operating system instance often includes many logs that are irrelevant to user needs. In order to ensure the display quality of the log, the embodiment of the present application is also provided with a log filtering unit, which is used to filter useless or junk log files in the data stream after obtaining the first log data stream, thereby optimizing the log display effect and reducing the loss of storage resources. Specifically, the log filtering unit is used to perform the following two steps:
[0099] Step 1: Based on the preset log screening keywords and Bloom filter, a hash result calculation is performed on the logs in each of the log files in the first log data stream to obtain a hash result of each log entry.
[0100] Step 2: If the log file contains a log whose hash result is not equal to a preset value, the log file is filtered, and after the filtering process for the first log data stream is completed, a second log data stream is obtained.
[0101] After obtaining the first log data stream, the log filtering unit may calculate a hash result for the log files in the first log data stream based on a preset log training filter and a Bloom filter, and perform log filtering according to the actual hash result.
[0102] Specifically, for each log entry in the log file, the log filtering unit needs to calculate the hash result of the log through a hash function. Assuming that the preset value is 1, if the hash results corresponding to the logs of all entries in the log file are 1, then the log file is deemed to meet the conditions. Otherwise, as long as there are logs in the log file whose hash results are not 1, the log file will be filtered to ensure the data quality of the log data stream.
[0103] Among them, Bloom filter uses multiple independent hash functions to map elements to bit arrays. Its core is to quickly determine the existence of elements through the sparsity of bit arrays and the probability of hash collision. For large-scale log data, this algorithm greatly reduces the consumption of storage and computing resources.
[0104] In a possible implementation, in order to improve the resource utilization of the system and prevent repeated downloading and storage of logs, a log storage unit is further provided in the above-mentioned log management module, and the log storage unit is used to perform the following two steps:
[0105] Step 1: In response to the log download request from the user terminal, a target download log is determined according to the log download request and the downloaded logs; the target download log is a new log added to the downloaded logs.
[0106] Step 2: perform incremental compression processing on the target download log using an incremental compression algorithm to obtain a target compressed log, and merge the target compressed log with the downloaded log for storage.
[0107] When the log storage unit responds to the log download request from the user, it determines the logs that have been previously downloaded and stored through the log download request, so as to determine which logs are previously downloaded and which are newly added after the last download, and determine this type of log as the target download log.
[0108] After determining these newly added logs, the newly added target logs are incrementally compressed using an incremental compression algorithm and compressed into previously downloaded log files. This can reduce the transmission and storage of duplicate data, reduce bandwidth consumption and download time, and thus optimize the use efficiency of network resources.
[0109] In addition, the system can also dynamically adjust the log storage strategy based on the frequency of log access by the user. For example, frequently accessed logs may be stored in fast-access storage devices, while low-frequency or expired logs may be transferred to slow storage or archived. In this way, the system's storage resources can be dynamically allocated by analyzing log usage, thereby improving the system's resource utilization.
[0110] An embodiment of the present application provides a management system for an operating system instance, which is applied to a vehicle networking cloud platform, and specifically includes a node management module and a debugging processing module, wherein the node management module is provided with an identity authentication unit and a first connection establishment unit, and the debugging processing module is provided with a second connection establishment unit and a debugging unit.
[0111] When the user needs to debug the operating system instance in the Internet of Vehicles cloud platform, the identity authentication unit responds to the user's target instance debugging request, thereby verifying it according to the user's identity authentication signature. Since the user's identity authentication signature is generated based on the signature verification key pair of the Internet of Vehicles cloud platform, the user only needs to verify once to access all nodes and operating system instances in the Internet of Vehicles cloud platform, thereby avoiding the problem of repeated logins involved in applying traditional SSH logins and improving the management efficiency of operating system instances. Furthermore, when the user's identity authentication signature passes, on the basis of the traditional SSH protocol, the Web socket protocol and the SSH protocol session are combined to establish a two-way communication connection between the user and the target node to ensure low-latency interaction between the user and the target node, thereby simulating a complete debugging interaction environment through the seamless integration between the Websocket protocol and the SSH protocol, so that users can directly get an experience similar to that of the traditional SSH terminal in the browser, further improving the management efficiency of the operating system instance. Finally, based on the two-way communication established between the user client and the target node, a WebRTC channel is established between the user client and the target operating system instance through the two-way communication between the two, and the user client debugs the target operating system instance based on the WebRTC channel, thereby ensuring that the user client can use the real-time communication capabilities of WebRTC to remotely debug the operating system instance, thereby improving the management efficiency of the operating system instance in many ways.
[0112] A management method for an operating system instance provided in an embodiment of the present application is introduced below. The management method for an operating system instance described below and the management system for an operating system instance described above can refer to each other.
[0113] See also Figure 3 , which is a flow chart of a method for managing an operating system instance provided in an embodiment of the present application, and specifically includes the following steps:
[0114] S101: in response to a target instance debugging request from a user terminal, authenticate the user terminal according to an identity authentication signature of the user terminal to obtain an identity authentication result; the identity authentication signature is generated based on a signature verification key pair of the vehicle network cloud platform;
[0115] S102: When the identity authentication result is passed, a two-way communication connection is established between the user terminal and a target node based on a Web socket protocol and an SSH protocol session; the target node includes a target operating system instance;
[0116] S103: Establishing a WebRTC channel between the user terminal and the target operating system instance according to the two-way communication connection;
[0117] S104: In response to a target instance debugging command for the target operating system instance from the user terminal, transmit the target instance debugging command to the target operating system instance through the WebRTC channel to debug the target operating system instance.
[0118] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, an embodiment of the present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the management method of the operating system instance as described in any of the above embodiments.
[0119] The computer-readable media of the embodiments of the present application include permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0120] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the management method of the operating system instance as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0121] It should be noted that each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system, method and medium, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The system, method and medium described above are merely schematic, in which the units described as separate components may or may not be physically separated, and the components indicated as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0122] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A management system for operating system instances, characterized in that: Applied to the Internet of Vehicles cloud platform; The Internet of Vehicles cloud platform includes: a node management module and a debugging processing module; the node management module includes: an identity authentication unit and a first connection establishment unit; the debugging processing module includes: a debugging unit and a second connection establishment unit; The identity authentication unit is used to respond to a target instance debugging request from a user terminal, authenticate the user terminal according to the identity authentication signature of the user terminal, and obtain an identity authentication result; the identity authentication signature is generated based on the signature verification key pair of the vehicle network cloud platform; The first connection establishing unit is used to establish a two-way communication connection between the user terminal and the target node based on the Web socket protocol and the SSH protocol session when the identity authentication result is passed; the target node includes a target operating system instance; The second connection establishing unit is used to establish a WebRTC channel between the user terminal and the target operating system instance according to the two-way communication connection; The debugging unit is used to respond to a target instance debugging command for the target operating system instance from the user terminal, transmit the target instance debugging command to the target operating system instance through the WebRTC channel, so as to debug the target operating system instance.
2. The system according to claim 1, characterized in that The WebRTC channel transmits the target instance debugging command to the target operating system instance based on the RTP protocol; the debugging processing module further includes: a connection monitoring unit, the connection monitoring unit is specifically used to: Monitoring the data transmission parameters of the WebRTC channel based on the RTCP protocol; the data transmission parameters include: data transmission rate and data transmission delay; When at least one of the data transmission rate and the data transmission delay is lower than a corresponding preset threshold, the WebRTC channel between the user terminal and the target operating system instance is replaced.
3. The system according to claim 1, characterized in that The system further comprises a plurality of debugging virtual machines; the debugging virtual machines are used to debug the target operating system instance based on the target instance debugging command; The debugging processing module further includes: a load distribution unit; the load distribution unit is specifically used to: According to the real-time load data of each debugging virtual machine and a time series analysis algorithm, load prediction is performed on each debugging virtual machine to obtain a predicted load of each debugging virtual machine; Performing task analysis on the target instance debugging command to obtain the target debugging task complexity; A debugging virtual machine for responding to the target instance debugging command is determined according to the target debugging task complexity and the predicted load of each debugging virtual machine.
4. The system according to claim 1, characterized in that The debugging unit is specifically used for: Establishing an instance debugging session according to the operating system type of the target operating system instance; The target instance debugging command is received through the instance debugging session, and the target instance debugging command is transmitted to the target operating system instance through the WebRTC channel.
5. The system according to claim 1, characterized in that Also includes: A log management module, the log management module includes: a log display unit; the log display unit is specifically used to: Performing key log analysis on the output log of the target operating system instance based on a stream processing algorithm to capture a first log data stream from the output log; According to the sliding window algorithm and the log display entry threshold, the first log data stream is displayed in the form of a sliding window on the interactive terminal of the user end.
6. The system according to claim 5, characterized in that The first log data stream includes a plurality of log files; the log management module further includes: a log filtering unit; the log filtering unit is specifically used to: According to the preset log screening keyword and Bloom filter, a hash result calculation is performed on the logs in each of the log files in the first log data stream to obtain a hash result of each log entry; If the log file contains a log whose hash result is not equal to the preset value, the log file is filtered, and after the filtering process for the first log data stream is completed, a second log data stream is obtained.
7. The system according to claim 5, characterized in that The log management module further includes: a log storage unit; the log storage unit is specifically used to: In response to the log download request of the user terminal, determining a target download log according to the log download request and the downloaded log; the target download log is a newly added log for the downloaded log; The target download log is incrementally compressed using an incremental compression algorithm to obtain a target compressed log, and the target compressed log is merged and stored with the downloaded log.
8. The system according to claim 1, characterized in that The Web socket protocol is used to convert the target instance debugging request into input data of the SSH protocol session.
9. A method for managing an operating system instance, characterized in that: Applied to a vehicle network cloud platform, the method comprises: In response to a target instance debugging request from a user terminal, authenticating the user terminal according to an identity authentication signature of the user terminal to obtain an identity authentication result; the identity authentication signature is generated based on a signature verification key pair of the vehicle network cloud platform; When the identity authentication result is passed, a two-way communication connection is established between the user terminal and the target node based on the Web socket protocol and the SSH protocol session; the target node includes a target operating system instance; Establishing a WebRTC channel between the client and the target operating system instance according to the two-way communication connection; In response to a target instance debugging command for the target operating system instance from the user terminal, the target instance debugging command is transmitted to the target operating system instance through the WebRTC channel to debug the target operating system instance.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for managing an operating system instance described in claim 9 is implemented.
Citation Information
Patent Citations
Instance processing method and system
CN114650279A
Data link establishment method and device, equipment and storage medium
CN115412280A
WebRTC-based IPPBX call pressure test method and device, and medium
CN117201376A
Adaptive real-time communication plug-in for virtual desktop underlying structure solution
CN118093081A
Vehicle cloud cooperative communication method and system, electronic equipment and readable storage medium
CN118353942A