Cloud desktop flow management method and device and storage medium

By obtaining the flow log of the virtual private cloud and analyzing the source and destination addresses of the data packets, combining the correspondence between the private address and the cloud desktop, the problem of difficult to count the traffic of a single cloud desktop in the virtual private cloud is solved, and accurate traffic information management and control is achieved.

CN119520351APending Publication Date: 2025-02-25HANGZHOU ALICLOUD FEITIAN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311051550.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-18
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

In virtual private clouds, it is difficult to count traffic information of a single cloud desktop, resulting in the inability to effectively manage and control network traffic of the cloud desktop.

Method used

By obtaining the flow log of the virtual private cloud from the first log service, recording the traffic information of the elastic network card, and determining the traffic information of different private addresses based on the source and destination addresses of the data packets, and determining the traffic information of the cloud desktop based on the correspondence between the private address and the cloud desktop.

Benefits of technology

It realizes accurate statistics and identification of the traffic information of cloud desktops in virtual private clouds, and manages desktop-level traffic information without intrusion, supports traffic control and independent billing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119520351A_ABST
    Figure CN119520351A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a cloud desktop flow management method and device and a storage medium. The flow log of the virtual private cloud is obtained from the log service, and the flow log is used for recording the flow information of the elastic network card of the virtual private cloud, so that the total flow information of the virtual private cloud can be obtained. According to the method, the flow information of different private addresses in the virtual private cloud can be determined according to the source address and the destination address of the data packet in the flow log, and the flow information corresponding to the cloud desktop in the virtual private cloud can be determined in combination with the corresponding relationship between the private addresses in the virtual private cloud and the cloud desktop. In the implementation mode, the unique identification of the cloud desktop in the virtual private cloud is realized based on the private address, and the flow log of the elastic network card of the virtual private cloud is combined to record the flow information of different private addresses, so that the statistics and discrimination of the flow information of the desktop level are realized in a non-intrusive manner.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing technology, and in particular to a cloud desktop traffic management method, device and storage medium. Background Art

[0002] With the development of cloud computing, cloud computing platforms can provide shadowless cloud desktop services. Shadowless cloud desktop is a desktop service on a public cloud that supports fast and convenient desktop environment creation, deployment, unified management and operation and maintenance. It can be widely used in secure office, finance, design, film and television, education and other fields with high data security management and high performance computing requirements. In the use scenario of cloud desktop, for some users, especially enterprise users, one or more virtual private clouds (VPC) can be established as an intranet environment, and the cloud desktop runs in the intranet environment to ensure resource security. If the cloud desktop in the virtual private cloud needs to access the Internet, the public network gateway connected to the virtual private cloud can be used as the network exit to ensure network security. However, under this architecture, it is difficult to count the traffic information of a single cloud desktop in the virtual private cloud. Therefore, a new solution needs to be proposed. Summary of the invention

[0003] Multiple aspects of the present application provide a cloud desktop traffic management method, device, and storage medium for counting the traffic and bandwidth of a single cloud desktop in a virtual private cloud.

[0004] An embodiment of the present application provides a cloud desktop traffic management method, including: obtaining a flow log of a virtual private cloud from a first log service; the flow log is used to record traffic information of an elastic network card of the virtual private cloud; based on the source address and destination address of a data packet in the flow log, traffic information of different private addresses in the virtual private cloud is determined; based on the correspondence between the private address in the virtual private cloud and the cloud desktop and the traffic information of different private addresses in the virtual private cloud, traffic information corresponding to the cloud desktop in the virtual private cloud is determined.

[0005] Optionally, after determining the traffic information corresponding to the cloud desktop in the virtual private cloud, it also includes: providing the traffic information corresponding to the cloud desktop in the virtual private cloud to a second log service, so that the second log service generates traffic monitoring data in a specified format based on the traffic information corresponding to the cloud desktop in the virtual private cloud.

[0006] Optionally, it also includes: determining a speed limit command based on the traffic monitoring data; the speed limit command includes: a target private address and a corresponding speed limit value; and performing traffic control on network requests of the cloud desktop corresponding to the target private address according to the speed limit value through the gateway of the virtual private cloud.

[0007] Optionally, it also includes: determining the cumulative traffic value and / or instantaneous traffic peak value of different cloud desktops in the virtual private cloud based on the traffic monitoring data; and providing independent billing credentials for different cloud desktops in the virtual private cloud based on the cumulative traffic value and / or instantaneous traffic peak value of different cloud desktops in the virtual private cloud.

[0008] Optionally, before obtaining the flow log of the virtual private cloud from the first log service, it also includes: determining the log library of the virtual private cloud; sending a registration request to the first log service to request registration as a log consumer of the log library; obtaining the flow log of the virtual private cloud from the first log service, including: when the flow log of the virtual private cloud is updated, using the consumption thread corresponding to the log consumer to obtain the flow log of the virtual private cloud from the log library.

[0009] Optionally, after sending a registration request to the first log service to request registration as a log consumer of the log library, it also includes: scanning a designated directory of the first log service to detect whether there is a newly added log library; if there is a newly added log library, sending a registration request to the first log service to request registration as a log consumer of the newly added log library.

[0010] Optionally, after sending a registration request to the first log service to request registration as a log consumer of the log library, it also includes: if it is detected that the virtual private cloud does not generate traffic to access the external network, or it is detected that the resources corresponding to the virtual private cloud are released, stopping the consumption thread corresponding to the log consumer.

[0011] Optionally, based on the source address and destination address of the data packets in the flow log, traffic information corresponding to different private addresses is determined, including: determining a first group of data packets sent through an external network card from the data packets recorded in the flow log: determining the destination address of the first group of data packets based on the flow log; screening out a second group of data packets whose destination addresses are non-private addresses from the first group of data packets; determining the source address of the second group of data packets based on the flow log, and obtaining at least one private address for accessing the external network in the virtual private cloud; and counting the data volume of the data packets corresponding to each of the at least one private address to obtain the traffic information corresponding to the at least one private address.

[0012] An embodiment of the present application also provides a server, comprising: a memory and a processor; the memory is used to store one or more computer instructions; the processor is used to execute the one or more computer instructions to: execute the steps in the method provided in the embodiment of the present application.

[0013] The embodiment of the present application also provides a computer-readable storage medium storing a computer program, which can implement the steps in the method provided in the embodiment of the present application when the computer program is executed by a processor.

[0014] In the cloud desktop traffic management method provided in the embodiment of the present application, the flow log of the virtual private cloud is obtained from the log service, and the flow log is used to record the traffic information of the elastic network card of the virtual private cloud, so as to obtain the overall traffic information of the virtual private cloud. According to the source address and destination address of the data packet in the flow log, the traffic information of different private addresses in the virtual private cloud can be determined, and the traffic information corresponding to the cloud desktop in the virtual private cloud can be determined in combination with the correspondence between the private address and the cloud desktop in the virtual private cloud. In this embodiment, the unique identification of the cloud desktop in the virtual private cloud is realized based on the private address, and the flow log of the elastic network card of the virtual private cloud records the traffic information of different private addresses, so that the statistics and identification of desktop-level traffic information are realized non-invasively. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0016] Figure 1 A flow chart of a cloud desktop traffic management method provided by an exemplary embodiment of the present application;

[0017] Figure 2 A schematic diagram of the architecture of a desktop management and control service provided by an exemplary embodiment of the present application;

[0018] Figure 3 A flow chart of a cloud desktop traffic management method provided by another exemplary embodiment of the present application;

[0019] Figure 4 A schematic diagram of the structure of a server provided for an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. 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 making creative work are within the scope of protection of the present application.

[0021] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings, and "multiple" generally includes at least two, but does not exclude the inclusion of at least one.

[0022] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0023] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a product or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such a product or system. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the product or system including the elements.

[0024] In order to solve the technical problem that multiple cloud desktops in a virtual private cloud share a public gateway as a network exit, making it difficult to count the traffic of a single cloud desktop in the virtual private cloud, a solution is provided in some embodiments of the present application. The technical solutions provided in each embodiment of the present application are described in detail below in conjunction with the accompanying drawings.

[0025] Figure 1 is a flow chart of a cloud desktop traffic management method provided by an exemplary embodiment of the present application, the method may include: Figure 1 Steps shown:

[0026] Step 101: Obtain a flow log of a virtual private cloud from a first log service; the flow log is used to record traffic information of an elastic network card of the virtual private cloud.

[0027] Step 102: Determine the flow information of different private addresses in the virtual private cloud according to the source address and destination address of the data packet in the flow log.

[0028] Step 103: Determine the flow information corresponding to the cloud desktop in the virtual private cloud according to the correspondence between the private address in the virtual private cloud and the cloud desktop and the flow information of different private addresses in the virtual private cloud.

[0029] The execution subject of this embodiment can be the desktop management and control service of the cloud desktop, and the desktop management and control service can be specifically implemented as a software module for providing services to the cloud desktop, and the software module can run on any physical server or virtual server, and this embodiment does not limit it. Among them, the desktop management and control service can be used to analyze the desktop-level traffic information of the virtual private cloud. Among them, multiple cloud desktops can be run in the virtual private cloud, and the multiple cloud desktops can be different users in the same organization or enterprise. Among them, the virtual private cloud provides a flow log function for recording the incoming and outgoing traffic information of the elastic network card ENI (Elastic Network Interface) in the virtual private cloud. Among them, the flow log function of the virtual private cloud can aggregate the traffic information into logs and deliver them to the log service (Log Service, referred to as SL) for use. Among them, the log file obtained by aggregating the traffic information is described as a flow log (Flow Logs). In this embodiment, for the convenience of description and distinction, the log service used to store the flow logs directly generated by the virtual private cloud is described as the first log service.

[0030] Among them, the flow log function can be dynamically activated when the user activates the traffic package. For example, when the user activates the traffic package for the elastic network card of the virtual private cloud, the user can choose to activate the flow log function of the elastic network card. Among them, the flow log function can take effect at the same time as the traffic package. The flow log function can also be activated in the form of a scheduled task to avoid blocking the activation operation of the traffic package. For example, the flow log function can be activated at a specified time after the traffic package is activated, and this embodiment does not impose any restrictions. Among them, when activating the flow log, a log index can be activated to facilitate the search for the flow log. Among them, the log index may include: at least one of the source address, the destination address, the private network ID (Identity document) where the elastic network card is located, the elastic network card ID, and the recording time.

[0031] From the first log service, the flow log of the virtual private cloud can be obtained and analyzed. Among them, the source address, destination address and size of the data packet recorded in the flow log can be obtained. Among them, the source address refers to the address of the cloud desktop that sends the data packet; the address of the cloud desktop is the private address of the cloud desktop in the virtual private cloud. In the virtual private cloud, the private address can be used to uniquely identify the cloud desktop. Among them, the destination address refers to the address of the opposite end that receives the data packet sent by the cloud desktop. According to the source address, destination address and data packet size of the data packet, the traffic information of different private addresses in the virtual private cloud can be determined. Among them, the traffic information may include at least one of the accumulated traffic value and the instantaneous peak traffic value (bandwidth peak value). Among them, the accumulated traffic value can be used in a settlement mode that charges traffic according to the total amount of data; the instantaneous peak traffic value can be used in a mode of settlement according to the bandwidth peak value.

[0032] In the usage scenario of the cloud desktop, a public gateway is connected to the virtual private cloud, and the cloud desktop in the virtual private cloud accesses the external network through the public gateway. The external network refers to the network outside the virtual private cloud. In addition to accessing the external network, the network communication of the cloud desktop also includes access operations to the intranet. The access operation of the intranet is mainly the access of the cloud desktop to the cloud desktop management and control service. This part of the traffic is usually not used as the basis for traffic billing or traffic restriction. Therefore, in some embodiments, the traffic information of the private address counted mainly includes the information on the flow direction generated by the private address accessing the external network through the public gateway of the virtual private cloud. In some embodiments, after obtaining the flow log of the virtual private cloud, the data packets recorded in the flow log can be filtered to filter out the data packets accessing the external network.

[0033] Optionally, the elastic network card of the virtual private cloud may include an intranet network card and an extranet network card, wherein the intranet network card is mainly used to access the intranet, and the extranet network card is mainly used to access the extranet. Based on this, when determining the flow information corresponding to different private addresses according to the source address and destination address of the data packet in the flow log, the data packet sent through the extranet network card can be determined from the data packet recorded in the flow log, which is recorded as the first group of data packets. Among them, when the private address accesses the extranet, the accessed destination address does not include the private address in the virtual private cloud. Based on this, the destination address of the first group of data packets can be determined according to the flow log, and the second group of data packets with the destination address as a non-private address can be filtered out from the first group of data packets, thereby accurately filtering out the data packets sent to the extranet address through the extranet network card. After determining the second group of data packets, the source address of the second group of data packets can be determined according to the flow log, and at least one private address for accessing the extranet in the virtual private cloud can be obtained. By counting the data volume of the data packets corresponding to each of the at least one private address, the flow information corresponding to the at least one private address can be obtained.

[0034] Among them, different private addresses in the virtual private cloud correspond to different cloud desktops in the virtual private cloud. The correspondence between private addresses and cloud desktops in the virtual private cloud can be stored in a cloud desktop list. Among them, the cloud desktop list can be updated according to the addition or deletion of cloud desktops. Among them, the cloud desktop list can be generated by scanning the correspondence between private network addresses and cloud desktops in the virtual private cloud. The desktop management service can scan whether a new private address corresponding to the cloud desktop is added in the virtual private cloud; if so, the correspondence between the newly added private address and the cloud desktop is obtained, and the scanning operation is performed cyclically until the newly added correspondence is not detected, and the desktop list is updated according to the detected correspondence between the cloud desktop and the private address. Therefore, when the cloud desktop is updated, the cloud desktop list is dynamically updated to provide a basis for traffic analysis at the single desktop level.

[0035] Based on this, the correspondence between the private address and the cloud desktop in the virtual private cloud can be obtained more accurately through the cloud desktop list. According to the correspondence between the private address and the cloud desktop in the virtual private cloud and the traffic information of different private addresses in the virtual private cloud, the traffic information corresponding to the cloud desktop in the virtual private cloud can be determined. For example, cloud desktop D1, cloud desktop D2, cloud desktop D3 and cloud desktop D4 are running in the virtual private cloud, and the private addresses corresponding to the above cloud desktops are: IP1, IP2, IP3 and IP4. After analyzing the traffic information L1, L2, L3 and L4 corresponding to the private addresses IP1, IP2, IP3 and IP4 according to the flow log, it can be determined that the traffic information corresponding to cloud desktop D1, cloud desktop D2, cloud desktop D3 and cloud desktop D4 is L1, L2, L3 and L4 respectively according to the correspondence between the private address and the cloud desktop and the correspondence between the private address and the traffic information.

[0036] In this embodiment, the flow log of the virtual private cloud is obtained from the log service, and the flow log is used to record the flow information of the elastic network card of the virtual private cloud, so as to obtain the overall flow information of the virtual private cloud. According to the source address and destination address of the data packet in the flow log, the flow information of different private addresses in the virtual private cloud can be determined, and the flow information corresponding to the cloud desktop in the virtual private cloud can be determined in combination with the correspondence between the private address and the cloud desktop in the virtual private cloud. In this embodiment, the unique identification of the cloud desktop in the virtual private cloud is realized based on the private address, and the flow log of the elastic network card of the virtual private cloud records the flow information of different private addresses, so that the statistics and identification of desktop-level flow information are realized non-invasively.

[0037] In some optional embodiments, after determining the flow information corresponding to the cloud desktop in the virtual private cloud, the flow information corresponding to the cloud desktop in the virtual private cloud can be provided to the second log service. Among them, the second log service can be a log service directly accessed by the cloud resource monitoring service. The second log service can generate flow monitoring data in a specified format based on the flow information corresponding to the cloud desktop in the virtual private cloud, so that the cloud resource monitoring service can read, analyze and display it to the user. Among them, the cloud resource monitoring service is a user-oriented monitoring service for monitoring cloud resources. After the virtual private cloud is created, the cloud resource monitoring service can be used to monitor the resource usage, operating status and health of the virtual cloud resources according to the default monitoring indicators or user-defined monitoring indicators. The desktop management and control service provides the flow monitoring data to the cloud monitoring service, which can be used for the cloud monitoring service to perform statistical analysis on the flow monitoring data, for example, it can count the total flow, flow mean, flow peak and other indicators for user use.

[0038] Optionally, the traffic monitoring data can be used to implement traffic control at the single desktop level. In this embodiment, a speed limit command can be determined based on the traffic monitoring data; wherein the speed limit command includes: a target private address and a corresponding speed limit value. After determining the speed limit command, the network request of the cloud desktop corresponding to the target private address can be controlled according to the speed limit value through the gateway of the virtual private cloud. Among them, the target private address can be a private address of a cloud desktop whose traffic consumption value is greater than a set traffic threshold according to the traffic monitoring data, and can be a private address of a cloud desktop whose bandwidth peak is greater than a set bandwidth threshold according to the traffic monitoring data. This embodiment is not limited. Among them, traffic control mainly includes: limiting the bandwidth peak of the target private address. For example, following the above example, if the bandwidth peak of cloud desktop D2 is greater than the set bandwidth peak threshold, a speed limit command for cloud desktop D2 is determined, and the speed limit command can be used to limit the bandwidth peak of private address IP2 to 50M / s or 30M / s.

[0039] Optionally, the traffic monitoring data can be used to implement traffic billing at the single desktop level. In this embodiment, the traffic accumulation value and / or traffic instantaneous peak value of different cloud desktops in the virtual private cloud can be determined based on the traffic monitoring data, and independent billing credentials for different cloud desktops in the virtual private cloud can be provided based on the traffic accumulation value and / or traffic instantaneous peak value of different cloud desktops in the virtual private cloud. For example, in some scenarios, when the cloud desktops running in the virtual private cloud belong to different users, the billing system can obtain the traffic accumulation value of the cloud desktops corresponding to different users, and can perform service billing for different users based on the traffic accumulation value of the cloud desktops corresponding to different users.

[0040] The above embodiment records the implementation method in which the cloud desktop management and control service can obtain the flow log of the virtual cloud desktop from the first log service. Optionally, the flow log can be obtained based on the "data producer-consumer" model. An exemplary description will be given below.

[0041] In some optional embodiments, based on the log consumption group function provided by the first log service, the SDK (software development kit) can be used to register consumption groups and consumers to implement monitoring and consumption of flow logs in the first log service. In the log library, a single storage unit can be described as a fragment. When registering consumers, consumers and fragments can be configured as a one-to-many relationship. For example, one consumer can correspond to five fragments. Furthermore, a consumer can obtain flow logs from multiple fragments. Among them, any consumer can correspond to a thread pool, and the consumption thread in the thread pool is used to obtain flow logs from the monitored log library. Such as Figure 2As shown, the log library of the first log service includes multiple log queues, and the consumer group registered by the desktop control service may include multiple consumers, namely consumer 1, consumer 2 and consumer 3. Among them, consumer 1 corresponds to thread pool 1, and the consumer thread in thread pool 1 is used to monitor fragments 0-4 in the log library; consumer 2 corresponds to thread pool 2, and the consumer thread in thread pool 2 is used to monitor fragments 5-9 in the log library; consumer 3 corresponds to thread pool 3, and the consumer thread in thread pool 3 is used to monitor fragments 10-14 in the log library.

[0042] Optionally, before obtaining the flow log of the virtual private cloud from the first log service, the log store of the virtual private cloud can be determined, and a registration request can be sent to the first log service to request registration as a log consumer of the log store. Further, when the flow log of the virtual private cloud is updated, the consumption thread corresponding to the log consumer is used to obtain the flow log of the virtual private cloud from the log store.

[0043] In some embodiments, the log library may be dynamically increased. Therefore, the cloud desktop management and control service can detect whether the first log service has added a new log library based on a cyclic task, and register the log consumer of the newly added log library when a new log library is added. Optionally, the designated directory of the first log service can be scanned to detect whether there is a new log library; the designated directory can be a directory used by the first log service to store a list of log libraries, which is not limited in this embodiment. If there is a new log library, a registration request is sent to the first log service to request registration as a log consumer of the newly added log library. Based on this implementation, the dynamically updated log library can be monitored, and new log consumers can be adaptively added according to the dynamically updated log library, so that the flow log data of the virtual private cloud can be obtained more comprehensively, thereby more accurately analyzing the desktop-level traffic information of the virtual private cloud.

[0044] Optionally, after sending a registration request to the first log service to request registration as a log consumer of the log library, the virtual private cloud can be regularly detected to determine whether the log library consumption thread corresponding to the virtual private cloud is started normally. In some optional embodiments, it can be detected whether the virtual private cloud generates traffic to access the external network. For example, after obtaining the flow log of the virtual private cloud, the destination address of the data packet recorded in the flow log can be analyzed to determine whether it contains an external network address. If not, it can be determined that the virtual private cloud does not generate traffic to access the external network. At this time, the monitoring of the flow log of the virtual private cloud can be suspended, and the consumption thread corresponding to the log consumer of the virtual private cloud can be stopped. In other optional embodiments, it can be detected whether the resources corresponding to the virtual private cloud are released. For example, the computing resources, network resources, storage resources, etc. corresponding to the virtual private cloud are obtained in advance, and the occupancy of the above resources is detected in real time. If it is detected that the resources corresponding to the virtual private cloud are released, the consumption thread corresponding to the log consumer corresponding to the virtual private cloud is stopped.

[0045] In this implementation, when the virtual private cloud does not generate traffic for accessing the external network or the resources corresponding to the virtual private cloud are released, the idle threads can be stopped, which greatly reduces the consumption of resources.

[0046] Optionally, when consumers are acquiring flow logs from the log library, if there is a failure or retry, they can repeat the consumption of flow logs within the historical time period according to the consumption time point reset function and checkpoint recording function provided by the first log service. For example, the cloud desktop management service can upload a checkpoint every 30 seconds to repeat the consumption of flow log data within the past 30 seconds. Based on this implementation, the consumption point reset and checkpoint recording functions of the first log service can be used to accurately obtain the flow log data of the virtual private cloud under abnormal circumstances, thereby more accurately analyzing the desktop-level traffic information of the virtual private cloud.

[0047] After obtaining the analysis results of the flow log based on the implementation methods described in the above embodiments, the cloud desktop management and control service can print the log and submit the log to the designated log library of the second log service for storage, such as Figure 2 As shown. In some optional embodiments, the logs in the specified log library can be transmitted to the user through the transmission channel of the cloud resource monitoring service of the virtual private cloud. Based on this embodiment, the cloud resource monitoring can further obtain the single desktop level traffic information in the virtual private cloud from the cloud desktop management and control service, and output the single desktop level traffic information as the monitoring result of the cloud resource operation status, thereby providing the user with further cloud desktop management and control basis.

[0048] The following will be combined Figure 3 , the cloud desktop traffic management method provided in the embodiment of the present application is further exemplified.

[0049] like Figure 3 As shown, the desktop management service can determine whether the virtual private cloud has the flow log function enabled. If the virtual private cloud has the flow log function enabled, log data can be collected. If the virtual private cloud has not enabled the flow log function, a flow log can be created for each workspace network packet, and a log index can be created. After the log index is created, log data for the virtual private cloud can be collected. After the log data is collected, the log data can be consumed to analyze desktop-level traffic information based on the log data. After obtaining the desktop-level traffic information, the above traffic information can be pushed to the log service. Figure 3 As shown in Figure 1, the log service can be configured as the data source of the cloud resource monitoring service, and the cloud resource monitoring service can be connected to the data source. Then, users or other applications can obtain traffic statistics through the cloud resource monitoring service. Figure 3 As shown, the traffic statistics data obtained through the cloud resource monitoring service can be used to adjust the bandwidth of different cloud desktops in real time to dynamically adjust the bandwidth at the desktop level, thereby improving the overall network fluency of different cloud desktops in the same virtual private cloud and reducing the risk of extreme lag or disconnection for some cloud desktop users.

[0050] It should be noted that the execution subject of each step of the method provided in the above embodiment can be the same device, or the method can be executed by different devices. For example, the execution subject of steps 101 to 104 can be device A; for another example, the execution subject of steps 101 and 102 can be device A, and the execution subject of step 103 can be device B; and so on.

[0051] In addition, in some of the processes described in the above embodiments and the accompanying drawings, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or executed in parallel, and the sequence numbers of the operations, such as 101, 102, etc., are only used to distinguish between different operations, and the sequence numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit the "first" and "second" to be different types.

[0052] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0053] Figure 4 The schematic diagram of the structure of a server provided by an exemplary embodiment of the present application is shown, and the cloud desktop management and control service provided by the above-mentioned embodiment is run on the server to execute the cloud desktop traffic management method. Figure 4 As shown, the server includes: a memory 401 , a processor 402 and a communication component 403 .

[0054] The memory 401 is used to store computer programs and can be configured to store various other data to support operations on the server, such as instructions for any application program or method used to operate on the server.

[0055] The processor 402 is coupled to the memory 401 and is used to execute the computer program in the memory 401, so as to: obtain the flow log of the virtual private cloud from the first log service; the flow log is used to record the flow information of the elastic network card of the virtual private cloud; determine the flow information of different private addresses in the virtual private cloud according to the source address and destination address of the data packet in the flow log; determine the flow information corresponding to the cloud desktop in the virtual private cloud according to the correspondence between the private address in the virtual private cloud and the cloud desktop and the flow information of different private addresses in the virtual private cloud.

[0056] Optionally, after determining the traffic information corresponding to the cloud desktop in the virtual private cloud, the processor 402 is also used to: provide the traffic information corresponding to the cloud desktop in the virtual private cloud to a second log service, so that the second log service generates traffic monitoring data in a specified format based on the traffic information corresponding to the cloud desktop in the virtual private cloud.

[0057] Optionally, the processor 402 is also used to: determine a speed limit command based on the traffic monitoring data; the speed limit command includes: a target private address and a corresponding speed limit value; and perform traffic control on the network request of the cloud desktop corresponding to the target private address according to the speed limit value through the gateway of the virtual private cloud.

[0058] Optionally, the processor 402 is also used to: determine the cumulative traffic value and / or instantaneous traffic peak value of different cloud desktops in the virtual private cloud based on the traffic monitoring data; and provide independent billing credentials for different cloud desktops in the virtual private cloud based on the cumulative traffic value and / or instantaneous traffic peak value of different cloud desktops in the virtual private cloud.

[0059] Optionally, before obtaining the flow log of the virtual private cloud from the first log service, the processor 402 is also used to: determine the log library of the virtual private cloud; send a registration request to the first log service to request registration as a log consumer of the log library; obtain the flow log of the virtual private cloud from the first log service, including: when the flow log of the virtual private cloud is updated, using the consumption thread corresponding to the log consumer to obtain the flow log of the virtual private cloud from the log library.

[0060] Optionally, after sending a registration request to the first log service to request registration as a log consumer of the log library, the processor 402 is further used to: scan the specified directory of the first log service to detect whether there is a newly added log library; if there is a newly added log library, send a registration request to the first log service to request registration as a log consumer of the newly added log library.

[0061] Optionally, after sending a registration request to the first log service to request registration as a log consumer of the log library, the processor 402 also includes: if it is detected that the virtual private cloud does not generate traffic to access the external network, or it is detected that the resources corresponding to the virtual private cloud are released, then stopping the consumption thread corresponding to the log consumer.

[0062] Optionally, when the processor 402 determines the traffic information corresponding to different private addresses based on the source address and destination address of the data packets in the flow log, it is specifically used to: determine a first group of data packets sent through the external network card from the data packets recorded in the flow log; determine the destination address of the first group of data packets according to the flow log; filter out a second group of data packets whose destination address is a non-private address from the first group of data packets; determine the source address of the second group of data packets according to the flow log, and obtain at least one private address for accessing the external network in the virtual private cloud; count the data volume of the data packets corresponding to each of the at least one private address, and obtain the traffic information corresponding to the at least one private address.

[0063] Further, if Figure 4 As shown, the server also includes: a power supply component 404 and other components. Figure 4 Only some components are shown schematically, which does not mean that the server only includes Figure 4 Components shown.

[0064] Among them, the memory 401 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.

[0065] The communication component 403 is configured to facilitate wired or wireless communication between the device where the communication component is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as Wi-Fi (wireless network communication technology), 2G (such as Global System for Mobile Communications (GSM)), 3G (such as Wideband Code Division Multiple Access (WCDMA), 4G (such as Long Term Evolution (LTE)), 4G+ (such as upgraded Long Term Evolution (LTE-Advanced, LTE-A)) or 5G (Fifth Generation Mobile Communication Technology), or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component can be implemented based on Near Field Communication (NFC) technology, Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology and other technologies.

[0066] The power supply component 404 is used to provide power to various components of the device where the power supply component is located. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing and distributing power to the device where the power supply component is located.

[0067] In this embodiment, the flow log of the virtual private cloud is obtained from the log service, and the flow log is used to record the flow information of the elastic network card of the virtual private cloud, so as to obtain the overall flow information of the virtual private cloud. According to the source address and destination address of the data packet in the flow log, the flow information of different private addresses in the virtual private cloud can be determined, and the flow information corresponding to the cloud desktop in the virtual private cloud can be determined in combination with the correspondence between the private address and the cloud desktop in the virtual private cloud. In this embodiment, the unique identification of the cloud desktop in the virtual private cloud is realized based on the private address, and the flow log of the elastic network card of the virtual private cloud records the flow information of different private addresses, so that the statistics and identification of desktop-level flow information are realized non-invasively.

[0068] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, which, when executed, can implement the steps that can be executed by the server in the above method embodiment.

[0069] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM (Compact Disc Read-Only Memory, read-only optical disc read-only memory), optical storage, etc.) containing computer-usable program codes.

[0070] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0071] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0072] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0073] In a typical configuration, a computing device includes one or more processors (Central Processing Unit, CPU), input / output interface, network interface and memory.

[0074] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0075] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, Parallel Random Access Machine (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, CD-ROM, Digital Video Disc (DVD) or other optical storage, magnetic cassettes, 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. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

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

[0077] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A cloud desktop traffic management method, characterized in that: include: Obtain the flow log of the virtual private cloud from the first log service; The flow log is used to record the flow information of the elastic network card of the virtual private cloud; Determining flow information of different private addresses in the virtual private cloud according to the source address and destination address of the data packet in the flow log; According to the correspondence between the private address and the cloud desktop in the virtual private cloud and the traffic information of different private addresses in the virtual private cloud, the traffic information corresponding to the cloud desktop in the virtual private cloud is determined.

2. The method according to claim 1, characterized in that After determining the flow information corresponding to the cloud desktop in the virtual private cloud, the method further includes: The flow information corresponding to the cloud desktop in the virtual private cloud is provided to the second log service, so that the second log service generates flow monitoring data in a specified format according to the flow information corresponding to the cloud desktop in the virtual private cloud.

3. The method according to claim 2, characterized in that Also includes: Determining a speed limit command according to the traffic monitoring data; The speed limit command includes: a target private address and a corresponding speed limit value; Through the gateway of the virtual private cloud, flow control is performed on the network request of the cloud desktop corresponding to the target private address according to the speed limit value.

4. The method according to claim 2, characterized in that: Also includes: Determine, based on the traffic monitoring data, the traffic accumulation value and / or the traffic instantaneous peak value of different cloud desktops in the virtual private cloud; According to the traffic accumulation value and / or the instantaneous traffic peak value of different cloud desktops in the virtual private cloud, independent billing credentials of different cloud desktops in the virtual private cloud are provided.

5. The method according to any one of claims 1 to 4, characterized in that: Before obtaining the flow logs of the virtual private cloud from the first log service, the following steps are also required: Determining a log library of the virtual private cloud; Sending a registration request to the first log service to request registration as a log consumer of the log library; From the First Log Service, obtain the flow logs of the virtual private cloud, including: When the flow log of the virtual private cloud is updated, the consumption thread corresponding to the log consumer is used to obtain the flow log of the virtual private cloud from the log library.

6. The method according to claim 5, characterized in that After sending a registration request to the first log service to request registration as a log consumer of the log library, the method further includes: Scan the specified directory of the first log service to detect whether there is a newly added log library; If there is a newly added log library, a registration request is sent to the first log service to request to register as a log consumer of the newly added log library.

7. The method according to claim 5, characterized in that After sending a registration request to the first log service to request registration as a log consumer of the log library, the method further includes: If it is detected that the virtual private cloud does not generate traffic for accessing the external network, or if it is detected that the resources corresponding to the virtual private cloud are released, the consumption thread corresponding to the log consumer is stopped.

8. The method according to any one of claims 1 to 4, characterized in that: Determining flow information corresponding to different private addresses according to the source address and destination address of the data packet in the flow log includes: From the data packets recorded in the flow log, determine the first group of data packets sent through the external network card: Determining a destination address of the first group of data packets according to the flow log; Filtering out a second group of data packets whose destination addresses are non-private addresses from the first group of data packets; Determine the source address of the second group of data packets according to the flow log, and obtain at least one private address for accessing the external network in the virtual private cloud; The data volume of each data packet corresponding to the at least one private address is counted to obtain the flow information corresponding to the at least one private address.

9. A server, characterized in that: include: Memory and processor; The memory is used to store one or more computer instructions; The processor is configured to execute the one or more computer instructions to: perform the steps in the method according to any one of claims 1-8.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it can implement the cloud desktop traffic management method described in any one of claims 1-8.