Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The application is illustrated below with reference to examples:
According to an aspect of the embodiment of the present application, there is provided a data transmission method, optionally, in this embodiment, the above data transmission method may be applied to a hardware environment composed of the server 101 and the terminal device 103 as shown in fig. 1. As shown in fig. 1, a server 101 is connected to a terminal 103 through a network, and may be used to provide services to a terminal device or an application installed on the terminal device, which may be a video application, an instant messaging application, a browser application, an educational application, a game application, or the like. The database 105 may be provided on or separate from the server for providing data storage services for the server 101, such as a game data storage server, which may include, but is not limited to: a wired network, a wireless network, wherein the wired network comprises: local area networks, metropolitan area networks, and wide area networks, the wireless network comprising: bluetooth, WIFI and other wireless communication networks, the terminal device 103 may be a terminal configured with an application program, and may include, but is not limited to, at least one of the following: mobile phones (such as Android Mobile phones, iOS Mobile phones, etc.), notebook computers, tablet computers, palm computers, MID (Mobile INTERNET DEVICES ), PAD, desktop computers, smart televisions, smart voice interaction devices, smart home appliances, vehicle terminals, aircrafts, virtual Reality (VR) terminals, augmented Reality (Augmented Reality, AR) terminals, mixed Reality (MR) terminals, etc., where the servers may be single servers, server clusters composed of multiple servers, or cloud servers.
As shown in fig. 1, the above data transmission method may be implemented in the terminal device 103 by the following steps:
S1, receiving first detection data sent by a client local machine room to a cloud management center on terminal equipment 103, wherein the first detection data comprise equipment parameters which are acquired and determined by equipment deployed in the client local machine room currently, and the client local machine room is connected with the cloud management center through a preset line;
S2, responding to the first detection data, and inquiring the current network condition of a preset line on the terminal equipment 103;
And S3, when the current network condition indicates that the network transmission rate is smaller than a first preset threshold value, sending the first detection data to the cloud management center through a delay queue on the terminal equipment 103.
Alternatively, in the present embodiment, the above-described data transmission method may also be implemented by a server, for example, in the server 101 shown in fig. 1; or by both the terminal device and the server.
The above is merely an example, and the present embodiment is not particularly limited.
Optionally, as an optional embodiment, as shown in fig. 2, the data transmission method includes:
S202, receiving first detection data sent to a cloud management center by a client local machine room, wherein the first detection data comprise equipment parameters which are currently acquired and determined for equipment deployed by the client local machine room, and the client local machine room is connected with the cloud management center through a preset line;
optionally, in this embodiment, the first detection data may include, but is not limited to, a current CPU temperature, a disk occupancy rate, a network card, and other device parameters of a device deployed for a current client local room.
Alternatively, in this embodiment, the client local machine room may include, but is not limited to, a plurality of client machine room hosts and a plurality of virtual machines deployed on the plurality of hosts.
Optionally, in this embodiment, the preset line may include, but is not limited to, a VPN and/or a connection dedicated line. It should be noted that, the first detection data may include, but is not limited to, data that is sent by the client local machine room to the cloud management center through a private line and/or VPN after collecting device parameters of the host machine deployed in the client local machine room and multiple virtual machines deployed on the host machine (may include, but is not limited to, collecting information by using an Agent process), where the device parameters may include, but are not limited to, CPU temperature, disk occupancy rate, network card, and the like.
For example, the client local machine room includes a host machine a, on which a virtual machine A1, a virtual machine A2, and a virtual machine A3 are deployed, and information acquisition operations are performed on CPU temperatures, disk occupancy rates, network cards, and the like of the host machine A1, the virtual machine A2, and the virtual machine A3, so as to obtain first detection data, and then the client local machine room sends the first detection data to the cloud management center through a preset line.
Among them, cloud computing (cloud computing) is a computing mode that distributes computing tasks over a resource pool formed by a large number of computers, enabling various application systems to acquire computing power, storage space, and information services as needed. The network that provides the resources is referred to as the "cloud". Resources in the cloud are infinitely expandable in the sense of users, and can be acquired at any time, used as needed, expanded at any time and paid for use as needed. As a basic capability provider of cloud computing, a cloud computing resource pool (abbreviated as cloud platform, generally referred to as IaaS (Infrastructure as a service) AS A SERVICE) is established, in which multiple types of virtual resources are deployed for external clients to select for use, wherein the cloud computing resource pool mainly includes computing devices (which are virtualized machines and include operating systems), storage devices, and network devices.
According to the logic function division, a PaaS (Platform AS A SERVICE, platform service) layer can be deployed on an IaaS (Infrastructure AS A SERVICE, infrastructure service) layer, and a SaaS (Software AS A SERVICE, service) layer can be deployed above the PaaS layer, or the SaaS can be directly deployed on the IaaS. PaaS is a platform on which software runs, such as a database, web container, etc. SaaS is a wide variety of business software such as web portals, sms mass senders, etc. Generally, saaS and PaaS are upper layers relative to IaaS.
A Private Cloud (Private Cloud) is a Cloud infrastructure created with software and hardware resources within a firewall for organizations or departments within an enterprise to share resources within a data center. A private cloud is created, and in addition to hardware resources, there is typically cloud equipment (IaaS, infrastructure AS A SERVICE) software.
Private cloud computing also includes three levels of cloud hardware, cloud platform, cloud services. In contrast, cloud hardware is a user's own personal computer or server, rather than a data center of a cloud computing vendor. Cloud computing manufacturers build data centers to provide public cloud services for millions of users, thus requiring tens of millions of servers. Private cloud computing serves only friends and relatives to individuals, and staff and clients and suppliers to businesses, so personal or business's own personal computers or servers are sufficient to provide cloud services.
Public clouds (Public clouds) generally refer to clouds that third party providers provide to users that can use, and are generally available over the Internet, and may be free or low cost, with the core attribute of the Public clouds being shared resource services. There are many examples of such clouds that can provide services throughout the open public network today.
Hybrid clouds (Hybrid clouds) merge Public clouds (Public clouds) and Private clouds (Private clouds), which are the main modes and development directions of Cloud computing in recent years. Private clouds are mainly for enterprise users, and for safety reasons, enterprises prefer to store data in private clouds (corresponding to the client local machine room), but at the same time want to obtain computing resources of public clouds, in which case hybrid clouds are increasingly adopted, and mix and match public clouds and private clouds to obtain the best effect, and the personalized solution achieves the purposes of saving money and safety.
In other words, the present application may include, but is not limited to, application to the hybrid cloud scenarios described above.
S204, responding to the first detection data, and inquiring the current network condition of the preset line;
S206, when the current network condition indicates that the network transmission rate is smaller than a first preset threshold, the first detection data is sent to the cloud management center through the delay queue.
Alternatively, in this embodiment, the current network condition may include, but is not limited to, a strong network and a weak network, and the basis for determining the network condition may include, but is not limited to, a delay, a packet loss rate, a network bandwidth (a "highest data rate" that can be passed from one point to another point in the network in a unit time), jitter (a time difference between a maximum delay and a minimum delay), and so on.
Optionally, in this embodiment, the first preset threshold may include, but is not limited to, a value that is set in advance by a related technician such as 100 bytes/second, 10000 bytes/second, etc. according to prior experience, where the first preset threshold may be modified according to a requirement of an actual data transmission service on the network condition, for example, when the user needs to perform data transmission at a higher network speed in an athletic network game, the related technician may set the first preset threshold to a higher value.
Optionally, in this embodiment, the delay queue may include, but is not limited to, a delay queue for storing collected data in a case of poor network conditions, so as to ensure integrity and security of data transmission in a case of poor network conditions.
It should be noted that, the access sequence of the data in the delay queue may include, but is not limited to, fetching the data from the head of the queue, storing the data from the tail of the queue, and the data in the delay queue is in a queued sequence.
Illustratively, cloud gaming (Cloud gaming) may also be referred to as game on demand (game on demand), which is an online gaming technology based on Cloud computing technology. Cloud gaming technology enables lightweight devices (THIN CLIENT) with relatively limited graphics processing and data computing capabilities to run high quality games. In a cloud game scene, the game is not run in a player game terminal, but is run in a cloud server, the cloud server renders the game scene into a video and audio stream, and the video and audio stream is transmitted to the player game terminal through a network. The player game terminal does not need to have strong graphic operation and data processing capability, and only needs to have basic streaming media playing capability and the capability of acquiring player input instructions and sending the player input instructions to the cloud server. Fig. 3 is a schematic diagram of a data transmission method according to an embodiment of the present application, as shown in fig. 3, when a user performs a network game, an acquisition proxy process in a local computer room of the game user acquires device parameters of a physical computer in the local computer room of the game user and a virtual machine deployed on the physical computer, and when the local computer room of the game user receives the acquired device parameters sent to a game cloud management center, if a current network condition indicates that a current network transmission rate is lower than a preset threshold, the acquired device parameters are sent to the game cloud management center through a delay queue.
Fig. 4 is a schematic diagram of a data transmission method according to an embodiment of the present application, as shown in fig. 4, when a user performs online shopping, after a collection agent process in a local computer room of a shopping user collects related data of a physical computer in the local computer room of the shopping user and a virtual machine deployed on the physical computer, and when the local computer room of the shopping user receives the collected data and sends the collected data to a shopping cloud management center, if a current network condition indicates that a current network transmission rate is lower than a preset threshold, the collected device parameters are sent to the shopping cloud management center through a delay queue.
It should be noted that, the host machine deployed in the client local machine room can complete the adaptation of the new model in the scheme of the application in a one-key manner.
In an exemplary embodiment, the data transmission method described above may also be applied to application scenarios including, but not limited to, cloud education, cloud conference, cloud social interaction, and the like.
Wherein, cloud education (Cloud Computing Education is abbreviated as CCEDU) refers to education platform services based on cloud computing business model application. On the cloud platform, all education institutions, training institutions, recruitment service institutions, propaganda institutions, industry associations, management institutions, industry media, legal structures and the like are integrated into a resource pool in a concentrated cloud mode, all resources are mutually displayed and interacted, the purposes are achieved according to needs, and therefore education cost is reduced, and efficiency is improved.
Cloud conferencing is an efficient, convenient, low-cost form of conferencing based on cloud computing technology. The user can rapidly and efficiently share voice, data files and videos with all groups and clients in the world synchronously by simply and easily operating through an internet interface, and the user is helped by a cloud conference service provider to operate through complex technologies such as data transmission, processing and the like in the conference.
At present, domestic cloud conference mainly focuses on service contents taking a Software as a main body (Software as a service) mode, including service forms such as telephone, network, video and the like, and video conference based on cloud computing is called as a cloud conference.
In the cloud conference era, the transmission, processing and storage of data are all processed by the computer resources of video conference factories, and users can carry out efficient remote conferences without purchasing expensive hardware and installing complicated software.
The cloud conference system supports the dynamic cluster deployment of multiple servers, provides multiple high-performance servers, and greatly improves conference stability, safety and usability. In recent years, video conferences are popular for a plurality of users because of greatly improving communication efficiency, continuously reducing communication cost and bringing about upgrade of internal management level, and have been widely used in various fields of transportation, finance, operators, education, enterprises and the like. Undoubtedly, the video conference has stronger attraction in convenience, rapidness and usability after the cloud computing is applied, and the video conference application is required to be stimulated.
Cloud Social contact (Cloud Social) is a virtual Social contact application mode of Internet of things, cloud computing and mobile Internet interaction application, aims at establishing a famous 'resource sharing relation graph', and further develops network Social contact, and is characterized in that a large number of Social resources are integrated and evaluated uniformly to form a resource effective pool to provide services for users as required. The more users that participate in the sharing, the greater the utility value that can be created.
According to the method, the device and the system for transmitting the data, the first detection data sent to the cloud management center by the client local machine room is received, the current network condition of the preset line is queried in response to the first detection data, the first detection data is sent to the cloud management center through the delay queue under the condition that the current network condition indicates that the network transmission rate is smaller than a first preset threshold value, the first detection data is firstly stored to the delay queue under the condition that the current network condition is poor through judgment of the current network condition, and then the first detection data is sent to the cloud management center through the delay queue, so that the first detection data can be completely and reliably reported to the cloud management center, the use experience of a user is optimized, the technical problem that the data transmission safety is low due to network abnormality is solved, and the technical effects of improving the data transmission integrity and safety are achieved.
As an alternative, the method further includes: inquiring the network condition of the previous period under the condition that the current network condition indicates that the network transmission rate is larger than a second preset threshold value, wherein the second preset threshold value is larger than or equal to the first preset threshold value; and under the condition that the network condition in the last period indicates that the network transmission rate is greater than a second preset threshold value, sending the first detection data to the cloud management center through a bypass path, wherein the bypass path indicates a path allowing the first detection data to pass through the cloud management center.
Optionally, in this embodiment, the second preset threshold may include, but is not limited to, a value set in advance by a related technician such as 100 bytes/second, 10000 bytes/second, etc. according to prior experience, where the second preset threshold may be modified according to a requirement of an actual data transmission service on the network condition, for example, when the user needs to perform data transmission with a higher security level in as short time as possible, the related technician may set the second preset threshold to a higher value, so as to ensure security of data transmission.
When the second preset threshold is greater than or equal to the first preset threshold, if the second preset threshold is equal to the first preset threshold, the current network condition may be represented as a strong network if the current network transmission rate is greater than 1000 mega/sec, and otherwise, the current network condition may be represented as a weak network if the current network transmission rate is less than 1000 mega/sec.
Optionally, in this embodiment, the above-mentioned previous period network condition indicates a network condition that is queried by the network condition identifier in a previous data transmission process that is currently performing the data transmission process after receiving the detection data sent by the client local machine room to the cloud management center.
Optionally, in this embodiment, in the case where the previous period network condition indicates that the network transmission rate is greater than the second preset threshold, sending the first detection data to the cloud management center through the bypass path may be understood as allowing the first detection data to be directly sent to the cloud management center when the current network condition indicates that the network transmission rate is greater than the second preset threshold and the previous period network condition indicates that the network transmission rate is greater than the second preset threshold.
As an alternative, in a case where the current network condition indicates that the network transmission rate is greater than the second preset threshold, after querying the previous network condition, the method further includes: inquiring a delay queue under the condition that the network condition of the previous period indicates that the network transmission rate is smaller than a first preset threshold value; under the condition that the historical detection data does not exist in the delay queue, the first detection data is sent to the cloud management center through a bypass path, wherein the historical detection data is detection data which is received in a historical period and sent to the cloud management center by a client local machine room; and waiting for the delay queue to transmit the history detection data under the condition that the delay queue has the history detection data, and transmitting the first detection data to the cloud management center through a bypass path under the condition that the delay queue transmits the completion history detection data.
Optionally, in this embodiment, when the current network condition indicates that the network transmission rate is greater than the second preset threshold, but the network condition of the previous period indicates that the network transmission rate is less than the first preset threshold, the delay queue is queried, which may be understood that the current network condition indicates that the current network environment is a strong network environment, but the network condition when the data transmission is performed in the previous period is a weak network environment, in other words, the network environment is changed from the weak network to the strong network, when the data transmission is performed in the previous period, the data is saved through the delay queue and then sent to the cloud management center, and then whether the data of the previous period exists in the delay queue should be queried.
Optionally, in this embodiment, the history detection data may include, but is not limited to, detection data sent to the cloud management center by the client local machine room received in the history period, for example, if the network condition in the previous period is a weak network environment, the detection data is stored in the delay queue, and sent to the cloud management center through the delay queue, and if the data in the delay queue is not sent when the current period is a strong network environment for data transmission, the history detection data exists in the delay queue.
According to the method and the device for transmitting the data, through judging the network conditions of the current period and the last period, when the current network condition indicates that the network transmission rate is larger than the second preset threshold value and the last period network condition indicates that the network transmission rate is smaller than the first preset threshold value, the delay queue is inquired, when the delay queue has history detection data, the delay queue waits for transmitting the history detection data, and when the delay queue transmits the history detection data, the first detection data is transmitted to the cloud management center through the bypass path, the integrity of data transmission can be guaranteed, and the technical effects of improving the data transmission safety and the data transmission efficiency are achieved.
As an alternative, the method further includes: after the first detection data is sent to the cloud management center through the bypass path or added to the delay queue, the current network condition is updated as the last period network condition; receiving second detection data sent to a cloud management center by a client local machine room, wherein the second detection data comprises equipment parameters which are acquired and determined for equipment deployed by the client local machine room in the current next period; when the network condition of the preset line indicates that the network transmission rate is smaller than a first preset threshold value when the second detection data is received, the second detection data is sent to the cloud management center through a delay queue; and inquiring the network condition of the last period when the network condition of the preset line indicates that the network transmission rate is greater than a second preset threshold value when the second detection data is received, and sending the second detection data to the cloud management center through a bypass path when the network condition of the last period indicates that the network transmission rate is greater than the second preset threshold value.
Optionally, in this embodiment, after the first detection data is sent to the cloud management center through the bypass path or the first detection data is added to the delay queue, the updating of the current network condition as the network condition of the previous cycle may be understood, for example, if the network condition when the first detection data is received in the first cycle is a strong network (the large network transmission rate is greater than the second preset threshold), after the first detection data is sent to the cloud management center through the bypass path, the network condition of the first cycle is taken as the network condition of the previous cycle, and when the second detection data is received in the second cycle, the network condition of the previous cycle needs to be queried, and the queried network condition is the network condition of the first cycle (the strong network).
Optionally, in this embodiment, the second detection data may include, but is not limited to, a current CPU temperature, a disk occupancy rate, a network card, and other device parameters of a device deployed for a current local machine room of the client, where the second detection data represents detection data received later than the first detection data.
It should be noted that, when the network condition of the preset line indicates that the network transmission rate is greater than the second preset threshold value when the second detection data is received, the transmission rate of the current network is indicated to reach the requirement of directly sending to the cloud management center through the bypass path, and then the network condition of the previous period is queried, and when the network condition of the previous period indicates that the network condition of the previous period is also a strong network, the second detection data is directly sent to the cloud management center through the bypass path.
For example, if the second preset threshold is 1000 mega/s, when the network condition of the preset line indicates that the network transmission rate is 1500 mega/s when the second detection data is received, and if the second preset threshold is greater than 1000 mega/s, the transmission rate of the current network is up to the requirement of directly sending the current network to the cloud management center through the bypass path, then the network condition of the previous period is queried, and when the network condition of the previous period indicates that the network condition of the previous period is also a strong network (the transmission rate is 1200 mega/s), the second detection data is directly sent to the cloud management center through the bypass path.
As an optional solution, in a case where the current network condition indicates that the network transmission rate is less than the first preset threshold, sending the first detection data to the cloud management center through the delay queue, where the sending includes: adding the first detection data to the tail of a delay queue under the condition that the current network condition indicates that the network transmission rate is smaller than a first preset threshold value, wherein the delay queue is set to send one detection data at a time from the queue; and under the condition that the delay queue sends the detection data to the first detection data positioned at the head of the delay queue, sending the first detection data to the cloud management center.
Alternatively, in this embodiment, in the case where the current network condition indicates that the network transmission rate is less than the first preset threshold, adding the first detection data to the end of the delay queue may be understood as, for example, adding the first detection data to the end of the delay queue if the current network transmission rate is 100 mega/sec, but the first preset threshold is 120 mega/sec, where the current network condition is less than the first preset threshold.
Alternatively, in this embodiment, in the case that the delay queue sends the detection data to the first detection data at the head of the delay queue, sending the first detection data to the cloud management center may be understood that when the delay queue includes the first detection data and the data 1 from the beginning to the end, sending the first detection data to the cloud management center
As an optional solution, in a case that the delay queue sends the detection data to the first detection data located at the head of the delay queue, sending the first detection data to the cloud management center includes: under the condition that the delay queue sends detection data to the first detection data positioned at the queue head of the delay queue, the first detection data is sent to the cloud management center; deleting the first detection data in the delay queue under the condition that the first detection data is successfully transmitted; and retransmitting the first detection data according to the target time interval under the condition that the first detection data is failed to be transmitted until the first detection data is successfully transmitted.
Alternatively, in this embodiment, the target time interval may be a fixed time interval of 0.1 second, 0.01 second, 1 second, etc., and the time interval of each retransmission is the same, or may be a time interval that varies according to the number of transmissions or the size of data, and the time interval of each retransmission is different.
Fig. 5 is a schematic diagram of yet another alternative data transmission method according to an embodiment of the present application, where, as shown in fig. 5, in a case where a current network condition indicates that a network transmission rate is less than a first preset threshold, data a is added to a tail of a delay queue, in a case where the delay queue sends detection data to a first detection data located at a head of the delay queue, data a is sent to a cloud management center, and when the sending is successful, data a is deleted from the delay queue.
As an alternative, in the case that the transmission of the first detection data fails, retransmitting the first detection data at the target time interval until the transmission of the first detection data is successful, including: under the condition that the first detection data transmission fails, acquiring the current retry number, wherein the current retry number represents the number of times that the first detection data has been retransmitted; and determining a target time interval according to the current retry times, and retransmitting the first detection data according to the target time interval until the first detection data is successfully transmitted, wherein the target time interval is positively correlated with the current retry times.
Alternatively, in this embodiment, the current retry number may include, but is not limited to, a determination based on the number of repeated transmissions of the first detection data, for example, if the current retry number is 6 times when the first detection data has been transmitted 6 times.
Alternatively, in the present embodiment, the above-mentioned target time interval is an interval between a time when the first detection data is transmitted again and a time when the first detection data is transmitted last time, wherein the target time interval may include, but is not limited to, a determination according to the following formula:
S=2*(n-1)
Where S represents a target time interval and n represents the current number of retries.
It should be noted that, according to the above formula for determining the target time interval, the more the number of retries, the longer the time from the next retransmission, the target time interval is positively correlated with the current number of retries.
As an alternative, the method further includes: under the condition that the first detection data is failed to be sent, acquiring the existence time and the preset valid period of the first detection data in a delay queue; retransmitting the first detection data according to the target time interval under the condition that the existing time does not exceed the preset expiration date until the first detection data is successfully transmitted; and pushing the first detection data to a message persistence module for storage under the condition that the existing time exceeds a preset effective period, and deleting the first detection data in a delay queue, wherein the message persistence module is deployed in a client local machine room.
Alternatively, in the present embodiment, the above-described preset expiration date may include, but is not limited to, 1 hour, 1 minute, 1 day, and the like.
It should be noted that the time of existence of the first detection data in the delay queue may include, but is not limited to, a time interval between a time of saving the first detection data to the delay queue and a current time.
Alternatively, in this embodiment, the message persistence module may include, but is not limited to, data for storing in the delay queue for a period exceeding a preset validity period, where the message persistence module is deployed in a client local room.
For example, if the preset validity period is 1 hour and the existence time of the first detection data in the delay queue is 61 minutes, the first detection data is pushed to the message persistence module for storage, and the first detection data is deleted in the delay queue.
As an alternative, the method further includes: when the current network condition indicates that the network transmission rate is smaller than a first preset threshold value and the first detection data is matched with a first service, the first detection data is sent to a cloud management center through a first delay queue, wherein the first service corresponds to the first delay queue; and under the condition that the current network condition indicates that the network transmission rate is smaller than a first preset threshold and the first detection data is matched with the second service, sending the first detection data to the cloud management center through a second delay queue, wherein the second service corresponds to the second delay queue, the first service is different from the second service, and the first delay queue and the second delay queue respectively and independently send the detection data.
Optionally, in this embodiment, the first service may include, but is not limited to, a service for performing first detection data transmission, and the second service may include, but is not limited to, a service for performing second detection data transmission, where the first delay queue is used to store and send the first detection data, and the second delay queue is used to store and send the second detection data, where the first detection data and the second detection data are different data, and the first detection data and the second detection data are both data that need to be transmitted by means of the delay queue in a weak network environment.
Illustratively, fig. 6 is a schematic diagram of yet another alternative data transmission method according to an embodiment of the present application, as shown in fig. 6, where the first service is configured to transmit the first detection data through the first delay queue, and when the first detection data is received, the network condition indicates that the network transmission rate is less than a first preset threshold; the second service is configured to transmit second detection data via the second delay queue, wherein upon receipt of the second detection data, the network condition indicates that the network transmission rate is less than a first preset threshold. The first delay queue and the second delay queue respectively and independently send detection data.
It should be noted that, the first service and the second service may include, but are not limited to, a service that is performed independently at the same time, and the first delay queue and the second delay queue may include, but are not limited to, a service that is performed independently at the same time.
As an alternative, the method further includes: detecting the network transmission speed of a preset line at fixed time through a network condition discriminator; setting the current network condition as a weak network state under the condition that the network transmission speed is smaller than a first preset threshold value; setting the current network condition to be a strong network state under the condition that the network transmission speed is greater than a second preset threshold value, wherein the second preset threshold value is greater than or equal to the first preset threshold value; the current network condition of the preset line is updated to be in a weak network state or a strong network state at regular time.
Optionally, in this embodiment, the network condition identifier may include, but is not limited to, an identifier that detects a current network condition, where the network condition identifier determines, when receiving the detection data, the current network condition, and the basis of the network condition determination may include, but is not limited to, a current network bandwidth, a delay rate, a packet loss rate, and the like.
For example, when the first preset threshold is 100 mega/sec and the second preset threshold is 120 mega/sec, if the current network transmission speed is 80 mega/sec, the current network condition is set to be in a weak network state; and if the current network transmission speed is 150 megas/s, setting the current network condition to be a strong network state.
The application is further illustrated by the following examples:
The core difference between the distributed cloud and the public cloud is that the distributed cloud is to deploy resources in a machine room appointed by a user under the cloud, and then the cloud upper management and control and the cloud lower client machine room are communicated through a VPN private line. In view of customer cost, the bandwidth of the VPN private line is often limited, and the VPN private line spans from cloud to cloud, and the transmission distance is also far, so that weak network conditions such as network failure or network congestion occur. The application provides a reliable transmission system based on a distributed cloud weak network scene, which ensures that host machine equipment detection information of a client machine room under the cloud can be reliably reported to the cloud for management and control under the weak network environment through a delay queue and a failure retry mechanism. Meanwhile, since the messages in the delay queue are removed from the queue only when the messages are successfully transmitted or the messages are out of date, even if the network is completely disconnected, the messages are not lost when successfully transmitted through the delay queue mechanism as long as the network condition is improved within the message validity period. The general flow chart of the present application is shown in FIG. 3, including but not limited to:
(1) After collecting information, the Agent of the host computer does not report the information to the cloud management and control module, but sends the information to the Proxy module. The network condition discriminator acts as a Proxy module portal forwarding messages to different network paths according to the current network conditions. When the network is a strong network environment, the message is directly forwarded to a Bypass path (direct connection), so that the transmission efficiency of the service under normal conditions is not affected; when the network is a weak network environment, the message is forwarded to a delay queue, and the reliability of the message in the weak network environment is ensured through a failure retry mechanism.
(2) The delay queues adopt a multi-queue mode, and different services have independent queues, so that mutual interference among different services can be avoided.
Two key points in the overall flow of the present application are described in detail below:
1. Network condition discriminator:
the network condition identifier workflow as shown in fig. 4 may include, but is not limited to, the following steps:
S1, a network condition discriminator monitors the network condition in real time through timing ping detection, and updates the current network condition in real time. And the network status of the present forwarding is saved after each forwarding is completed.
S2, after receiving the message pushed by the host Agent, the limited discriminator inquires the current network condition. If the network is a weak network, directly forwarding the message to a delay queue path; if the network is strong, the network condition of the last period needs to be further inquired. If the network is in the strong network state, directly forwarding the message to a Bypass path; if the network is a weak network, the message cannot be directly forwarded to the Bypass path;
s3, according to the step 2, when the current network is the strong network and the previous period is the weak network, the network condition is changed from the weak network to the strong network. In order to ensure the sequence of the messages, the messages can be forwarded to the Bypass path only after all the messages backlogged by the delay queues are consumed under the condition of weak network, and if not, the messages backlogged by the delay queues are always blocked until all the messages backlogged by the delay queues are consumed, so that the judgment of whether the messages exist in the delay queues is added in the flow.
S4, in order to detect that the network condition is changed from the weak network to the strong network, the discriminator saves the network condition forwarded at this time after each forwarding is completed.
2. Delay queues:
the delay queue processing flow is shown in fig. 5 and may include, but is not limited to, the following:
1. The amount of data detected by the host device is limited, so that a single producer and single consumer model of delay queues may be satisfied, as shown in the figure with only one producer and one consumer. The single producer and single consumer modes both avoid the overhead of lock contention and guarantee the order and integrity of messages.
2. In the weak network environment, a producer in the proxy module receives the message forwarded by the sink discriminator and stores the message in the delay queue.
3. The consumer in the proxy module takes the message from the delay queue and reports the message to the cloud upper management and control, but the message still exists in the delay queue at this time. Only when the message is successfully pushed to the cloud management and control, the message is removed from the delay queue, and the next message is continuously consumed. When the message is not successfully pushed to the cloud management and control, the failed message is retried until the message is successfully pushed, the retry interval is 2 x (n-1) s, and n is the retry times. And a failed retry mechanism ensures the reliability of the message in a weak network environment.
4. Due to the presence of the retry mechanism, messages must appear piled up in a weak network environment. When in a weak network environment for a long time, the system must not be able to cache messages of such large order. Therefore, each message is provided with a fixed validity period, and when the message is still not consumed in the validity period, the message is pushed to the message persistence module for storage after expiration, and data support is provided for data reconciliation. The distributed cloud client can set the corresponding message validity period according to the self demand.
According to the embodiment, in a normal strong network environment, host equipment detection information of a client machine room under the cloud is directly reported to a cloud end for management and control through a Bypass path, and the transmission efficiency is not affected; in a weak network environment, the host machine equipment detection information of a client machine room under the cloud can be reliably reported to the cloud upper management and control through a delay queue and a failure retry mechanism, the integrity of detection data is ensured, and the problem that the detection data has break points due to network disturbance is solved.
Meanwhile, the messages in the delay queue can be removed from the queue only when the messages are successfully sent or the messages are out of date, so that the messages can be successfully sent to the cloud end for management and control through a delay queue mechanism during network disconnection as long as the network is recovered within the effective period of the messages. Even if the network does not recover within the message validity period, we persist the expired message, and later can recover the data by offline reconciliation.
It will be appreciated that in the specific embodiments of the present application, related data such as user information is involved, and when the above embodiments of the present application are applied to specific products or technologies, user permissions or consents need to be obtained, and the collection, use and processing of related data need to comply with related laws and regulations and standards of related countries and regions.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present application is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required for the present application.
According to another aspect of the embodiment of the present application, there is also provided a data transmission apparatus for implementing the above data transmission method. As shown in fig. 10, the apparatus includes:
The receiving module 1002 is configured to receive first detection data sent by a client local machine room to a cloud management center, where the first detection data includes device parameters that are currently acquired and determined for devices deployed in the client local machine room, and the client local machine room is connected with the cloud management center through a preset line;
a query module 1004, configured to query a current network condition of a preset line in response to the first detection data;
a sending module 1006, configured to send the first detection data to the cloud management center through the delay queue when the current network status indicates that the network transmission rate is less than the first preset threshold.
As an alternative, the above device is further configured to: inquiring the network condition of the previous period under the condition that the current network condition indicates that the network transmission rate is larger than a second preset threshold value, wherein the second preset threshold value is larger than or equal to the first preset threshold value; and under the condition that the network condition in the last period indicates that the network transmission rate is greater than a second preset threshold value, sending the first detection data to the cloud management center through a bypass path, wherein the bypass path indicates a path allowing the first detection data to pass through the cloud management center.
As an alternative, the above device is further configured to: inquiring a delay queue under the condition that the network condition of the previous period indicates that the network transmission rate is smaller than a first preset threshold value; under the condition that the historical detection data does not exist in the delay queue, the first detection data is sent to the cloud management center through a bypass path, wherein the historical detection data is detection data which is received in a historical period and sent to the cloud management center by a client local machine room; and waiting for the delay queue to transmit the history detection data under the condition that the delay queue has the history detection data, and transmitting the first detection data to the cloud management center through a bypass path under the condition that the delay queue transmits the completion history detection data.
As an alternative, the above device is further configured to: after the first detection data is sent to the cloud management center through the bypass path or added to the delay queue, the current network condition is updated as the last period network condition; receiving second detection data sent to a cloud management center by a client local machine room, wherein the second detection data comprises equipment parameters which are acquired and determined for equipment deployed by the client local machine room in the current next period; when the network condition of the preset line indicates that the network transmission rate is smaller than a first preset threshold value when the second detection data is received, the second detection data is sent to the cloud management center through a delay queue; and inquiring the network condition of the last period when the network condition of the preset line indicates that the network transmission rate is greater than a second preset threshold value when the second detection data is received, and sending the second detection data to the cloud management center through a bypass path when the network condition of the last period indicates that the network transmission rate is greater than the second preset threshold value.
As an optional solution, the foregoing apparatus is further configured to send, when the current network condition indicates that the network transmission rate is less than the first preset threshold, first detection data to the cloud management center through the delay queue by: adding the first detection data to the tail of a delay queue under the condition that the current network condition indicates that the network transmission rate is smaller than a first preset threshold value, wherein the delay queue is set to send one detection data at a time from the queue; and under the condition that the delay queue sends the detection data to the first detection data positioned at the head of the delay queue, sending the first detection data to the cloud management center.
As an optional solution, the foregoing apparatus is further configured to send the first detection data to the cloud management center when the delay queue sends the detection data to the first detection data located at the head of the delay queue, and send the first detection data to the cloud management center when the delay queue sends the detection data to the first detection data located at the head of the delay queue; deleting the first detection data in the delay queue under the condition that the first detection data is successfully transmitted; and retransmitting the first detection data according to the target time interval under the condition that the first detection data is failed to be transmitted until the first detection data is successfully transmitted.
As an alternative, the above apparatus is further configured to retransmit the first detection data at the target time interval until the first detection data is successfully transmitted, where the first detection data is transmitted in the following manner: under the condition that the first detection data transmission fails, acquiring the current retry number, wherein the current retry number represents the number of times that the first detection data has been retransmitted; and determining a target time interval according to the current retry times, and retransmitting the first detection data according to the target time interval until the first detection data is successfully transmitted, wherein the target time interval is positively correlated with the current retry times.
As an alternative, the above device is further configured to: under the condition that the first detection data is failed to be sent, acquiring the existence time and the preset valid period of the first detection data in a delay queue; retransmitting the first detection data according to the target time interval under the condition that the existing time does not exceed the preset expiration date until the first detection data is successfully transmitted; and pushing the first detection data to a message persistence module for storage under the condition that the existing time exceeds a preset effective period, and deleting the first detection data in a delay queue, wherein the message persistence module is deployed in a client local machine room.
As an alternative, the above device is further configured to: when the current network condition indicates that the network transmission rate is smaller than a first preset threshold value and the first detection data is matched with a first service, the first detection data is sent to a cloud management center through a first delay queue, wherein the first service corresponds to the first delay queue; and under the condition that the current network condition indicates that the network transmission rate is smaller than a first preset threshold and the first detection data is matched with the second service, sending the first detection data to the cloud management center through a second delay queue, wherein the second service corresponds to the second delay queue, the first service is different from the second service, and the first delay queue and the second delay queue respectively and independently send the detection data.
As an alternative, the above device is further configured to: detecting the network transmission speed of a preset line at fixed time through a network condition discriminator; setting the current network condition as a weak network state under the condition that the network transmission speed is smaller than a first preset threshold value; setting the current network condition to be a strong network state under the condition that the network transmission speed is greater than a second preset threshold value, wherein the second preset threshold value is greater than or equal to the first preset threshold value; the current network condition of the preset line is updated to be in a weak network state or a strong network state at regular time.
According to one aspect of the present application, there is provided a computer program product comprising a computer program/instruction containing program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication portion 1109, and/or installed from the removable media 1111. When executed by the central processor 1101, performs the various functions provided by the embodiments of the present application.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
Fig. 11 schematically shows a block diagram of a computer system of an electronic device for implementing an embodiment of the application.
It should be noted that, the computer system 1100 of the electronic device shown in fig. 11 is only an example, and should not impose any limitation on the functions and the application scope of the embodiments of the present application.
As shown in fig. 11, the computer system 1100 includes a central processing unit 1101 (Central Processing Unit, CPU) that can perform various appropriate actions and processes according to a program stored in a Read-Only Memory 1102 (ROM) or a program loaded from a storage section 1108 into a random access Memory 1103 (Random Access Memory, RAM). In the random access memory 1103, various programs and data necessary for the system operation are also stored. The cpu 1101, the rom 1102, and the ram 1103 are connected to each other via a bus 1104. An Input/Output interface 1105 (i.e., an I/O interface) is also connected to bus 1104.
The following components are connected to the input/output interface 1105: an input section 1106 including a keyboard, a mouse, and the like; an output portion 1107 including a Cathode Ray Tube (CRT), a Liquid crystal display (Liquid CRYSTAL DISPLAY, LCD), and a speaker, etc.; a storage section 1108 including a hard disk or the like; and a communication section 1109 including a network interface card such as a local area network card, a modem, and the like. The communication section 1109 performs communication processing via a network such as the internet. The drive 1110 is also connected to the input/output interface 1105 as needed. Removable media 1111, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like, is installed as needed in drive 1110, so that a computer program read therefrom is installed as needed in storage section 1108.
In particular, the processes described in the various method flowcharts may be implemented as computer software programs according to embodiments of the application. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network via the communication portion 1109, and/or installed from the removable media 1111. The computer programs, when executed by the central processor 1101, perform the various functions defined in the system of the present application.
According to still another aspect of the embodiment of the present application, there is also provided an electronic device for implementing the above data transmission method, where the electronic device may be a terminal device or a server as shown in fig. 1. The present embodiment is described taking the electronic device as a terminal device as an example. As shown in fig. 12, the electronic device comprises a memory 1202 and a processor 1204, the memory 1202 storing a computer program, the processor 1204 being arranged to perform the steps of any of the method embodiments described above by means of the computer program.
Alternatively, in this embodiment, the electronic device may be located in at least one network device of a plurality of network devices of the computer network.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
S1, receiving first detection data sent to a cloud management center by a client local machine room, wherein the first detection data comprise equipment parameters which are currently acquired and determined for equipment deployed by the client local machine room, and the client local machine room is connected with the cloud management center through a preset line;
s2, responding to the first detection data, and inquiring the current network condition of a preset line;
And S3, under the condition that the current network condition indicates that the network transmission rate is smaller than a first preset threshold, sending the first detection data to the cloud management center through the delay queue.
Alternatively, it will be understood by those skilled in the art that the structure shown in fig. 12 is only schematic, and the electronic device may be a smart phone (such as an Android Mobile phone, an iOS Mobile phone, etc.), a tablet computer, a palm computer, a Mobile internet device (Mobile INTERNET DEVICES, MID), a PAD, etc. Fig. 12 is not limited to the structure of the electronic device and the electronic apparatus described above. For example, the electronics can also include more or fewer components (e.g., network interfaces, etc.) than shown in fig. 12, or have a different configuration than shown in fig. 12.
The memory 1202 may be used for storing software programs and modules, such as program instructions/modules corresponding to the data transmission method and apparatus in the embodiments of the present application, and the processor 1204 executes the software programs and modules stored in the memory 1202 to perform various functional applications and data processing, i.e., implement the data transmission method described above. Memory 1202 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 1202 may further include memory located remotely from the processor 1204, which may be connected to the terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The memory 1202 may be, but not limited to, a memory for storing information such as network status of a previous cycle. As an example, as shown in fig. 12, the memory 1202 may include, but is not limited to, a receiving module 1002, a querying module 1004, and a transmitting module 1006 in the data transmission device. In addition, other module units in the data transmission device may be included, but are not limited to, and are not described in detail in this example.
Optionally, the transmission device 1206 is configured to receive or transmit data via a network. Specific examples of the network described above may include wired networks and wireless networks. In one example, the transmission means 1206 comprises a network adapter (Network Interface Controller, NIC) that can be connected to other network devices and routers via a network cable to communicate with the internet or a local area network. In one example, the transmission device 1206 is a Radio Frequency (RF) module for communicating wirelessly with the internet.
In addition, the electronic device further includes: a display 1208 for displaying the detection data; and a connection bus 1210 for connecting the respective module parts in the above-described electronic apparatus.
In other embodiments, the terminal device or the server may be a node in a distributed system, where the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the plurality of nodes through a network communication. Among them, the nodes may form a Peer-To-Peer (P2P) network, and any type of computing device, such as a server, a terminal, etc., may become a node in the blockchain system by joining the Peer-To-Peer network.
According to an aspect of the present application, there is provided a computer-readable storage medium, from which a processor of a computer device reads the computer instructions, the processor executing the computer instructions, so that the computer device performs the data transmission method provided in various alternative implementations of the above-described data transmission aspect.
Alternatively, in the present embodiment, the above-described computer-readable storage medium may be configured to store a computer program for performing the steps of:
S1, receiving first detection data sent to a cloud management center by a client local machine room, wherein the first detection data comprise equipment parameters which are currently acquired and determined for equipment deployed by the client local machine room, and the client local machine room is connected with the cloud management center through a preset line;
s2, responding to the first detection data, and inquiring the current network condition of a preset line;
And S3, under the condition that the current network condition indicates that the network transmission rate is smaller than a first preset threshold, sending the first detection data to the cloud management center through the delay queue.
Alternatively, in this embodiment, it will be understood by those skilled in the art that all or part of the steps in the methods of the above embodiments may be performed by a program for instructing a terminal device to execute the steps, where the program may be stored in a computer readable storage medium, and the storage medium may include: flash disk, read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
The integrated units in the above embodiments may be stored in the above-described computer-readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing one or more computer devices (which may be personal computers, servers or network devices, etc.) to perform all or part of the steps of the method described in the embodiments of the present application.
In the foregoing embodiments of the present application, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In several embodiments provided by the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, such as the division of the units, is merely a logical function division, and may be implemented in another manner, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application, which are intended to be comprehended within the scope of the present application.