Data transmission method and device, storage medium and electronic equipment
By using delay queues and failure retry mechanisms in a distributed cloud environment, it ensures that data can be reliably transmitted to the cloud management center in the event of network abnormalities, solving data transmission security issues caused by limited VPN dedicated line bandwidth and long transmission distances. , improving the integrity and security of data transmission.
Patent Information
- Application Number
- CN202310266521.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-13
- Publication Date
- 2024-09-13
AI Technical Summary
Existing technology In distributed cloud and public cloud environments, VPN dedicated lines have limited bandwidth and long transmission distances, resulting in network blockage or congestion, resulting in low data transmission security and possible data loss.
By receiving the detection data sent from the customer's local computer room to the cloud management center, the network status of the preset line is queried, and when the network transmission rate is less than the preset threshold, the data is sent to the cloud management center through a delay queue to ensure that the data is detected when the network is abnormal. Ability to report completely and reliably when necessary.
It improves the integrity and security of data transmission, optimizes the user experience, and solves the problem of low data transmission security due to network abnormalities.
Smart Images

Figure CN118646684A
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular to a data transmission method and device, a storage medium, and an electronic device. Background Art
[0002] At present, the core difference between distributed cloud and public cloud is that distributed cloud deploys resources in the computer room specified by the user under the cloud, and then connects the cloud control and the customer computer room under the cloud through VPN. However, the bandwidth of VPN is often limited, and the VPN needs to span from cloud to cloud, and the transmission distance is also relatively long. Therefore, weak network conditions such as network disconnection or network congestion often occur, resulting in the problem of data loss when the existing technology is reporting data.
[0003] Currently, no effective solution has been proposed to the above-mentioned problem of low data transmission security. Summary of the invention
[0004] The embodiments of the present application provide a data transmission method and device, a storage medium, and an electronic device to at least solve the technical problem of low data transmission security.
[0005] According to one aspect of an embodiment of the present application, a data transmission method is provided, including: receiving first detection data sent by a customer's local computer room to a cloud management center, wherein the first detection data includes equipment parameters currently collected and determined for equipment deployed in the customer's local computer room, and the customer's local computer room is connected to the cloud management center via a preset line; in response to the first detection data, querying a current network status of the preset line; and when the current network status indicates that the network transmission rate is less than a first preset threshold, sending the first detection data to the cloud management center via a delay queue.
[0006] According to another aspect of an embodiment of the present application, a data transmission device is also provided, including: a receiving module, used to receive first detection data sent by a customer's local computer room to a cloud management center, wherein the first detection data includes equipment parameters currently collected and determined for equipment deployed in the customer's local computer room, and the customer's local computer room is connected to the cloud management center through a preset line; a query module, used to query the current network status of the preset line in response to the first detection data; and a sending module, used to send the first detection data to the cloud management center through a delay queue when the current network status indicates that the network transmission rate is less than a first preset threshold.
[0007] Optionally, the device is also used to: when the current network status indicates that the network transmission rate is greater than a second preset threshold, query the network status of the previous cycle, wherein the second preset threshold is greater than or equal to the first preset threshold; when the network status of the previous cycle indicates that the network transmission rate is greater than the second preset threshold, send the first detection data to the cloud management center via a bypass path, wherein the bypass path indicates a path that allows the first detection data to pass directly through the cloud management center.
[0008] Optionally, the device is also used to: query the delay queue when the network status in the previous cycle indicates that the network transmission rate is less than the first preset threshold; when there is no historical detection data in the delay queue, send the first detection data to the cloud management center through the bypass path, wherein the historical detection data is the detection data sent by the customer's local computer room to the cloud management center in the historical period; when the historical detection data exists in the delay queue, wait for the delay queue to send the historical detection data, and when the delay queue completes sending the historical detection data, send the first detection data to the cloud management center through the bypass path.
[0009] Optionally, the device is also used to: after sending the first detection data to the cloud management center through a bypass path or adding the first detection data to the delay queue, update the current network status as the network status of the previous cycle; receive second detection data sent by the customer's local computer room to the cloud management center, wherein the second detection data includes equipment parameters collected and determined for equipment deployed in the customer's local computer room in the current next cycle; when the second detection data is received and the network status of the preset line indicates that the network transmission rate is less than the first preset threshold, send the second detection data to the cloud management center through the delay queue; when the second detection data is received and the network status of the preset line indicates that the network transmission rate is greater than the second preset threshold, query the network status of the previous cycle, and when the network status of the previous cycle indicates that the network transmission rate is greater than the second preset threshold, send the second detection data to the cloud management center through the bypass path.
[0010] Optionally, the device is also used for: when the current network status indicates that the network transmission rate is less than a first preset threshold, adding the first detection data to the tail of the delay queue, wherein the delay queue is set to send one detection data from the head of the queue at a time; when the delay queue sends the detection data to the head of the delay queue and the first detection data is located, sending the first detection data to the cloud management center.
[0011] Optionally, the device is also used to: when the delay queue sends the detection data to the head of the delay queue and the first detection data is located in the delay queue, send the first detection data to the cloud management center; when the first detection data is sent successfully, delete the first detection data in the delay queue; when the first detection data fails to be sent, resend the first detection data at a target time interval until the first detection data is sent successfully.
[0012] Optionally, the device is also used to: in case the first detection data fails to be sent, obtain the current retry number, wherein the current retry number indicates the number of times the first detection data has been resent; determine the target time interval based on the current retry number, and resend the first detection data according to the target time interval until the first detection data is sent successfully, wherein the target time interval is positively correlated with the current retry number.
[0013] Optionally, the device is also used to: in case the first detection data fails to be sent, obtain the existence time and preset validity period of the first detection data in the delay queue; in case the existence time does not exceed the preset validity period, resend the first detection data at the target time interval until the first detection data is successfully sent; in case the existence time exceeds the preset validity period, push the first detection data to the message persistence module for storage, and delete the first detection data from the delay queue, wherein the message persistence module is deployed in the customer's local computer room.
[0014] Optionally, the device is also used for: when the current network status indicates that the network transmission rate is less than the first preset threshold and the first detection data matches the first service, sending the first detection data to the cloud management center through a first delay queue, wherein the first service corresponds to the first delay queue; when the current network status indicates that the network transmission rate is less than the first preset threshold and the first detection data matches 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 send detection data independently.
[0015] Optionally, the device is also used to: periodically detect the network transmission speed of the preset line through a network status discriminator; when the network transmission speed is less than the first preset threshold, set the current network status to a weak network status; when the network transmission speed is greater than a second preset threshold, set the current network status to a strong network status, wherein the second preset threshold is greater than or equal to the first preset threshold; and periodically update the current network status of the preset line to the weak network status or the strong network status.
[0016] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned data transmission method when running.
[0017] According to another aspect of the embodiment of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above data transmission method.
[0018] According to another aspect of the embodiments of the present application, there is further provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the data transmission method through the computer program.
[0019] In an embodiment of the present application, a method is adopted in which first detection data sent from a customer's local computer room to a cloud management center is received, and in response to the first detection data, the current network status of a preset line is queried. When the current network status indicates that the network transmission rate is less than a first preset threshold, the first detection data is sent to the cloud management center via a delay queue. By judging the current network status, when the current network status is poor, the first detection data is first saved in the delay queue, and then the first detection data is sent to the cloud management center via the delay queue. This ensures that the first detection data can be reported to the cloud management center completely and reliably, optimizes the user experience, solves the technical problem of low data transmission security due to network anomalies, and achieves the technical effect of improving the integrity and security of data transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] 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:
[0021] Figure 1 is a schematic diagram of an application environment of an optional data transmission method according to an embodiment of the present application;
[0022] Figure 2 is a flowchart of an optional data transmission method according to an embodiment of the present application;
[0023] Figure 3 is a schematic diagram of an optional data transmission method according to an embodiment of the present application;
[0024] Figure 4 is a schematic diagram of another optional data transmission method according to an embodiment of the present application;
[0025] Figure 5 is a schematic diagram of another optional data transmission method according to an embodiment of the present application;
[0026] Figure 6 is a schematic diagram of another optional data transmission method according to an embodiment of the present application;
[0027] Figure 7 is a schematic diagram of another optional data transmission method according to an embodiment of the present application;
[0028] Figure 8 is a schematic diagram of another optional data transmission method according to an embodiment of the present application;
[0029] Fig. 9 is a schematic diagram of another optional data transmission method according to an embodiment of the present application;
[0030] Fig.10 is a schematic structural diagram of an optional data transmission device according to an embodiment of the present application;
[0031] Fig.11 is a schematic structural diagram of an optional data transmission product according to an embodiment of the present application;
[0032] Fig.12 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0033] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0034] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0035] The present application is described below in conjunction with embodiments:
[0036] According to one aspect of an embodiment of the present application, a data transmission method is provided. Optionally, in this embodiment, the data transmission method can be applied to Figure 1 In the hardware environment composed of the server 101 and the terminal device 103 shown in FIG. Figure 1As shown, the server 101 is connected to the terminal 103 via a network, and can be used to provide services for the terminal device or the application installed on the terminal device. The application can be a video application, an instant messaging application, a browser application, an educational application, a game application, etc. A database 105 may be set up on the server or independently of the server to provide data storage services for the server 101, for example, a game data storage server. The above-mentioned network may include, but is not limited to, a wired network and a wireless network, wherein the wired network includes, for example, a local area network, a metropolitan area network, and a wide area network; the wireless network includes, for example, Bluetooth, WIFI, and other networks that implement wireless communication; 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: a mobile phone (such as an Android phone, an iOS phone, etc.), a laptop computer, a tablet computer, a PDA, a MID (Mobile Internet Devices), a PAD, a desktop computer, a smart TV, an intelligent voice interaction device, a smart home appliance, a vehicle-mounted terminal, an aircraft, a virtual reality (VR) terminal, an augmented reality (AR) terminal, a mixed reality (MR) terminal, and other computer devices; the above-mentioned server may be a single server, a server cluster consisting of multiple servers, or a cloud server.
[0037] Combination Figure 1 As shown, the above data transmission method can be implemented in the terminal device 103 through the following steps:
[0038] S1, receiving first detection data sent by the customer's local computer room to the cloud management center on the terminal device 103, wherein the first detection data includes device parameters currently determined by collecting the devices deployed in the customer's local computer room, and the customer's local computer room is connected to the cloud management center through a preset line;
[0039] S2, in response to the first detection data, querying the current network status of the preset line on the terminal device 103;
[0040] S3, when the current network status indicates that the network transmission rate is less than the first preset threshold, the first detection data is sent to the cloud management center through the delay queue on the terminal device 103.
[0041] Optionally, in this embodiment, the above data transmission method may also be implemented by a server, for example, Figure 1 It is implemented in the server 101 shown; or it is implemented by the terminal device and the server together.
[0042] The above is only an example and is not specifically limited in this embodiment.
[0043] Optionally, as an optional implementation, as Figure 2 As shown, the above data transmission method includes:
[0044] S202, receiving first detection data sent by the customer's local computer room to the cloud management center, wherein the first detection data includes device parameters currently determined by collecting the devices deployed in the customer's local computer room, and the customer's local computer room is connected to the cloud management center through a preset line;
[0045] Optionally, in this embodiment, the first detection data may include but is not limited to device parameters such as the current CPU temperature, disk occupancy, and network card of the device currently deployed in the customer's local computer room.
[0046] Optionally, in this embodiment, the above-mentioned customer local computer room may include, but is not limited to, multiple customer computer room host machines and multiple virtual machines deployed on the multiple host machines.
[0047] Optionally, in this embodiment, the preset line may include but is not limited to VPN and / or dedicated connection line. It should be noted that the first detection data may include but is not limited to data sent to the cloud management center by the customer's local computer room through a dedicated line and / or VPN after collecting device parameters of a host machine deployed in the customer's local computer room and multiple virtual machines deployed on the host machine (may include but is not limited to using an Agent process to collect information), wherein the device parameters may include but are not limited to CPU temperature, disk occupancy, network card, etc.
[0048] For example, the customer's local computer room includes a host machine A, on which virtual machines A1, A2, and A3 are deployed. Information collection operations are performed on the CPU temperature, disk occupancy, network card, etc. of the host machine A1, A2, and A3 to obtain first detection data, and then the customer's local computer room sends the first detection data to the cloud management center through a preset line.
[0049] Among them, cloud computing is a computing model that distributes computing tasks on a resource pool composed of a large number of computers, so that various application systems can obtain computing power, storage space and information services as needed. The network that provides resources is called "cloud". The resources in the "cloud" are infinitely expandable in the eyes of users, and can be obtained at any time, used on demand, expanded at any time, and paid for by use. As a basic capability provider of cloud computing, a cloud computing resource pool (referred to as a cloud platform, generally referred to as an IaaS (Infrastructure as a Service) platform (corresponding to the aforementioned cloud management center) will be established, and various types of virtual resources will be deployed in the resource pool for external customers to choose to use. The cloud computing resource pool mainly includes: computing devices (virtualized machines, including operating systems), storage devices, and network devices.
[0050] According to the logical function division, the PaaS (Platform as a Service) layer can be deployed on the IaaS (Infrastructure as a Service) layer, and the SaaS (Software as a Service) layer can be deployed on the PaaS layer. SaaS can also be deployed directly on IaaS. PaaS is a platform for software operation, such as databases, web containers, etc. SaaS is a variety of business software, such as web portals, SMS mass senders, etc. Generally speaking, SaaS and PaaS are upper layers relative to IaaS.
[0051] A private cloud is a cloud infrastructure with software and hardware resources created within a firewall so that departments within an organization or enterprise can share resources within the data center. In addition to hardware resources, cloud equipment (IaaS, Infrastructure as a Service) software is generally required to create a private cloud.
[0052] Private cloud computing also includes three levels: cloud hardware, cloud platform, and cloud service. The difference is that cloud hardware is the user's own personal computer or server, not the cloud computing vendor's data center. The purpose of cloud computing vendors to build data centers is to provide public cloud services to millions of users, so they need to have tens of millions of servers. Private cloud computing only serves friends and relatives for individuals, and only serves employees, customers, and suppliers for enterprises. Therefore, an individual or enterprise's own personal computer or server is sufficient to provide cloud services.
[0053] Public Cloud usually refers to a cloud provided by a third-party provider for users to use. Public Cloud is generally available through the Internet and may be free or low-cost. The core attribute of Public Cloud is shared resource services. There are many instances of this cloud, which can provide services throughout the open public network today.
[0054] Hybrid Cloud combines public cloud and private cloud, and is the main model and development direction of cloud computing in recent years. Private cloud is mainly for enterprise users. For security reasons, enterprises are more willing to store data in private cloud (corresponding to the aforementioned customer local computer room), but at the same time hope to obtain computing resources of public cloud. In this case, hybrid cloud is increasingly adopted, which mixes and matches public cloud and private cloud to obtain the best effect. This personalized solution achieves the purpose of saving money and security.
[0055] In other words, the present application may include but is not limited to being applied to the above-mentioned hybrid cloud scenario.
[0056] S204, in response to the first detection data, querying the current network status of the preset line;
[0057] S206: When the current network status indicates that the network transmission rate is less than a first preset threshold, the first detection data is sent to the cloud management center through a delay queue.
[0058] Optionally, in this embodiment, the above-mentioned current network status may include but is not limited to a strong network or a weak network, and the basis for judging the network status may include but is not limited to delay, packet loss rate, network bandwidth (the "maximum data rate" that can be passed from one point in the network to another point in unit time), jitter (the time difference between the maximum delay and the minimum delay), etc.
[0059] Optionally, in this embodiment, the above-mentioned first preset threshold may include but is not limited to 100 bytes / second, 10,000 bytes per second, etc., which are values set in advance by relevant technical personnel based on prior experience for judging the current network status, wherein the first preset threshold can be modified according to the requirements of the actual data transmission service for the network status. For example, when a user plays a competitive online game and requires a higher network speed for data transmission, the relevant technical personnel can set the first preset threshold to a higher value.
[0060] Optionally, in this embodiment, the delay queue may include but is not limited to being used to save the collected data when the network condition is poor, so as to ensure the integrity and security of data transmission when the network condition is poor.
[0061] It should be noted that the access order of the data in the above delay queue may include but is not limited to taking out data from the head of the queue and storing data from the tail of the queue. The data in the delay queue is arranged in order.
[0062] For example, cloud gaming, also known as gaming on demand, is an online gaming technology based on cloud computing technology. Cloud gaming technology enables thin clients with relatively limited graphics processing and data computing capabilities to run high-quality games. In a cloud gaming scenario, the game is not played on the player's game terminal, but on a cloud server, which renders the game scene into a video and audio stream and transmits it to the player's game terminal over the network. The player's game terminal does not need to have powerful graphics computing and data processing capabilities, but only needs to have basic streaming media playback capabilities and the ability to obtain player input commands and send them to the cloud server. Figure 3 is a schematic diagram of a data transmission method according to an embodiment of the present application, such as Figure 3 As shown, when a user is playing an online game, the collection agent process in the game user's local computer room collects the device parameters of the physical computer in the game user's local computer room and the virtual machine deployed on the physical computer. When the collected device parameters are sent from the game user's local computer room to the game cloud management center, if the current network status indicates that the current network transmission rate is lower than the preset threshold, the collected device parameters are sent to the game cloud management center through a delay queue.
[0063] For example, Figure 4 is a schematic diagram of a data transmission method according to an embodiment of the present application, such as Figure 4 As shown, when a user is shopping online, the collection agent process in the shopping user's local computer room collects relevant data of the physical computer in the shopping user's local computer room and the virtual machine deployed on the physical computer. When the shopping user's local computer room sends the collected data to the shopping cloud management center, if the current network status indicates that the current network transmission rate is lower than the preset threshold, the collected device parameters are sent to the shopping cloud management center through a delay queue.
[0064] It should be noted that the host machine deployed in the customer's local computer room can complete the adaptation of the new model of this application solution in a one-click manner.
[0065] In an exemplary embodiment, the above data transmission method can also be applied to application scenarios including but not limited to cloud education, cloud conferencing, cloud social networking, etc.
[0066] Among them, Cloud Computing Education (CCEDU for short) refers to an education platform service based on the cloud computing business model. On the cloud platform, all educational institutions, training institutions, enrollment service institutions, publicity institutions, industry associations, management institutions, industry media, legal structures, etc. are integrated into a resource pool. Each resource is displayed and interacted with each other, and exchanges are made on demand to reach an agreement, thereby reducing education costs and improving efficiency.
[0067] Cloud conferencing is an efficient, convenient and low-cost conferencing format based on cloud computing technology. Users only need to use the Internet interface and perform simple and easy-to-use operations to quickly and efficiently share voice, data files and videos with teams and customers around the world. The cloud conferencing service provider helps users operate complex technologies such as data transmission and processing during the meeting.
[0068] At present, domestic cloud conferences are mainly concentrated on service content based on the SaaS (Software as a Service) model, including telephone, network, video and other service forms. Video conferencing based on cloud computing is called cloud conferencing.
[0069] In the era of cloud conferencing, data transmission, processing, and storage are all handled by the computer resources of video conferencing manufacturers. Users no longer need to purchase expensive hardware or install cumbersome software. They only need to open a browser and log in to the corresponding interface to conduct efficient remote meetings.
[0070] The cloud conference system supports dynamic cluster deployment of multiple servers and provides multiple high-performance servers, which greatly improves the stability, security and availability of conferences. In recent years, video conferencing has been welcomed by many users because it can greatly improve communication efficiency, continuously reduce communication costs, and upgrade internal management levels. It has been widely used in various fields such as transportation, finance, operators, education, and enterprises. There is no doubt that after the use of cloud computing, video conferencing has a stronger appeal in terms of convenience, speed, and ease of use, which will surely stimulate the arrival of a new wave of video conferencing applications.
[0071] Cloud Social is a virtual social application model for interactive applications of the Internet of Things, cloud computing and mobile Internet. It aims to establish the famous "resource sharing relationship map" and then carry out online social networking. The main feature of cloud social networking is to integrate and evaluate a large number of social resources to form an effective resource pool to provide services to users on demand. The more users who participate in sharing, the greater the utilization value that can be created.
[0072] Through this embodiment, the first detection data sent by the customer's local computer room to the cloud management center is received, and in response to the first detection data, the current network status of the preset line is queried. When the current network status indicates that the network transmission rate is less than the first preset threshold, the first detection data is sent to the cloud management center through a delay queue. By judging the current network status, when the current network status is poor, the first detection data is first saved in the delay queue, and then sent to the cloud management center through the delay queue. This ensures that the first detection data can be reported to the cloud management center completely and reliably, optimizes the user experience, solves the technical problem of low data transmission security due to network anomalies, and achieves the technical effect of improving the integrity and security of data transmission.
[0073] As an optional solution, the above method also includes: when the current network status indicates that the network transmission rate is greater than a second preset threshold, querying the network status of the previous cycle, wherein the second preset threshold is greater than or equal to the first preset threshold; when the network status of the previous cycle indicates that the network transmission rate is greater than the second preset threshold, sending the first detection data to the cloud management center via a bypass path, wherein the bypass path indicates a path that allows the first detection data to pass directly to the cloud management center.
[0074] Optionally, in this embodiment, the second preset threshold may include but is not limited to 100 bytes / second, 10,000 bytes / second, etc., which are values set in advance by relevant technical personnel based on prior experience for judging the current network status, wherein the second preset threshold may be modified according to the requirements of the actual data transmission service for the network status. For example, when the user needs to perform data transmission with a higher security level in the shortest possible time, the relevant technical personnel may set the second preset threshold to a higher value to ensure the security of data transmission.
[0075] It should be noted that the above-mentioned second preset threshold is greater than or equal to the above-mentioned first preset threshold. When the second preset threshold is equal to the first preset threshold, if the second preset threshold is equal to the first preset threshold of 1000 Mbit / s, when the current network transmission rate is greater than 1000 Mbit / s, the current network status can be represented as a strong network. Conversely, when the current network transmission rate is less than 1000 Mbit / s, the current network status can be represented as a weak network.
[0076] Optionally, in this embodiment, the above-mentioned previous cycle network status represents the network status queried by the network status discriminator in the previous data transmission process of the current data transmission process after receiving the detection data sent by the customer's local computer room to the cloud management center.
[0077] Optionally, in this embodiment, the above-mentioned sending of the first detection data to the cloud management center through a bypass path when the network status in the previous cycle indicates that the network transmission rate is greater than the second preset threshold can be understood as allowing the first detection data to be sent directly to the cloud management center when the current network status indicates that the network transmission rate is greater than the second preset threshold and the network status in the previous cycle indicates that the network transmission rate is greater than the second preset threshold.
[0078] As an optional solution, when the current network status indicates that the network transmission rate is greater than a second preset threshold, after querying the network status of the previous cycle, the method also includes: when the network status of the previous cycle indicates that the network transmission rate is less than a first preset threshold, querying the delay queue; when there is no historical detection data in the delay queue, sending the first detection data to the cloud management center through a bypass path, wherein the historical detection data is the detection data sent from the customer's local computer room to the cloud management center in the historical period; when there is historical detection data in the delay queue, waiting for the delay queue to send the historical detection data, and when the delay queue completes sending the historical detection data, sending the first detection data to the cloud management center through a bypass path.
[0079] Optionally, in this embodiment, when the above-mentioned current network status indicates that the network transmission rate is greater than the second preset threshold, but the network status in the previous cycle indicates that the network transmission rate is less than the first preset threshold, querying the delay queue can be understood as that the current network status indicates that the current network environment is strong, but the network status during data transmission in the previous cycle was a weak network environment. In other words, the network environment is changed from a weak network to a strong network. When data transmission was performed in the previous cycle, the data was saved through the delay queue and then sent to the cloud management center. Therefore, it is necessary to first query whether there is any data from the previous cycle in the delay queue.
[0080] Optionally, in this embodiment, the above-mentioned historical detection data may include but is not limited to detection data sent from the customer's local computer room to the cloud management center during the historical period. For example, if the network condition in the previous period is a weak network environment, the detection data will be stored in a delay queue and sent to the cloud management center through the delay queue. If the current period is a strong network environment for data transmission, the data in the delay queue has not been sent yet, which means that there is historical detection data in the delay queue.
[0081] Through this embodiment, by judging the network status of the current cycle and the previous cycle, when the current network status indicates that the network transmission rate is greater than the second preset threshold and the network status of the previous cycle indicates that the network transmission rate is less than the first preset threshold, the delay queue is queried, and when there is historical detection data in the delay queue, the delay queue is waited for to send the historical detection data, and when the delay queue has completed sending the historical detection data, the first detection data is sent to the cloud management center through a bypass path, which can ensure the integrity of data transmission and achieve the technical effect of improving data transmission security and data transmission efficiency.
[0082] As an optional solution, the above method also includes: after sending the first detection data to the cloud management center through a bypass path or adding the first detection data to a delay queue, updating the current network status as the network status of the previous cycle; receiving the second detection data sent by the customer's local computer room to the cloud management center, wherein the second detection data includes equipment parameters determined by collecting equipment deployed in the customer's local computer room in the current next cycle; when the network status of the preset line when the second detection data is received indicates that the network transmission rate is less than the first preset threshold, sending the second detection data to the cloud management center through a delay queue; when the network status of the preset line when the second detection data is received indicates that the network transmission rate is greater than the second preset threshold, querying the network status of the previous cycle, and when the network status of the previous cycle indicates that the network transmission rate is greater than the second preset threshold, sending the second detection data to the cloud management center through a bypass path.
[0083] Optionally, in this embodiment, after the first detection data is sent to the cloud management center through a bypass path or the first detection data is added to the delay queue, updating the current network status as the network status of the previous cycle can be understood as, for example, if the network status when the first detection data is received in the first cycle is a strong network (a large network transmission rate is greater than a second preset threshold), after the first detection data is sent to the cloud management center through a bypass path, the network status of the first cycle is used as the network status of the previous cycle. When the second detection data is received in the second cycle, it is necessary to queried the network status of the previous cycle, and the queried network status is the network status of the first cycle (strong network).
[0084] Optionally, in this embodiment, the second detection data may include but is not limited to the current CPU temperature, disk occupancy, network card and other device parameters of the equipment deployed in the current customer's local computer room, wherein the second detection data represents detection data received later than the first detection data.
[0085] It should be noted that when the network status of the preset line indicates that the network transmission rate is greater than the second preset threshold when the second detection data is received, it means that the transmission rate of the current network has reached the requirement of being sent directly to the cloud management center through the bypass path, and then the network status of the previous cycle is queried. When the network status of the previous cycle indicates that the network status of the previous cycle is also a strong network, the second detection data is sent directly to the cloud management center through the bypass path.
[0086] For example, if the second preset threshold is 1000 Mbit / s, when the second detection data is received, the network status of the preset line indicates that the network transmission rate is 1500 Mbit / s. If it is greater than the second preset threshold of 1000 Mbit / s, it means that the current network transmission rate has reached the requirement of being sent directly to the cloud management center through a bypass path, and then the network status of the previous cycle is queried. When the network status of the previous cycle indicates that the network status of the previous cycle is also a strong network (transmission rate is 1200 Mbit / s), the second detection data is sent directly to the cloud management center through the bypass path.
[0087] As an optional solution, when the current network status indicates that the network transmission rate is less than a first preset threshold, the first detection data is sent to the cloud management center via a delay queue, including: when the current network status indicates that the network transmission rate is less than the first preset threshold, the first detection data is added to the end of the delay queue, wherein the delay queue is set to send one detection data from the head of the queue at a time; when the delay queue sends the detection data to the head of the delay queue, the first detection data is sent to the cloud management center.
[0088] Optionally, in this embodiment, when the current network condition indicates that the network transmission rate is less than the first preset threshold, the first detection data is added to the tail of the delay queue. For example, if the current network transmission rate is 100 Mbit / s, but the first preset threshold is 120 Mbit / s, the current network condition is less than the first preset threshold, then the first detection data is added to the tail of the delay queue.
[0089] Optionally, in this embodiment, in the case where 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 can be understood as sending the first detection data to the cloud management center when the delay queue includes the first detection data and data 1 from the beginning to the end.
[0090] As an optional scheme, when the delay queue sends detection data to a place where the first detection data is located at the head of the delay queue, the first detection data is sent to the cloud management center, including: when the delay queue sends detection data to a place where the first detection data is located at the head of the delay queue, sending the first detection data to the cloud management center; when the first detection data is sent successfully, deleting the first detection data in the delay queue; when the first detection data fails to be sent, resending the first detection data at the target time interval until the first detection data is sent successfully.
[0091] Optionally, in this embodiment, the target time interval can be a fixed time interval such as 0.1 second, 0.01 second, 1 second, etc., and the time interval for each retransmission is the same; or it can be a time interval that changes according to the number of transmissions or the size of the data, and the time interval for each retransmission is different.
[0092] For example, Figure 5 is a schematic diagram of another optional data transmission method according to an embodiment of the present application, such as Figure 5 As shown, when the current network condition indicates that the network transmission rate is less than the first preset threshold, data A is added to the tail of the delay queue. When the delay queue sends detection data to the head of the delay queue and the first detection data is located at the head of the delay queue, data A is sent to the cloud management center. When the transmission is successful, data A is deleted from the delay queue.
[0093] As an optional scheme, in the event that the first detection data fails to be sent, the first detection data is resent according to a target time interval until the first detection data is successfully sent, including: in the event that the first detection data fails to be sent, obtaining a current number of retries, wherein the current number of retries indicates the number of times the first detection data has been resent; determining a target time interval based on the current number of retries, and resending the first detection data according to the target time interval until the first detection data is successfully sent, wherein the target time interval is positively correlated with the current number of retries.
[0094] Optionally, in this embodiment, the current number of retries may include but is not limited to being determined based on the number of repeated transmissions of the first detection data. For example, if the first detection data has been transmitted 6 times, the current number of retries is 6 times.
[0095] Optionally, in this embodiment, the target time interval is the interval between the time when the first detection data is sent again and the time when the first detection data was sent last time, wherein the target time interval may be determined, but is not limited to, according to the following formula:
[0096] S = 2*(n-1)
[0097] Where S represents the target time interval and n represents the current number of retries.
[0098] It should be noted that, according to the above formula for determining the target time interval, the more retries there are, the longer the time until the next retransmission, and the target time interval is positively correlated with the current number of retries.
[0099] As an optional solution, the above method also includes: in the event that the first detection data fails to be sent, obtaining the existence time and preset validity period of the first detection data in the delay queue; in the event that the existence time does not exceed the preset validity period, resending the first detection data at the target time interval until the first detection data is successfully sent; in the event that the existence time exceeds the preset validity period, pushing the first detection data to the message persistence module for storage, and deleting the first detection data from the delay queue, wherein the message persistence module is deployed in the customer's local computer room.
[0100] Optionally, in this embodiment, the above-mentioned preset validity period may include but is not limited to 1 hour, 1 minute, 1 day, etc.
[0101] It should be noted that the existence time of the first detection data in the delay queue may include but is not limited to the time interval between the time when the first detection data is saved in the delay queue and the current time.
[0102] Optionally, in this embodiment, the message persistence module may include but is not limited to data stored in the delay queue for a period exceeding a preset validity period, wherein the message persistence module is deployed in the customer's local computer room.
[0103] 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 from the delay queue.
[0104] As an optional scheme, the above method also includes: when the current network status indicates that the network transmission rate is less than a first preset threshold and the first detection data matches the first service, the first detection data is sent to the cloud management center through a first delay queue, wherein the first service corresponds to the first delay queue; when the current network status indicates that the network transmission rate is less than a first preset threshold and the first detection data matches the second service, the first detection data is sent 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 send the detection data independently.
[0105] Optionally, in this embodiment, the above-mentioned first service may include but is not limited to a service for transmitting first detection data, and the above-mentioned second service may include but is not limited to a service for transmitting second detection data, 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, wherein 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 with the help of delay queues in a weak network environment.
[0106] For example, Figure 6 is a schematic diagram of another optional data transmission method according to an embodiment of the present application, such as Figure 6 As shown, the first service is used to transmit the first detection data through the first delay queue, wherein when the first detection data is received, the network status indicates that the network transmission rate is less than the first preset threshold; the second service is used to transmit the second detection data through the second delay queue, wherein when the second detection data is received, the network status indicates that the network transmission rate is less than the first preset threshold. The first delay queue and the second delay queue send the detection data independently.
[0107] It should be noted that the first service and the second service may include but are not limited to services that are performed independently at the same time, and the first delay queue and the second delay queue may include but are not limited to data transmission that is performed independently at the same time.
[0108] As an optional solution, the above method also includes: periodically detecting the network transmission speed of the preset line through a network status discriminator; when the network transmission speed is less than a first preset threshold, setting the current network status to a weak network status; when the network transmission speed is greater than a second preset threshold, setting the current network status to a strong network status, wherein the second preset threshold is greater than or equal to the first preset threshold; and periodically updating the current network status of the preset line to a weak network status or a strong network status.
[0109] Optionally, in this embodiment, the above-mentioned network status discriminator may include but is not limited to a discriminator for detecting the current network status, wherein the network status discriminator discriminates the current network status upon receiving the detection data, and the basis for judging the network status may include but is not limited to the current network bandwidth, delay rate, packet loss rate, etc.
[0110] For example, when the first preset threshold is 100 Mbps and the second preset threshold is 120 Mbps, if the current network transmission speed is 80 Mbps, the current network status is set to a weak network status; if the current network transmission speed is 150 Mbps, the current network status is set to a strong network status.
[0111] The following is a further explanation of this application with reference to specific examples:
[0112] The core difference between distributed cloud and public cloud is that distributed cloud deploys resources in the computer room designated by the user under the cloud, and then connects the cloud control and the customer computer room under the cloud through a VPN dedicated line. Considering customer costs, the bandwidth of VPN dedicated lines is often limited, and the VPN dedicated line has to cross from cloud to cloud, and the transmission distance is also relatively long, so weak network conditions such as network disconnection or network congestion often occur. This application proposes a reliable transmission system based on distributed cloud weak network scenarios. Through a delay queue and a failure retry mechanism, it is ensured that in a weak network environment, the host device detection information of the customer computer room under the cloud can be reliably reported to the cloud control. At the same time, since the message in the delay queue will only be removed from the queue when the message is successfully sent or the message expires, even if the network is completely disconnected, as long as the network conditions improve within the validity period of the message, the message will be successfully sent through the delay queue mechanism and will not be lost. The overall flow chart of this application is as follows Figure 3 As shown, including but not limited to:
[0113] (1) After the host agent collects information, it does not report it directly to the cloud control, but sends it to the Proxy module. The network status discriminator serves as the entrance to the Proxy module and forwards messages to different network paths according to the current network status. When the network is strong, the message is directly forwarded to the Bypass path (bypass path, direct), so it does not affect the transmission efficiency under normal business conditions; when the network is weak, the message will be forwarded to the delay queue, and the failure retry mechanism is used to ensure the reliability of the message in a weak network environment.
[0114] (2) The delay queue adopts a multi-queue mode, and different services have independent queues, which can avoid mutual interference between different services.
[0115] The following is a detailed description of two key points in the overall application process:
[0116] 1. Network status discriminator:
[0117] The network status discriminator works as follows: Figure 4 The steps shown may include but are not limited to:
[0118] S1. The network status discriminator monitors the network status in real time through regular ping detection, and updates the current network status in real time. And after each forwarding is completed, the network status of this forwarding will be saved.
[0119] S2. After receiving the message pushed by the host agent, the restricted discriminator queries the current network status. If it is a weak network, the message is directly forwarded to the delay queue path; if it is a strong network, it is necessary to further query the network status of the previous cycle. If it is a strong network state, the message is directly forwarded to the Bypass path; if it is a weak network, the message cannot be directly forwarded to the Bypass path;
[0120] S3. From step 2, we know that when the current network is strong and the previous network was weak, it means that the network status has changed from weak to strong. In order to ensure the order of messages, it is necessary to ensure that all the messages accumulated in the delay queue are consumed in the case of weak network before forwarding the message to the Bypass path. Otherwise, it will be blocked until all the messages accumulated in the delay queue are consumed. Therefore, the judgment of whether there are messages in the delay queue is added to the process.
[0121] S4, in order to detect the change of network status from weak network to strong network and then to weak network, the discriminator will save the network status of each forwarding after completing the forwarding.
[0122] 2. Delay queue:
[0123] The delay queue processing flow is as follows Figure 5 The following may be included but not limited to:
[0124] 1. The amount of data detected by the host device is limited, so the delay queue of the single producer and single consumer mode can meet the requirements. As shown in the figure above, there is only one producer and one consumer. The single producer and single consumer mode avoids the overhead of lock competition and ensures the order and integrity of messages.
[0125] 2. In a weak network environment, the producer in the proxy module receives the message forwarded by the destination discriminator and saves the message to the delay queue.
[0126] 3. The consumer in the proxy module takes the message from the delay queue and reports it to the cloud control, but the message still exists in the delay queue. Only when the message is successfully pushed to the cloud control will it be removed from the delay queue and the next message will be consumed. If the message fails to be successfully pushed to the cloud control, the failed message will be retried until the message is successfully pushed. The retry interval is 2*(n-1)s, where n is the number of retries. The failure retry mechanism ensures the reliability of messages in a weak network environment.
[0127] 4. Due to the existence of the retry mechanism, messages will inevitably accumulate in a weak network environment. When in a weak network environment for a long time, the system will definitely not be able to cache such a large number of messages. Therefore, each message will be set with a fixed validity period. If the message is still not consumed within the validity period, it will be pushed to the message persistence module for storage after the expiration to provide data support for data reconciliation. Distributed cloud customers can set the corresponding message validity period according to their own needs.
[0128] Through this embodiment, in a normal strong network environment, the host device detection information of the customer's room under the cloud is directly reported to the cloud management and control through the Bypass path, and the transmission efficiency is not affected; in a weak network environment, through the delay queue and failure retry mechanism, it is ensured that the host device detection information of the customer's room under the cloud can be reliably reported to the cloud management and control, ensuring the integrity of the detection data and solving the problem of breakpoints in the detection data caused by network disturbances.
[0129] At the same time, since messages in the delay queue are only removed from the queue when they are successfully sent or expired, even if the network is completely disconnected, as long as the network is restored within the validity period of the message, the messages during the disconnection period can be successfully sent to the cloud management through the delay queue mechanism. Even if the network is not restored within the validity period of the message, we will persist the expired message, and the data can still be restored through offline reconciliation later.
[0130] It is understandable that in the specific implementation of this application, related data such as user information is involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0131] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0132] According to another aspect of the embodiments of the present application, a data transmission device for implementing the above data transmission method is also provided. Fig.10 As shown, the device comprises:
[0133] The receiving module 1002 is used to receive first detection data sent by the customer's local computer room to the cloud management center, wherein the first detection data includes device parameters currently collected and determined for the devices deployed in the customer's local computer room, and the customer's local computer room is connected to the cloud management center through a preset line;
[0134] A query module 1004, configured to query a current network status of a preset line in response to the first detection data;
[0135] The sending module 1006 is used 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.
[0136] As an optional solution, the above-mentioned device is also used to: when the current network status indicates that the network transmission rate is greater than a second preset threshold, query the network status of the previous cycle, wherein the second preset threshold is greater than or equal to the first preset threshold; when the network status of the previous cycle indicates that the network transmission rate is greater than the second preset threshold, send the first detection data to the cloud management center through a bypass path, wherein the bypass path indicates a path that allows the first detection data to pass directly to the cloud management center.
[0137] As an optional solution, the above-mentioned device is also used to: query the delay queue when the network status in the previous cycle indicates that the network transmission rate is less than a first preset threshold value; when there is no historical detection data in the delay queue, send the first detection data to the cloud management center through a bypass path, wherein the historical detection data is the detection data sent from the customer's local computer room to the cloud management center in the historical period; when there is historical detection data in the delay queue, wait for the delay queue to send the historical detection data, and when the delay queue completes sending the historical detection data, send the first detection data to the cloud management center through a bypass path.
[0138] As an optional solution, the above-mentioned device is also used to: after sending the first detection data to the cloud management center through a bypass path or adding the first detection data to a delay queue, update the current network status as the network status of the previous cycle; receive the second detection data sent by the customer's local computer room to the cloud management center, wherein the second detection data includes equipment parameters collected and determined from the equipment deployed in the customer's local computer room in the current next cycle; when the network status of the preset line indicates that the network transmission rate is less than the first preset threshold when the second detection data is received, send the second detection data to the cloud management center through a delay queue; when the network status of the preset line indicates that the network transmission rate is greater than the second preset threshold when the second detection data is received, query the network status of the previous cycle, and when the network status of the previous cycle indicates that the network transmission rate is greater than the second preset threshold, send the second detection data to the cloud management center through a bypass path.
[0139] As an optional solution, the above-mentioned device is also used to send the first detection data to the cloud management center through a delay queue in the following manner when the current network status indicates that the network transmission rate is less than a first preset threshold: when the current network status indicates that the network transmission rate is less than the first preset threshold, the first detection data is added to the end of the delay queue, wherein the delay queue is set to send one detection data from the head of the queue at a time; when the delay queue sends the detection data to the head of the delay queue and the first detection data is located, the first detection data is sent to the cloud management center.
[0140] As an optional scheme, the above-mentioned device is also used to send the first detection data to the cloud management center in the following manner: when the delay queue sends the detection data to a place where the first detection data is located at the head of the delay queue; when the delay queue sends the detection data to a place where the first detection data is located at the head of the delay queue; when the first detection data is sent successfully, delete the first detection data in the delay queue; when the first detection data fails to be sent, resend the first detection data at the target time interval until the first detection data is sent successfully.
[0141] As an optional solution, the above-mentioned device is also used to, in the case where the first detection data fails to be sent, resend the first detection data according to the target time interval until the first detection data is successfully sent in the following manner: in the case where the first detection data fails to be sent, obtain the current number of retries, wherein the current number of retries indicates the number of times the first detection data has been resent; determine the target time interval based on the current number of retries, and resend the first detection data according to the target time interval until the first detection data is successfully sent, wherein the target time interval is positively correlated with the current number of retries.
[0142] As an optional solution, the above-mentioned device is also used to: when the first detection data fails to be sent, obtain the existence time and preset validity period of the first detection data in the delay queue; when the existence time does not exceed the preset validity period, resend the first detection data at the target time interval until the first detection data is successfully sent; when the existence time exceeds the preset validity period, push the first detection data to the message persistence module for storage, and delete the first detection data from the delay queue, wherein the message persistence module is deployed in the customer's local computer room.
[0143] As an optional solution, the above-mentioned device is also used for: when the current network status indicates that the network transmission rate is less than a first preset threshold and the first detection data matches the first service, the first detection data is sent to the cloud management center through a first delay queue, wherein the first service corresponds to the first delay queue; when the current network status indicates that the network transmission rate is less than a first preset threshold and the first detection data matches the second service, the first detection data is sent 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 send the detection data independently.
[0144] As an optional solution, the above-mentioned device is also used to: periodically detect the network transmission speed of the preset line through a network status discriminator; when the network transmission speed is less than a first preset threshold, set the current network status to a weak network status; when the network transmission speed is greater than a second preset threshold, set the current network status to a strong network status, wherein the second preset threshold is greater than or equal to the first preset threshold; and periodically update the current network status of the preset line to a weak network status or a strong network status.
[0145] According to one aspect of the present application, a computer program product is provided, the computer program product comprising a computer program / instruction, the computer program / instruction comprising a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 1109, and / or installed from a removable medium 1111. When the computer program is executed by the central processor 1101, various functions provided in the embodiments of the present application are executed.
[0146] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0147] Fig.11 The structure block diagram of a computer system for implementing an electronic device according to an embodiment of the present application is schematically shown.
[0148] It should be noted that Fig.11The computer system 1100 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0149] like Fig.11 As shown, the computer system 1100 includes a central processing unit 1101 (CPU), which can perform various appropriate actions and processes according to the program stored in the read-only memory 1102 (ROM) or the program loaded from the storage part 1108 to the random access memory 1103 (RAM). Various programs and data required for system operation are also stored in the random access memory 1103. The central processing unit 1101, the read-only memory 1102 and the random access memory 1103 are connected to each other through a bus 1104. An input / output interface 1105 (Input / Output interface, i.e., I / O interface) is also connected to the bus 1104.
[0150] The following components are connected to the input / output interface 1105: an input section 1106 including a keyboard, a mouse, etc.; an output section 1107 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1108 including a hard disk, etc.; and a communication section 1109 including a network interface card such as a LAN card, a modem, etc. The communication section 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to the input / output interface 1105 as needed. A removable medium 1111, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1110 as needed so that a computer program read therefrom is installed into the storage section 1108 as needed.
[0151] In particular, according to an embodiment of the present application, the process described in each method flow chart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program contains a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1109, and / or installed from the removable medium 1111. When the computer program is executed by the central processor 1101, various functions defined in the system of the present application are executed.
[0152] According to another aspect of the embodiment of the present application, an electronic device for implementing the above data transmission method is also provided. The electronic device may be Figure 1 The terminal device or server shown in the figure. This embodiment is described by taking the electronic device as a terminal device as an example. Fig.12 As shown, the electronic device includes a memory 1202 and a processor 1204. The memory 1202 stores a computer program, and the processor 1204 is configured to execute the steps in any of the above method embodiments through the computer program.
[0153] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.
[0154] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0155] S1, receiving first detection data sent by a customer's local computer room to a cloud management center, wherein the first detection data includes equipment parameters currently collected and determined for equipment deployed in the customer's local computer room, and the customer's local computer room is connected to the cloud management center via a preset line;
[0156] S2, in response to the first detection data, querying the current network status of the preset line;
[0157] S3, when the current network status indicates that the network transmission rate is less than the first preset threshold, the first detection data is sent to the cloud management center through the delay queue.
[0158] Alternatively, a person skilled in the art may understand that: Fig.12 The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (MID), a PAD, and other terminal devices. Fig.12 The electronic device and the electronic equipment described above are not limited in structure. Fig.12 More or fewer components (such as network interfaces, etc.) as shown in, or with Fig.12 Different configurations shown.
[0159] Among them, the memory 1202 can be used to store software programs and modules, such as the program instructions / modules corresponding to the data transmission method and device in the embodiments of the present application. The processor 1204 executes various functional applications and data processing by running the software programs and modules stored in the memory 1202, that is, to implement the above-mentioned data transmission method. The memory 1202 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1202 may further include a memory remotely located relative to the processor 1204, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 1202 may specifically be used, but is not limited to, to store information such as the network status of the previous cycle. As an example, such as Fig.12 As shown, the memory 1202 may include but is not limited to the receiving module 1002, query module 1004, and sending module 1006 in the data transmission device. In addition, it may also include but is not limited to other module units in the data transmission device, which will not be repeated in this example.
[0160] Optionally, the transmission device 1206 is used to receive or send data via a network. Specific examples of the network may include a wired network and a wireless network. In one example, the transmission device 1206 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 1206 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0161] In addition, the electronic device further includes: a display 1208 for displaying the detection data; and a connection bus 1210 for connecting various module components in the electronic device.
[0162] In other embodiments, the terminal device or server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes through network communication. Among them, the nodes may form a peer-to-peer (P2P, Peer To Peer) network, and any form of computing device, such as a server, terminal and other electronic devices, may become a node in the blockchain system by joining the peer-to-peer network.
[0163] According to one aspect of the present application, a computer-readable storage medium is provided, and a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the data transmission method provided in various optional implementations of the above-mentioned data transmission aspect.
[0164] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0165] S1, receiving first detection data sent by a customer's local computer room to a cloud management center, wherein the first detection data includes equipment parameters currently collected and determined for equipment deployed in the customer's local computer room, and the customer's local computer room is connected to the cloud management center via a preset line;
[0166] S2, in response to the first detection data, querying the current network status of the preset line;
[0167] S3, when the current network status indicates that the network transmission rate is less than the first preset threshold, the first detection data is sent to the cloud management center through the delay queue.
[0168] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the terminal device through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
[0169] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0170] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
[0171] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0172] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0173] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple 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.
[0174] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0175] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A data transmission method, characterized in that: include: Receiving first detection data sent by a customer local computer room to a cloud management center, wherein the first detection data includes equipment parameters currently collected and determined for equipment deployed in the customer local computer room, and the customer local computer room is connected to the cloud management center via a preset line; In response to the first detection data, querying the current network status of the preset line; When the current network status indicates that the network transmission rate is less than a first preset threshold, the first detection data is sent to the cloud management center through a delay queue.
2. The method according to claim 1, characterized in that The method further comprises: When the current network status indicates that the network transmission rate is greater than a second preset threshold, querying the network status of the previous cycle, wherein the second preset threshold is greater than or equal to the first preset threshold; When the network status in the previous cycle indicates that the network transmission rate is greater than the second preset threshold, the first detection data is sent to the cloud management center through a bypass path, wherein the bypass path represents a path that allows the first detection data to pass directly through the cloud management center.
3. The method according to claim 2, characterized in that In the case where the current network status indicates that the network transmission rate is greater than the second preset threshold, after querying the network status of the previous cycle, the method further includes: When the network status of the previous cycle indicates that the network transmission rate is less than the first preset threshold, querying the delay queue; In the case where there is no historical detection data in the delay queue, the first detection data is sent to the cloud management center through the bypass path, wherein the historical detection data is the detection data sent by the customer's local computer room to the cloud management center and received in a historical period; When the historical detection data exists in the delay queue, wait for the delay queue to send the historical detection data, and when the delay queue completes sending the historical detection data, send the first detection data to the cloud management center through the bypass path.
4. The method according to claim 2, characterized in that: The method further comprises: After sending the first detection data to the cloud management center through a bypass path or adding the first detection data to the delay queue, updating the current network status as the previous cycle network status; Receiving second detection data sent by the customer's local computer room to the cloud management center, wherein the second detection data includes device parameters determined by collecting data from devices deployed in the customer's local computer room in a current next cycle; When the network status of the preset line indicates that the network transmission rate is less than the first preset threshold value when the second detection data is received, the second detection data is sent to the cloud management center through the delay queue; When the network status of the preset line indicates that the network transmission rate is greater than the second preset threshold when the second detection data is received, the network status of the previous cycle is queried, and when the network status of the previous cycle indicates that the network transmission rate is greater than the second preset threshold, the second detection data is sent to the cloud management center through the bypass path.
5. The method according to claim 1, characterized in that When the current network status indicates that the network transmission rate is less than a first preset threshold, sending the first detection data to the cloud management center through a delay queue includes: When the current network status indicates that the network transmission rate is less than a first preset threshold, adding the first detection data to the tail of the delay queue, wherein the delay queue is configured to send one detection data from the head of the queue each time; When the delay queue sends the detection data to a head of the delay queue and the first detection data is located at the head of the delay queue, the first detection data is sent to the cloud management center.
6. The method according to claim 5, characterized in that The sending of the detection data in the delay queue to the cloud management center, when the first detection data is located at the head of the delay queue, includes: When the delay queue sends the detection data to a point where the first detection data is located at the head of the delay queue, sending the first detection data to the cloud management center; When the first detection data is sent successfully, deleting the first detection data in the delay queue; In the case where the first detection data fails to be sent, the first detection data is resent at a target time interval until the first detection data is successfully sent.
7. The method according to claim 6, characterized in that The step of resending the first detection data at a target time interval when the first detection data fails to be sent, until the first detection data is successfully sent, includes: In the case where the first detection data fails to be sent, obtaining a current retry count, wherein the current retry count indicates the number of times the first detection data has been resent; The target time interval is determined according to the current number of retries, and the first detection data is resent according to the target time interval until the first detection data is successfully sent, wherein the target time interval is positively correlated with the current number of retries.
8. The method according to claim 6, characterized in that The method further comprises: In the case where the first detection data fails to be sent, obtaining the existence time and preset validity period of the first detection data in the delay queue; In a case where the existence time does not exceed the preset validity period, resending the first detection data at the target time interval until the first detection data is successfully sent; In the case that the existence time exceeds the preset validity period, the first detection data is pushed to the message persistence module for storage, and the first detection data is deleted from the delay queue, wherein the message persistence module is deployed in the customer's local computer room.
9. The method according to claim 1, characterized in that: The method further comprises: When the current network status indicates that the network transmission rate is less than the first preset threshold value and the first detection data matches the first service, the first detection data is sent to the cloud management center through a first delay queue, wherein the first service corresponds to the first delay queue; When the current network status indicates that the network transmission rate is less than the first preset threshold and the first detection data matches the second service, the first detection data is sent to the cloud management center through the 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 send detection data independently.
10. The method according to claim 1, characterized in that The method further comprises: Regularly detecting the network transmission speed of the preset line through a network status discriminator; When the network transmission speed is lower than the first preset threshold, setting the current network status to a weak network status; When the network transmission speed is greater than a second preset threshold, setting the current network status to a strong network status, wherein the second preset threshold is greater than or equal to the first preset threshold; The current network status of the preset line is periodically updated to be the weak network status or the strong network status.
11. A data transmission device, characterized in that: include: A receiving module, configured to receive first detection data sent by a customer local computer room to a cloud management center, wherein the first detection data includes device parameters currently determined by collecting data from a device deployed in the customer local computer room, and the customer local computer room is connected to the cloud management center via a preset line; A query module, configured to query the current network status of the preset line in response to the first detection data; A sending module is used to send the first detection data to the cloud management center through a delay queue when the current network status indicates that the network transmission rate is less than a first preset threshold.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program can be executed by a terminal device or a computer to execute the method described in any one of claims 1 to 10.
13. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method described in any one of claims 1 to 10 are implemented.
14. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 10 through the computer program.
Citation Information
Cited By
Resource decoupling cross-cloud data transmission method and device
CN119211319A
