A management system, method and medium for an operating system instance
By combining authentication signatures and WebRTC channels in the Internet of Vehicles cloud platform, the problem of inefficient operating system instance management is solved, fast and low-latency operating system instance management is achieved, and management efficiency and user experience are improved.
Patent Information
- Application Number
- CN202411612318.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2044-11-12
AI Technical Summary
Existing operating system instance management solutions are difficult to quickly and effectively manage a large number of operating system instances in the Internet of Vehicles cloud desktop, resulting in low management efficiency.
The authentication unit is used to generate the user's authentication signature based on the verification key pair of the Internet of Vehicles cloud platform. A two-way communication connection is established by combining the Web socket protocol and the SSH protocol session. The debugging of the user terminal and the target operating system instance is realized through the WebRTC channel, and remote debugging is performed using the real-time communication capability of WebRTC.
It enables users to access all nodes and operating system instances in the Internet of Vehicles cloud platform with a single authentication, reduces the problem of repeated logins in traditional SSH logins, improves management efficiency, and enhances the management efficiency of operating system instances through low-latency interaction and real-time communication capabilities.
Smart Images

Figure CN119496646B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and in particular to a management system and method for operating system instances and a medium. BACKGROUND
[0002] In the current management scheme for operating system instances in a vehicle networking cloud desktop, the traditional SSH (Secure Shell) login and local ADB (Android Debug Bridge) tool are usually relied on to debug and manage multiple 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
[0003] Based on the above problems, in order to improve the management efficiency of multiple operating system instances in a vehicle networking cloud desktop, the embodiments of the present application provide 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, the embodiments of the present application provide a management system for operating system instances, applied to a vehicle networking cloud platform; the vehicle networking cloud platform comprises a node management module and a debugging processing module; the node management module comprises an identity verification unit and a first connection establishment unit; the debugging processing module comprises a debugging unit and a second connection establishment unit;
[0006] The identity verification unit is configured to perform identity verification on a user terminal according to an identity verification signature of the user terminal in response to a target instance debugging request from the user terminal, to obtain an identity verification result; the identity verification signature is generated based on a signature verification key of the vehicle networking cloud platform;
[0007] The first connection establishment unit is configured to establish a bidirectional communication connection between the user terminal and a target node based on a Web socket protocol and an SSH protocol session when the identity verification result is passed; the target node comprises a target operating system instance;
[0008] The second connection establishment unit is configured to establish a WebRTC channel between the user terminal and the target operating system instance according to the bidirectional communication connection;
[0009] The debugging unit is configured to transmit the target instance debugging command to the target operating system instance through the WebRTC channel in response to the target instance debugging command from the user terminal, 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 an RTP protocol; and the debugging processing module further includes a connection monitoring unit, which is specifically configured to:
[0011] monitor data transmission parameters of the WebRTC channel based on an RTCP protocol; the data transmission parameters include a data transmission rate and a data transmission delay;
[0012] replace the WebRTC channel between the user terminal and the target operating system instance when at least one of the data transmission rate and the data transmission delay is lower than a corresponding preset threshold.
[0013] In a possible implementation, the system further includes a plurality of debugging virtual machines; the debugging virtual machines are configured 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, which is specifically configured to:
[0015] perform load prediction on each debugging virtual machine according to real-time load data of each debugging virtual machine and a time series analysis algorithm, to obtain a predicted load of each debugging virtual machine;
[0016] perform task analysis on the target instance debugging command, to obtain a target debugging task complexity;
[0017] determine a debugging virtual machine for responding to the target instance debugging command 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] establish an instance debugging session according to an operating system type of the target operating system instance;
[0020] receive the target instance debugging command through the instance debugging session, and transmit the target instance debugging command 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; and the log display unit is specifically configured to:
[0022] perform key log analysis on the output log of the target operating system instance based on a stream processing algorithm, to extract a first log data stream from the output log;
[0023] display the first log data stream in the form of a sliding window on the interactive terminal of the user terminal according to a sliding window algorithm and a log display entry threshold.
[0024] In a possible implementation, the first log data stream includes a plurality of log files; and the log management module further includes a log filtering unit, which is specifically configured to:
[0025] perform hash result calculation on logs in each of the log files in the first log data stream according to a preset log filtering keyword and a Bloom filter, to obtain a hash result of each entry of the logs;
[0026] if there is a log with a hash result not equal to a preset value in the log file, filter the log file, and obtain a second log data stream after the filtering of the first log data stream is completed.
[0027] In a possible implementation, the log management module further includes a log storage unit, which is specifically configured to:
[0028] in response to a log download request of the user terminal, determine a target download log according to the log download request and downloaded logs; the target download log is a new log for the downloaded logs;
[0029] perform incremental compression processing on the target download log by using an incremental compression algorithm, to obtain a target compressed log, and store the target compressed log and the downloaded logs.
[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, the embodiments of the present application provide a management method of an operating system instance, applied to a vehicle network cloud platform, the method comprising:
[0032] In response to a target instance debugging request from a user terminal, the user terminal is authenticated according to an authentication signature of the user terminal, and an authentication result is obtained; the authentication signature is generated based on a signature verification key of the vehicle network cloud platform;
[0033] When the authentication result is passed, a two-way communication connection between the user terminal and a target node is established based on a Web socket protocol and an SSH protocol session; the target node includes a target operating system instance;
[0034] According to the two-way communication connection, a WebRTC channel is established between the user terminal and the target operating system instance;
[0035] In response to a target instance debugging command from the user terminal for the target operating system instance, 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, the embodiments of the present application provide a computer readable storage medium having a computer program stored thereon, the program being executed by a processor to implement the operating system instance management method in the second aspect.
[0037] Compared with the prior art, the present application has the following beneficial effects: the embodiments of the present application provide an operating system instance management system, method and medium, which are applied in a vehicle network cloud platform, and specifically include a node management module and a debugging processing module, wherein the node management module is provided with an authentication unit and a first connection establishing unit, and the debugging processing module is provided with a second connection establishing unit and a debugging unit.
[0038] When the user terminal needs to debug the operating system instance in the Internet of Vehicles cloud platform, the target instance debugging request of the user terminal is responded by the identity authentication unit, so as to verify according to the identity authentication signature of the user terminal. Since the identity authentication signature of the user terminal is generated based on the signature verification key 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 login when applying the traditional SSH login, and improving the management efficiency of the operating system instance. Further, when the identity authentication signature of the user terminal is passed, on the basis of the traditional SSH protocol, the Web socket protocol and the SSH protocol session are combined to establish a bidirectional communication connection between the user terminal and the target node, so as to ensure low-latency interaction between the user terminal and the target node, thereby simulating a complete debugging interaction environment through seamless integration between the Websocket protocol and the SSH protocol, so that the user can obtain similar experience to the traditional SSH terminal in the browser, further improving the management efficiency of the operating system instance. Finally, on the basis of the bidirectional communication between the user terminal and the target node, the WebRTC channel between the user terminal and the target operating system instance is established through the bidirectional communication between the two, and the debugging of the user terminal to the target operating system instance is realized based on the WebRTC channel, so that the user terminal can remotely debug the operating system instance by using the real-time communication capability of WebRTC, thereby improving the management efficiency of the operating system instance in multiple aspects. BRIEF DESCRIPTION OF DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0040] Figure 1 A structural schematic diagram of an operating system instance management system provided by an embodiment of the present application;
[0041] Figure 2 A signaling interaction schematic diagram between modules in a management system provided by an embodiment of the present application;
[0042] Figure 3 A flowchart of an operating system instance management method provided by an embodiment of the present application. DETAILED DESCRIPTION
[0043] To make the purposes, technical solutions and advantages of the present application clearer, further detailed description will be made to the present application with reference to specific embodiments and the accompanying drawings. It should be particularly pointed out that the embodiments described in the embodiments of the present application are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present 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 as the usual meanings understood by those skilled in the art to which the present application belongs. The terms "first", "second" and similar terms used in the embodiments of the present application do not represent any order, quantity or importance, but are only used to distinguish different components. The terms "include" or "contain" and similar terms mean that the elements or objects before the terms cover the elements or objects listed after the terms and their equivalents, and do not exclude other elements or objects. The terms "connect" or "connect" and similar terms are not limited to physical or mechanical connection, but can include electrical connection, whether direct or indirect. The terms "up", "down", "left", "right" and the like are only used to represent relative positional relationship, and when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0045] To make the following embodiments clear, first, the technical terms to be involved in the embodiments of the present application are introduced:
[0046] SSH protocol 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 the developer's computer and Android device.
[0048] WebSocket protocol is a network communication protocol that allows full-duplex communication over a single TCP connection. Unlike HTTP, WebSocket allows persistent two-way data flow between server and client, making real-time communication more efficient and convenient.
[0049] WebRTC (Web Real-Time Communication) is an open-source project that aims to provide real-time communication capabilities to browsers and mobile applications without the need for plugins or third-party software. WebRTC supports real-time audio, video, and data communication and is widely used in scenarios such as video conferencing, online education, and real-time gaming.
[0050] RTP (Real-time Transport Protocol) is a network protocol used for transmitting 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 streaming, and real-time gaming, and 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 RTP and is mainly used to monitor and report the quality of RTP sessions. RTCP provides a mechanism for exchanging control information between senders and receivers to ensure the quality and efficiency of real-time communication.
[0052] PaaSDashboard (Platform Administration Control Panel). It provides a user interface for 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 DebugBridge) tools to debug and manage multiple types of operating system instances. However, as the number of operating system instances 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] To solve the above problems, the embodiments of the present application provide a management system, method and medium for operating system instances, which are applied in the Internet of Vehicles cloud platform, and specifically include 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 terminal needs to debug the operating system instance in the Internet of Vehicles cloud platform, the target instance debugging request of the user terminal is responded by the identity authentication unit, so as to verify according to the identity authentication signature of the user terminal. Since the identity authentication signature of the user terminal is generated based on the signature verification key 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 login when applying the traditional SSH login, and improving the management efficiency of the operating system instance. Further, when the identity authentication signature of the user terminal is passed, on the basis of the traditional SSH protocol, the Web socket protocol and the SSH protocol session are combined to establish a bidirectional communication connection between the user terminal and the target node, so as to ensure the low-latency interaction between the user terminal and the target node, thereby simulating a complete debugging interaction environment through seamless integration between the Websocket protocol and the SSH protocol, so that the user can obtain similar experience to the traditional SSH terminal in the browser, further improving the management efficiency of the operating system instance. Finally, on the basis of the bidirectional communication between the user terminal and the target node, the WebRTC channel between the user terminal and the target operating system instance is established through the bidirectional communication between the two, and the debugging of the user terminal to the target operating system instance is realized based on the WebRTC channel, so as to ensure that the user terminal can remotely debug the operating system instance by using the real-time communication capability of WebRTC, thereby improving the management efficiency of the operating system instance in many ways.
[0056] In order for those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely 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. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0057] Referring to Figure 1 and Figure 2 , Figure 1 a structural schematic diagram of an operating system instance management system provided by an embodiment of the present application, Figure 2 a signaling interaction schematic diagram between modules in a management system provided by an embodiment of the present application. Figure 2The management system of the operating system instance in the actual application scenario is shown, the corresponding operating system instance is a Redroid instance applying an Android operating system, correspondingly, the Web shell module corresponds to the node management module in the embodiment of the application, the Web ADB module corresponds to the debugging processing module, and the Web Log module corresponds to the log management module. The user end logs in and accesses through the PaaSDashboard, so as to obtain the management permission of the operating system instance in the Internet of Vehicles cloud platform.
[0058] In the following introduction of Figure 1 , the actions performed by each module in Figure 2 and the functions achieved can be combined for understanding.
[0059] As shown in Figure 1 , 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 arranged. In the debugging processing module 200, a debugging unit 2001 and a second connection establishment unit 2002 are arranged.
[0060] The identity authentication unit 1001 is configured to respond to a target instance debugging request from a user end, perform identity authentication on the user end according to an identity authentication signature of the user end, and obtain an identity authentication result. The identity authentication signature is generated based on a signature verification key of the vehicle network cloud platform.
[0061] In the vehicle network cloud platform provided in the embodiment of the application, each operating system instance is arranged in a corresponding target node. Therefore, when a user needs to debug a target operating system instance, the user needs to obtain the access permission of the target node.
[0062] As known from the foregoing, in the prior operating system debugging scheme, the traditional SSH login needs the user to repeatedly verify the access permission of the target node, and the user needs to repeatedly input the login information, thereby resulting in low management efficiency of the operating system instance.
[0063] Therefore, in order to avoid the user from repeatedly inputting the login information, the embodiment of the application adopts a password-free authentication mechanism in asymmetric encryption to perform identity authentication on the user. When the user logs in for the first time, a signature verification key pair is generated through the public key authentication mechanism of asymmetric encryption. The private key of the signature verification key pair is arranged in the user end, and the public key is arranged in the platform end.
[0064] When the platform end responds to the target instance debugging request of the user end, the identity authentication signature signed by the user based on the private key is extracted from the debugging request, and the identity of the user is verified through the pre-deployed public key, so as to realize the rapid identity authentication of the user end. Since the identity authentication can be completed based on the identity authentication signature of the user end, the user does not need to repeatedly input the login information, thereby improving the management efficiency of the operating system instance.
[0065] Further, the first connection establishment unit 1002 is configured to, when the identity authentication result is passed, establish a bidirectional communication connection between the user end and the target node based on the Websocket protocol and the SSH protocol session, and the target node includes a target operating system instance.
[0066] In the conventional process of establishing a connection by using the SSH protocol, the SSH may need to re-establish a connection or rely on a polling mechanism at each data interaction, which will cause a delay 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-duplex communication on a single TCP connection, which allows both parties to send data at any time and can keep the connection state at any time. Therefore, by seamlessly integrating the Web socket protocol and the SSH protocol and establishing a bidirectional communication between the user end and the target node based on both, the transmission delay of data can be effectively reduced, the user can obtain a debugging experience similar to the conventional SSH terminal in the browser of the interactive terminal without the need to install 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 front-end Web socket protocol session receives a target debugging request from the user end, the request is converted by the Web socket protocol session into input data of the SSH protocol session and transmitted to the SSH protocol session. Similarly, the output data of the SSH protocol session is fed back to the Web socket protocol session in real time, and then converted by the Web socket protocol session and transmitted to the user end. The binding between the Web socket protocol session and the SSH protocol session can be regarded as a process of flow conversion mapping, that is, the input flow of the user is mapped to the input flow of the SSH protocol session through the Web socket protocol session, and the output flow of the SSH protocol session is mapped back to the output flow 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 ends. In order to ensure that each user's debugging request can be responded to, an asynchronous I / O processing mechanism can be applied to ensure that each user's debugging request can be responded to in real time in a high-concurrency situation.
[0070] Specifically, the asynchronous I / O is similar to an event-driven transformation 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 user end, the debugging request is immediately transmitted to the SSH protocol session through an event-driven mechanism, and the output flow of the SSH protocol session is listened to based on the signal identifier of the debugging request. When the corresponding output flow is listened to, the corresponding result is fed back to the corresponding user end through the event mechanism. In this way, each debugging request and its corresponding response result are independently run, thereby improving the concurrent processing capability of the system for multiple debugging requests.
[0071] In a possible implementation, when the amount of data transmitted between the Web socket protocol session and the SSH protocol session is large, a frame sequence number-based fragmentation transmission and recombination algorithm can be used to divide the entire data into multiple data segments, and mark a sequence number for each data segment. The receiving end receives data according to the sequence number order of the data segments, thereby ensuring 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 data transmission security can be ensured by encryption through the TLS encryption algorithm of the Web socket protocol itself. At the same time, in order to improve the energy utilization 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, and 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] The second connection establishing unit 2002 in the debugging processing module is configured to establish a WebRTC channel between the user end and the target operating system instance according to the bidirectional communication connection.
[0074] Unlike the Web socket protocol, the WebRTC protocol can provide more efficient real-time communication capabilities, which 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 improve the management efficiency of the user end for the target operating system instance as much as possible, on the basis of the established bidirectional communication between the user end and the target node, a WebRTC channel between the user end and the target operating system instance also needs to be established, thereby reducing the communication delay between the two as much as possible and improving the debugging efficiency.
[0075] Specifically, when establishing the WebRTC channel, the connection information between the second connection establishing unit and the target operating system is exchanged through the signaling server. In the connection information of both parties, the candidate connection path and the media parameter are included, and the second connection establishing unit can search all possible connection paths between the target operating system instance through the ICE algorithm. Each candidate path is evaluated in turn by the ICE algorithm, and the path with the lowest delay and the best quality is selected for connection, thereby ensuring the data transmission performance of the WebRTC channel.
[0076] The debugging unit 2001 is configured to transmit the target instance debugging command to the target operating system instance through the WebRTC channel in response to the target instance debugging command for the target operating system instance from the user end, so as to debug the target operating system instance.
[0077] Finally, in the case where the 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 realizing the rapid debugging of the target operating system instance.
[0078] Specifically, in the process of transmitting the target instance debugging command by the debugging unit, in order to ensure the compatibility of the debugging command with the operating system of the target operating system instance, the debugging unit establishes an instance debugging session according to the operating system type of the target operating system instance. For example, Figure 2 When the target operating system instance is a Redroid instance running on an Android operating system, the corresponding instance debugging session established is an ADB session. The ADB session is displayed on the interactive terminal of the user end, and the user inputs the debugging command in the ADB session, thereby realizing the rapid debugging of the target operating system instance.
[0079] The above is the overall introduction of the management system of the operating system instance provided by the embodiments 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 known that when the second connection establishment unit establishes the WebRTC channel between the user end and the target operating system instance, it determines the connection path with the lowest delay and the best transmission quality through the ICE algorithm. Therefore, in order to ensure the transmission quality of the WebRTC channel in real time, the management system provided by the embodiments of the present application also sets a connection monitoring unit, which is specifically used to perform the following two steps:
[0081] Step one, 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,
[0082] Step two, when at least one of the data transmission rate and the data transmission delay is lower than the corresponding preset threshold, replacing the WebRTC channel between the user end and the target operating system instance.
[0083] In actual application scenarios, the WebRTC channel transmits the debugging command and the result data fed back by the operating system instance through the RTP protocol. Therefore, the connection monitoring unit can monitor the data transmission rate and the data transmission delay in the WebRTC channel by combining the RTCP and the RTP protocol. When the data transmission rate or the data transmission delay in the channel is lower than the set threshold, other RTC channels can be adjusted and switched in time, thereby ensuring the real-time transmission and stability of the debugging command.
[0084] On the other hand, in actual vehicle networking cloud platforms, the debugging of each operating system instance is often performed by a debugging virtual machine in the cloud platform, and therefore the vehicle networking cloud platform often sets multiple debugging virtual machines.
[0085] In actual debugging scenarios, the debugging tasks for different operating system instances often have different task complexity. In order to ensure that the debugging virtual machines do not have excessive load when processing debugging tasks, the debugging processing module in the embodiments of the present application also has a load distribution unit for distributing debugging tasks to the virtual machines. The load distribution unit is specifically configured to perform the following three steps:
[0086] Step one, according to the real-time load data of each debugging virtual machine and a time series analysis algorithm, predicting the load of each debugging virtual machine to obtain the predicted load of each debugging virtual machine.
[0087] In the running process of the system, the load distribution unit collects 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 of the virtual machine. The real-time load data of each debugging virtual machine is transmitted to the load distribution unit in real time to facilitate the load distribution unit to distribute tasks.
[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 to obtain the predicted load of each debugging virtual machine, so as to subsequently distribute tasks according to the predicted load.
[0089] Step two, task analysis of the target instance debugging command to obtain the target debugging task complexity.
[0090] Step three, according to the target debugging task complexity and the predicted load of each debugging virtual machine, determining the debugging virtual machine for responding to the target instance debugging command.
[0091] Further, the load distribution unit analyzes the task of the target instance debugging command received in real time to determine the task complexity of the target debugging task. In this way, by the complexity of the debugging task and the predicted load of each debugging virtual machine, the debugging virtual machine with no excessive load in the future can be determined from multiple debugging virtual machines, and the debugging virtual machine is determined as the virtual machine for responding to the target instance debugging command, so as to ensure the load balance between multiple debugging virtual machines and improve the running 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 feed back the corresponding response log to the user end through the WebRTC channel. When multiple debugging commands exist at the same time, there will be too many logs, which will cause difficulty in displaying the logs.
[0093] Therefore, in order to solve the above problems, in the management system provided by the embodiment of the application, a special log management module is further arranged. Among them, the display management of the log is controlled by the log display unit in the log management module, and the log display unit is mainly used to execute the following two steps:
[0094] Step one, based on the stream processing algorithm, the output log of the target operating system instance is analyzed to extract the first log data stream from the output log.
[0095] In the display stage of the log, in order to ensure that the latest log of the target operating system instance can be displayed, the input log of the target operating system instance needs to be analyzed based on the stream processing algorithm to extract the latest generated log and obtain the first log data stream.
[0096] Step two, according to the sliding window algorithm and the log display item threshold, the first log data stream is displayed in the form of a sliding window on the interactive terminal of the user terminal.
[0097] Correspondingly, in the process of displaying the newly generated first log data stream to the user terminal, in order to avoid the interface information display overload of the user terminal and ensure that the log can be updated and displayed in real time, the display items of the log need to be reduced to below the item threshold by the sliding window algorithm and the log display item threshold of the user terminal, and the displayed log is updated by the sliding window method, so as to ensure that the real-time updated log can be displayed on the display interface of the user terminal.
[0098] In addition, in the process of controlling the log display, the first log data stream fed back by the target operating system instance often includes many logs irrelevant to the user demand. In order to ensure the display quality of the log, the log filtering unit is further arranged in the embodiment of the application, which is used to filter the useless or garbage log files in the first log data stream after obtaining the first log data stream, so as to optimize the effect of log display and reduce the loss of storage resources. Specifically, the log filtering unit is used to execute the following two steps:
[0099] Step one, according to the preset log filtering keyword and the Bloom filter, the hash result of the log in each log file in the first log data stream is calculated to obtain the hash result of each item log.
[0100] Step two, if the hash result of the log in the log file is not equal to the preset value, the log file is filtered, and after the filtering of the first log data stream is completed, the 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 using a hash function. Assuming the default value is 1, if the hash result corresponding to all log entries in the log file is 1, the log file is considered to meet the conditions. Otherwise, if there is a log entry with a hash result other than 1, the log file is filtered to ensure the data quality of the log data stream.
[0103] Bloom filters use multiple independent hash functions to map elements to bit arrays. Their core principle is to quickly determine the existence of elements by combining the sparsity of the bit array with the probability of hash collisions. For large-scale log data, this algorithm significantly reduces storage and computing resource consumption.
[0104] In one possible implementation, in order to improve system resource utilization 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 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 end, 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 downloaded after the last download, and determine this type of log as the target download log.
[0108] After identifying 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 utilization efficiency of network resources.
[0109] In addition, the system can also dynamically adjust the storage strategy of the log according to the access frequency of the user terminal to the log, for example, the log with high access frequency can be stored in a fast access storage device, and the low frequency or expired log can be transferred to a slow storage or archive, so as to dynamically allocate the storage resources of the system by analyzing the usage of the log, and improve the resource utilization of the system.
[0110] The embodiment of the application provides a management system of an operating system instance, which is applied to a vehicle Internet cloud platform and specifically comprises 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 terminal needs to debug the operating system instance in the vehicle Internet cloud platform, the target instance debugging request of the user terminal is responded by the identity authentication unit, so as to verify the identity authentication signature of the user terminal. Since the identity authentication signature of the user terminal is generated based on the signature verification key of the vehicle Internet cloud platform, the user only needs to verify once to access all nodes and operating system instances in the vehicle Internet cloud platform, thereby avoiding the repeated login problem involved in the application of the traditional SSH login, and improving the management efficiency of the operating system instance. Further, when the identity authentication signature of the user terminal is passed, on the basis of the traditional SSH protocol, the Web socket protocol and the SSH protocol session are combined to establish a bidirectional communication connection between the user terminal and the target node, so as to ensure the low-delay interaction between the user terminal and the target node, thereby simulating a complete debugging interaction environment through seamless integration between the Websocket protocol and the SSH protocol, so that the user can obtain similar experience to the traditional SSH terminal in the browser, and the management efficiency of the operating system instance is further improved. Finally, on the basis that the bidirectional communication between the user terminal and the target node has been established, the WebRTC channel between the user terminal and the target operating system instance is established through the bidirectional communication between the two, and the debugging of the user terminal to the target operating system instance is realized based on the WebRTC channel, so that the user terminal can remotely debug the operating system instance by using the real-time communication capability of WebRTC, and the management efficiency of the operating system instance is improved in multiple aspects.
[0112] Next, a management method of an operating system instance provided by the embodiment of the application is introduced, and the management method of an operating system instance described below can be correspondingly referred to the management system of an operating system instance described above.
[0113] Referring to Figure 3 The figure is a flowchart of a management method of an operating system instance provided by the embodiment of the application, specifically comprising the following steps:
[0114] S101: In response to a target instance debugging request from a user terminal, authenticate the user terminal according to the user terminal's authentication signature to obtain an authentication result; the 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 bidirectional 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 bidirectional 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 that can be used to store information by any method or technology. The information can be computer-readable instructions, data structures, program modules 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 disc read-only memory (CD-ROM), digital versatile disc (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 of the embodiments described in the specification of the present application adopts a progressive mode for description, and the same or similar parts between the embodiments can be mutually referred to. Each of the embodiments 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 part of the method embodiment. The above-described system, method and medium are only illustrative, and the units described as separate units can be or can not be physically separated, and the units described as units can be or can not be physical units, that is, they can be located in one place, or can be distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the embodiments according to actual needs. Those skilled in the art can understand and implement it without creative labor.
[0122] The above describes only one specific embodiment of the present application, but the protection scope of the present application is not limited to this. Any skilled person in the art can easily think of changes or replacements within the technical range disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A management system for an operating system instance, 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 authentication unit is configured to, in response to a target instance debugging request from a user terminal, authenticate the user terminal according to the authentication signature of the user terminal to obtain an authentication result; the authentication signature is generated based on a signature verification key pair of the Internet of Vehicles cloud platform; The first connection establishing unit is configured to establish a bidirectional communication connection between the user terminal and a target node based on a Web socket protocol and an 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 configured to establish a WebRTC channel between the user terminal and the target operating system instance according to the bidirectional communication connection; The debugging unit is configured to respond to a target instance debugging command for the target operating system instance from the user terminal, and transmit the target instance debugging command to the target operating system instance through the WebRTC channel to debug the target operating system instance.
2. The system according to claim 1, wherein: 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: 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, wherein: 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; The debugging processing module further includes a load distribution unit; the load distribution unit is specifically configured to: Performing load prediction on each debugging virtual machine based on the real-time load data of each debugging virtual machine and a time series analysis algorithm to obtain a predicted load of each debugging virtual machine; Performing task analysis on the target instance debugging command to obtain 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, wherein: The debugging unit is specifically used to: 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, wherein: Also includes: The log management module includes a log display unit, which 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 a sliding window algorithm and a log display entry threshold, the first log data stream is displayed in a 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 configured to: Performing hash calculations on the logs in each of the log files in the first log data stream according to a preset log screening keyword and a Bloom filter to obtain a hash result of each log entry; If the log file contains a log in which the hash result is not equal to the preset value, filtering processing is performed on the log file, and after the filtering processing on 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 configured to: In response to a log download request from 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; 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, wherein: 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 the Internet of Vehicles cloud platform, the method includes: In response to a target instance debugging request from a user terminal, authenticating the user terminal according to an authentication signature of the user terminal to obtain an authentication result; the authentication signature is generated based on a signature verification key pair of the Internet of Vehicles cloud platform; When the identity authentication result is passed, a bidirectional 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; Establishing a WebRTC channel between the client and the target operating system instance according to the bidirectional 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
WebRTC-based IPPBX call pressure test method and device, and medium
CN117201376A
Vehicle cloud cooperative communication method and system, electronic equipment and readable storage medium
CN118353942A