Method, device, electronic device and storage medium for collecting data of tenants in different networks
By allocating agents for data collection and monitoring in a different network environment, the problems of data collection and monitoring of different network tenants are solved, and effective data collection and real-time monitoring of different network tenants are realized, thereby improving user experience and system reliability.
Patent Information
- Application Number
- CN202111401470.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-19
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2041-11-19
AI Technical Summary
The existing network monitoring system cannot effectively monitor and collect data in a different network environment, which will affect the user experience.
By determining the tenant type, if it is a different network tenant, an agent will be assigned, and a different network deployment strategy will be used to collect components and configure the alarm management component in the timing library to monitor data in real time and send alarm information.
It realizes data collection and real-time monitoring of tenants on different networks, improving user experience and system reliability in the event of network failure.
Smart Images

Figure CN114266614B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device and storage medium for collecting data of tenants in different networks. Background Art
[0002] At present, Internet technology is developing rapidly, the types of services provided by the Internet are constantly increasing, and network speeds are constantly improving. Users can implement various businesses through the Internet, bringing great convenience to users.
[0003] At the same time, when too many users exceed the network load limit at the same time, network fluctuations or network failures will affect the user experience, so it is necessary to monitor the network in real time during user use.
[0004] In the existing technology, the network monitoring system mainly supports the environment where the monitoring system and the user network can be connected, and cannot provide support for the heterogeneous network environment. Summary of the invention
[0005] The present application provides a method, device, electronic device and storage medium for collecting data from tenants in different networks, so as to realize data collection for tenants in different networks.
[0006] In a first aspect, the present application provides a method for collecting data of tenants in different networks, comprising: determining a first tenant type of a tenant, the first tenant type including a tenant in the same network or a tenant in a different network; if the tenant is a tenant in the same network, deploying a collection component for the tenant according to a deployment strategy in the same network; wherein the deployment strategy in the same network includes sending the collection component by a central platform; and, if the tenant is a tenant in a different network, allocating an agent to the tenant, and deploying the collection component for the tenant according to the deployment strategy in the different network; wherein the deployment strategy in the different network includes sending the collection component by the agent where the tenant is located; allocating a time series library to the tenant, and collecting the tenant data of the tenant and uploading it to the time series library of the tenant by running the deployed collection component.
[0007] In a possible implementation, the method also includes: determining a second tenant type of the tenant, the second tenant type including a remote tenant or a local tenant; if the tenant is a tenant in the same network, deploying a collection component for the tenant according to the same network deployment strategy, including: if the tenant is a tenant in the same network and a remote tenant, sending the Etcd service discovery collection component to the tenant according to the same network deployment strategy; if the tenant is a tenant in the same network and a local tenant, sending the Consul service discovery collection component to the tenant according to the same network deployment strategy; if the tenant is a tenant in a different network, allocating an agent to the tenant, and deploying a collection component for the tenant according to the different network deployment strategy, including: if the tenant is a tenant in a different network and a remote tenant, sending the Etcd service discovery collection component to the agent where the tenant is located according to the different network deployment strategy; if the tenant is a tenant in a different network and a local tenant, sending the Consul service discovery collection component to the tenant according to the different network deployment strategy.
[0008] In one possible implementation, determining the second tenant type of the tenant includes: based on the location information of the tenant, if the tenant location is within the coverage of the local area network, determining the tenant type of the tenant is a local tenant; if the tenant location is outside the coverage of the local area network, determining the tenant type of the tenant is a remote tenant.
[0009] In a possible implementation, the method further includes: if the tenant is a federated business tenant, not deploying a collection component for the tenant; and allocating a time series library to the tenant, and storing the tenant data reported by the tenant in the tenant's time series library.
[0010] In a possible implementation, the method further includes: configuring an alarm management component in a timing library, setting thresholds and alarm rules for monitoring items; wherein the monitoring items include alarm levels, alarm intervals, and abnormal duration states; real-time monitoring of collected data in the timing library, and if it is monitored that the collected data exceeds the threshold of the monitoring item, sending an alarm message to a designated terminal according to the alarm rules.
[0011] In a second aspect, the present application provides a device for collecting data of tenants in different networks, comprising: a detection module, used to determine a first tenant type of a tenant, wherein the first tenant type includes a tenant in the same network or a tenant in a different network; a deployment module, used to deploy a collection component to the tenant according to a deployment strategy in the same network if the tenant is a tenant in the same network; wherein the deployment strategy in the same network includes sending the collection component by a central platform; and, if the tenant is a tenant in a different network, assign an agent to the tenant, and deploy the collection component to the tenant according to the deployment strategy in the different network; wherein the deployment strategy in the different network includes sending the collection component by the agent where the tenant is located; the deployment module is also used to assign a time series library to the tenant, and collect the tenant data of the tenant and upload it to the time series library of the tenant by running the deployed collection component.
[0012] In one possible implementation, the detection module is also used to determine the second tenant type of the tenant, the second tenant type includes a remote tenant or a local tenant; the deployment module is also used to, if the tenant is a tenant in the same network, deploy the collection component to the tenant according to the same network deployment strategy, including: the deployment module is also used to, if the tenant is a tenant in the same network and a remote tenant, send the Etcd service discovery collection component to the tenant according to the same network deployment strategy; if the tenant is a tenant in the same network and a local tenant, send the Etcd service discovery collection component to the tenant according to the same network deployment strategy. The tenant sends the Consul service discovery collection component; the deployment module is also used to allocate a proxy machine to the tenant if the tenant is a tenant in a different network, and deploy the collection component to the tenant according to the different network deployment strategy, including: the deployment module is also used to send the Etcd service discovery collection component to the proxy machine where the tenant is located according to the different network deployment strategy if the tenant is a tenant in a different network and a remote tenant; if the tenant is a tenant in a different network and a local tenant, send the Consul service discovery collection component to the tenant according to the different network deployment strategy.
[0013] In a possible implementation, the detection module is also used to determine, based on the location information of the tenant, that the tenant type of the tenant is a local tenant if the tenant location is within the coverage of the local area network; and to determine that the tenant type of the tenant is a remote tenant if the tenant location is outside the coverage of the local area network.
[0014] In a possible implementation, the deployment module is further used to not deploy the collection component for the tenant if the tenant is a federated business tenant; and to allocate a time series library to the tenant and store the tenant data reported by the tenant in the tenant's time series library.
[0015] In one possible implementation, the device also includes: a monitoring module, which is used to configure an alarm management component in a timing library, and set thresholds and alarm rules for monitoring items; wherein the monitoring items include alarm levels, alarm intervals, and abnormal duration states; the monitoring module is also used to monitor the collected data in the timing library in real time, and if it is monitored that the collected data exceeds the threshold of the monitoring item, an alarm message is sent to a designated terminal according to the alarm rules.
[0016] In a third aspect, the present application provides an electronic device comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement a method as described in any one of the first aspects.
[0017] In a fourth aspect, the present application provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores computer execution instructions, and when the computer execution instructions are executed by a processor, they are used to implement the method as described in any one of the first aspects.
[0018] The method, device, electronic device and storage medium for collecting data of tenants in different networks provided in the present application determine the first tenant type of the tenant, and the first tenant type includes tenants in the same network or tenants in different networks. If the tenant is a tenant in the same network, the collection component is deployed for the tenant according to the same network deployment strategy. Among them, the same network deployment strategy includes the collection component being issued by the central platform. And, if the tenant is a tenant in a different network, an agent is assigned to the tenant, and the collection component is deployed for the tenant according to the different network deployment strategy. Among them, the different network deployment strategy includes the collection component being issued by the agent where the tenant is located. A time series library is assigned to the tenant, and by running the deployed collection component, the tenant data of the tenant is collected and uploaded to the tenant's time series library. The above scheme can distinguish between tenants in the same network and tenants in different networks, and establish a connection for tenants in different networks through a proxy machine, thereby realizing data collection for tenants in different networks. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0020] Figure 1 A schematic diagram of an application scenario of a method for collecting data of tenants on different networks provided in this application;
[0021] Figure 2 A flowchart of a method for collecting data of tenants in different networks provided in Example 1 of the present application;
[0022] Figure 3An example of sending a collection component provided in an embodiment of the present application;
[0023] Figure 4 A flowchart of a method for collecting data of tenants on different networks provided in Example 2 of the present application;
[0024] Figure 5 This is a structural example diagram of a device for collecting data of tenants in a different network provided in Embodiment 3 of the present application;
[0025] Figure 6 A device block diagram of a device for collecting data of tenants in a different network provided in Embodiment 5 of the present application;
[0026] Figure 7 This is a schematic diagram of the structure of an electronic device provided in Example 6 of the present application.
[0027] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0028] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0029] First, let’s explain the nouns involved:
[0030] Etcd - a key-value store for configuration sharing and service discovery.
[0031] Consul: A lightweight distributed, highly available system that provides service discovery, health checks, and multi-data center capabilities.
[0032] Figure 1 A schematic diagram of an application scenario of a method for collecting data of tenants in different networks provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the scenario includes: a multi-tenant proxy collection and monitoring device 1, a tenant 2 in the same network, a tenant 3 in a different network, and a proxy machine.
[0033] Take the scenario shown in the figure for example: the multi-tenant proxy collection monitoring device 1 determines the type of tenant, and directly sends the collection component through the network to collect data for the same-network tenant 2. For the different-network tenant 3, since the network is not connected, the collection component cannot be deployed directly through the network, but the proxy machine 4 is allocated to the different-network tenant 3, and the proxy machine 4 sends the collection component to collect data, thereby realizing data collection for the different-network tenant.
[0034] The scheme of the embodiments of the present application is introduced by way of examples in combination with the following embodiments.
[0035] Embodiment 1
[0036] Figure 2 A schematic diagram of a flow chart of a method for collecting data of tenants in different networks provided in Embodiment 1 of the present application, the method comprising the following steps:
[0037] S101. Determine a first tenant type of a tenant, where the first tenant type includes a tenant in the same network or a tenant in a different network;
[0038] S102. If the tenant is a tenant of the same network, the collection component is deployed to the tenant according to the same network deployment strategy; wherein the same network deployment strategy includes the central platform issuing the collection component; and, if the tenant is a tenant of a different network, an agent is allocated to the tenant, and the collection component is deployed to the tenant according to the different network deployment strategy; wherein the different network deployment strategy includes the agent of the tenant issuing the collection component;
[0039] S103: Allocate a time series library for the tenant, and collect the tenant data of the tenant by running the deployed collection component and upload it to the time series library of the tenant.
[0040] As an example, the execution subject of this embodiment can be a different network tenant data collection device, and there are many implementations of the different network tenant data collection device. For example, it can be a program software, or a medium storing relevant computer programs, such as a USB flash drive, etc.; or, the device can also be a physical device integrated or installed with relevant computer programs, such as a chip, a smart terminal, a computer, a server, etc.
[0041] Taking the scenario example as an example, the data collection device for tenants in a different network obtains the network status information of the tenant. If the tenant's network and the network of the data collection device for tenants in a different network are connected, the tenant is determined to be a tenant in the same network; if the tenant's network and the network of the data collection device for tenants in a different network are disconnected, the tenant is determined to be a tenant in a different network.
[0042] Specifically, if it is determined that the tenant is a tenant in the same network, it means that the tenant's network and the network of the data collection device of the tenant in the different network are connected. At this time, the central platform can directly send the collection component to the tenant in the same network through the network for deployment. If it is determined that the tenant is a tenant in a different network, it means that the tenant's network and the network of the data collection device of the tenant in the different network are connected. At this time, the central platform cannot directly send the collection component through the network. This application uses the method of allocating a proxy machine to the tenant in the different network, and the proxy machine replaces the sending of the collection component for deployment.
[0043] Based on the above implementation, it is possible to accurately determine whether a tenant is a tenant from a different network, and to use a proxy machine to replace the sending of collection components to tenants from different networks, thereby implementing data collection deployment for users from different networks. Next, an example is given to illustrate the data collection process.
[0044] In one example, S103 also includes: obtaining the location information, network information, and business information of the tenants; assigning tenants with close locations, tenants with the same network, and tenants with similar businesses to the same time series library;
[0045] Taking the scenario example as an example, the location information, network information and business information of the tenant are obtained; tenants with close locations, tenants with the same network and tenants with similar businesses are assigned to the same time series library, and labels are added to different time series libraries to facilitate quick search for specified tenants; the collection component is used to collect the operating data of the tenant side in real time and add a timestamp, and upload the collected data with a timestamp to the time series library corresponding to the tenant.
[0046] Based on the above implementation methods, it is possible to collect tenant data containing timestamps and upload them to the time series library corresponding to the tenant.
[0047] In one example, the data collection method for tenants in different networks also includes: determining a second tenant type of the tenant, the second tenant type including a remote tenant or a local tenant; if the tenant is a tenant in the same network, deploying a collection component for the tenant according to the same network deployment strategy, including: if the tenant is a tenant in the same network and a remote tenant, issuing an Etcd service discovery collection component to the tenant according to the same network deployment strategy; if the tenant is a tenant in the same network and a local tenant, issuing a Consul service discovery collection component to the tenant according to the same network deployment strategy; if the tenant is a tenant in a different network, allocating an agent to the tenant, and deploying a collection component for the tenant according to the different network deployment strategy, including: if the tenant is a tenant in a different network and a remote tenant, issuing an Etcd service discovery collection component to the agent where the tenant is located according to the different network deployment strategy; if the tenant is a tenant in a different network and a local tenant, issuing a Consul service discovery collection component to the tenant according to the different network deployment strategy.
[0048] For example, Figure 3 As shown, Figure 3 The following is an example of sending a collection component. If the tenant is a tenant on the same network and is a remote tenant, the central platform and the tenant are in a network connected state, and the Etcd service discovery collection component is sent to the tenant; if the tenant is a tenant on the same network and is a local tenant, the central platform and the tenant are in a network connected state, and the Consul service discovery collection component is sent to the tenant; if the tenant is a tenant on a different network and is a remote tenant, the network between the central platform and the tenant is disconnected, and the central platform cannot send components to the tenant through the network, and sends the Etcd service discovery collection component to the proxy machine where the tenant is located; if the tenant is a tenant on a different network and is a local tenant, the network between the central platform and the tenant is disconnected, and the central platform cannot send components to the tenant through the network, but can send the Consul service discovery collection component to the tenant through the local area network.
[0049] Optionally, the remote component deployment method includes bare metal deployment and containerized deployment. Specifically, the host configuration information and environment information of the tenant are obtained, and if the host configuration information and environment information support containerized deployment, containerized deployment is performed on the remote user; if the host configuration information and environment information do not support containerized deployment, bare metal deployment is performed on the remote user.
[0050] Based on the above implementation, the corresponding data collection deployment can be realized by integrating the first tenant type and the second tenant type of the tenant, wherein the first tenant type includes the same network tenant or the different network tenant, and the second tenant type includes the remote tenant or the local tenant.
[0051] In one example, determining the second tenant type of the tenant includes: based on the location information of the tenant, if the tenant location is within the coverage of the local area network, determining the tenant type of the tenant is a local tenant; if the tenant location is outside the coverage of the local area network, determining the tenant type of the tenant is a remote tenant.
[0052] In combination with the scenario example, the location information of the tenant is obtained. If the tenant is within the LAN of the central platform, the tenant is determined to be a local tenant. For local tenants, even if the local tenant is a tenant of a different network and cannot be directly connected to the central platform through the network, it can also be connected through the LAN of the central platform.
[0053] In one example, the method for collecting data from tenants on different networks also includes: if the tenant is a federated business tenant, not deploying a collection component for the tenant; and allocating a time series library to the tenant, and storing the tenant data reported by the tenant in the tenant's time series library.
[0054] Optionally, the federation services include but are not limited to Tiangong federation and tenant-defined federation. Tiangong federation is used by internal tenants, and customized federation supports federations provided by multiple tenants or third parties.
[0055] As an implementable method, federation, as an access method, has a collection function itself, so there is no need to deploy a collection component process. Federation directly collects the tenant data of the tenant and uploads it to the tenant's time series library.
[0056] Based on the above implementation methods, data collection of federated business users can be achieved.
[0057] In one example, the method for collecting data from tenants in different networks also includes: if the tenant has its own collection component, the collection component is not deployed for the tenant; and a time series library is allocated to the tenant, and the tenant data reported by the tenant is stored in the tenant's time series library.
[0058] Optionally, the time series library supports multiple user-provided collection components. In actual applications, the user-provided collection components collect the tenant data of the tenant and upload them to the tenant's time series library.
[0059] Based on the above implementation methods, data collection of users with their own collection components can be achieved.
[0060] Optionally, in actual applications, data analysis can be performed on the tenant data in the time series library to form a hierarchical structure of the data warehouse. For example, data classification and labeling can be performed, including but not limited to data classification and labeling. For example, data classification can be performed according to the time dimension to facilitate statistics of times when anomalies are prone to occur. Optionally, abnormal collection data can be visualized to obtain statistics of data that are prone to anomalies, thereby guiding optimization work.
[0061] In the data collection method for tenants in different networks provided in this embodiment, the first tenant type of the tenant is determined, and the first tenant type includes tenants in the same network or tenants in different networks; if the tenant is a tenant in the same network, the collection component is deployed for the tenant according to the same network deployment strategy; wherein the same network deployment strategy includes the collection component being sent by the central platform; and, if the tenant is a tenant in different networks, an agent is allocated to the tenant, and the collection component is deployed for the tenant according to the different network deployment strategy; wherein the different network deployment strategy includes the collection component being sent by the agent where the tenant is located; a time series library is allocated to the tenant, and by running the deployed collection component, the tenant data of the tenant is collected and uploaded to the tenant's time series library. Through the above scheme, tenants in the same network and tenants in different networks can be distinguished, and connections can be established for tenants in different networks through agents, thereby realizing data collection for tenants in different networks.
[0062] Embodiment 2
[0063] Figure 4 A schematic diagram of a flow chart of a method for collecting data of tenants in different networks provided in the second embodiment of the present application. Based on the first embodiment, this embodiment illustrates an example of the monitoring and alarm process of the method for collecting data of tenants in different networks, such as Figure 4 As shown, based on the first embodiment, the method further includes:
[0064] S104, configuring an alarm management component in the time series library, setting thresholds and alarm rules for monitoring items; wherein the monitoring items include alarm levels, alarm intervals, and abnormal duration states;
[0065] S105 , monitoring the collected data in the time series library in real time, and if it is monitored that the collected data exceeds the threshold of the monitoring item, sending an alarm message to a designated terminal according to the alarm rule.
[0066] Optionally, the alarm interval is set to minutes, the abnormal duration is set to seconds, and the collection frequency is set to minutes.
[0067] Optionally, the thresholds and alarm rules of monitoring items can be changed at any time according to tenant needs.
[0068] In combination with the scenario example, the alarm management component is configured in the time series library, and the threshold and alarm rules of the monitoring items can be set. For example, the abnormal duration is set to 4 seconds. If the abnormality actually occurs and lasts for more than 4 seconds, the alarm information is sent to the specified terminal according to the alarm rule. If the abnormality actually occurs but does not last for more than 4 seconds, no processing is performed.
[0069] Based on the above implementation methods, the collected data can be monitored in real time by presetting the thresholds of the monitoring items and the alarm rules. If an abnormality occurs, an alarm will be issued in time to eliminate the abnormality in time.
[0070] In the data collection method for tenants in different networks provided in this embodiment, an alarm management component is configured in the time series library, and the thresholds and alarm rules of the monitoring items are set; wherein the monitoring items include the alarm level, the alarm interval, and the abnormal duration state; the collected data in the time series library is monitored in real time, and if the collected data is monitored to exceed the threshold of the monitoring item, an alarm message is sent to the designated terminal according to the alarm rule. Through the above scheme, the monitoring and collection data can be compared with the preset thresholds and alarm rules of the monitoring items, abnormal collection can be discovered in time and an alarm is triggered, thereby realizing the monitoring and alarm of the collected data.
[0071] Embodiment 3
[0072] Figure 5 A schematic diagram of the structure of a device for collecting data of tenants in a different network provided in the third embodiment of the present application is shown in FIG. Figure 5As shown, the heterogeneous network tenant data collection device includes:
[0073] A detection module 61, configured to determine a first tenant type of a tenant, wherein the first tenant type includes a tenant in the same network or a tenant in a different network;
[0074] A deployment module 62 is used for, if the tenant is a tenant of the same network, deploying the collection component to the tenant according to the same network deployment strategy; wherein the same network deployment strategy includes the central platform issuing the collection component; and, if the tenant is a tenant of a different network, allocating an agent to the tenant and deploying the collection component to the tenant according to the different network deployment strategy; wherein the different network deployment strategy includes the agent where the tenant is located issuing the collection component;
[0075] The deployment module 62 is further used to allocate a time series library to the tenant, and collect the tenant data of the tenant and upload it to the time series library of the tenant by running the deployed collection component.
[0076] As an example, the execution subject of this embodiment can be a different network tenant data collection device, and there are many implementations of the different network tenant data collection device. For example, it can be a program software, or a medium storing relevant computer programs, such as a USB flash drive, etc.; or, the device can also be a physical device integrated or installed with relevant computer programs, such as a chip, a smart terminal, a computer, a server, etc.
[0077] Taking the scenario example as an example, the detection module 61 is used to obtain the network status information of the tenant. If the tenant's network and the network of the data collection device of the tenant in the different network are connected, the tenant is determined to be a tenant in the same network; if the tenant's network and the network of the data collection device of the tenant in the different network are disconnected, the tenant is determined to be a tenant in the different network.
[0078] Specifically, if it is determined that the tenant is a tenant in the same network, it means that the tenant's network and the network of the data collection device of the tenant in the different network are connected. At this time, the central platform can directly send the collection component to the tenant in the same network through the network for deployment. If it is determined that the tenant is a tenant in a different network, it means that the tenant's network and the network of the data collection device of the tenant in the different network are connected. At this time, the central platform cannot directly send the collection component through the network. This application uses the method of allocating a proxy machine to the tenant in the different network, and the proxy machine replaces the sending of the collection component for deployment.
[0079] In one example, the detection module 61 is also used to obtain the location information, network information and business information of the tenants; and to allocate tenants with close locations, tenants with the same network and tenants with similar businesses to the same time series library.
[0080] Taking the scenario example as an example, the detection module 61 is used to obtain the location information, network information and business information of the tenant; tenants with close locations, tenants with the same network and tenants with similar businesses are assigned to the same time series library, and labels are added to different time series libraries to facilitate quick search for specified tenants; the collection component is used to collect the operating data of the tenant side in real time and add a timestamp, and upload the collected data with a timestamp to the time series library corresponding to the tenant.
[0081] In one example, the detection module 61 is further used to determine the second tenant type of the tenant, the second tenant type including a remote tenant or a local tenant; the deployment module 62 is further used to, if the tenant is a tenant in the same network, deploy the collection component to the tenant according to the same network deployment strategy, including: the deployment module 62 is further used to, if the tenant is a tenant in the same network and a remote tenant, send the Etcd service discovery collection component to the tenant according to the same network deployment strategy; the deployment module 62 is further used to, if the tenant is a tenant in the same network and a local tenant, send the Etcd service discovery collection component to the tenant according to the same network deployment strategy. The deployment module 62 is also used to allocate a proxy machine to the tenant if the tenant is a tenant in a different network, and deploy the collection component to the tenant according to the different network deployment strategy, including: the deployment module 62 is also used to send the Etcd service discovery collection component to the proxy machine where the tenant is located according to the different network deployment strategy if the tenant is a tenant in a different network and a remote tenant; the deployment module 62 is also used to send the Consul service discovery collection component to the tenant according to the different network deployment strategy if the tenant is a tenant in a different network and a local tenant.
[0082] For example, Figure 3 As shown, Figure 3 The following is an example of sending a collection component. If the tenant is a tenant on the same network and is a remote tenant, the central platform and the tenant are in a network connected state, and the Etcd service discovery collection component is sent to the tenant; if the tenant is a tenant on the same network and is a local tenant, the central platform and the tenant are in a network connected state, and the Consul service discovery collection component is sent to the tenant; if the tenant is a tenant on a different network and is a remote tenant, the network between the central platform and the tenant is disconnected, and the central platform cannot send components to the tenant through the network, and sends the Etcd service discovery collection component to the proxy machine where the tenant is located; if the tenant is a tenant on a different network and is a local tenant, the network between the central platform and the tenant is disconnected, and the central platform cannot send components to the tenant through the network, but can send the Consul service discovery collection component to the tenant through the local area network.
[0083] Optionally, the remote component deployment method includes bare metal deployment and containerized deployment. Specifically, the detection module 61 is used to obtain the host configuration information and environment information of the tenant, and if the host configuration information and environment information support containerized deployment, the containerized deployment is performed on the remote user; if the host configuration information and environment information do not support containerized deployment, the bare metal deployment is performed on the remote user.
[0084] In one example, the detection module 61 is also used to determine, based on the location information of the tenant, that the tenant type of the tenant is a local tenant if the tenant location is within the coverage of the local area network; the detection module 61 is also used to determine, based on the location information of the tenant, that the tenant type of the tenant is a remote tenant if the tenant location is outside the coverage of the local area network.
[0085] In combination with the scenario example, the detection module 61 is also used to obtain the location information of the tenant. If the tenant is within the LAN of the central platform, the tenant is determined to be a local tenant. For a local tenant, even if the local tenant is a tenant of a different network and cannot be directly connected to the central platform through the network, it can also be connected through the LAN of the central platform.
[0086] In one example, the deployment module 62 is also used to not deploy the collection component for the tenant if the tenant is a federated business tenant; and to allocate a time series library to the tenant and store the tenant data reported by the tenant in the tenant's time series library.
[0087] Optionally, the federation services include but are not limited to Tiangong federation and tenant-defined federation. Tiangong federation is used by internal tenants, and customized federation supports federations provided by multiple tenants or third parties.
[0088] As an implementable method, federation, as an access method, has a collection function itself, so there is no need to deploy a collection component process. Federation directly collects the tenant data of the tenant and uploads it to the tenant's time series library.
[0089] In one example, the deployment module 62 is also used for not deploying the collection component for the tenant if the tenant has its own collection component; and allocating a time series library to the tenant and storing the tenant data reported by the tenant in the tenant's time series library.
[0090] Optionally, the time series library supports multiple user-provided collection components. In actual applications, the user-provided collection components collect the tenant data of the tenant and upload them to the tenant's time series library.
[0091] Optionally, in actual applications, data analysis can be performed on the tenant data in the time series library to form a hierarchical structure of the data warehouse. For example, data classification and labeling can be performed, including but not limited to data classification and labeling. For example, data classification can be performed according to the time dimension to facilitate statistics of times when anomalies are prone to occur. Optionally, abnormal collection data can be visualized to obtain statistics of data that are prone to anomalies, thereby guiding optimization work.
[0092] In the heterogeneous tenant data collection device provided in this embodiment, the detection module is used to determine the first tenant type of the tenant, and the first tenant type includes the same network tenant or the heterogeneous network tenant; the deployment module is used to deploy the collection component to the tenant according to the same network deployment strategy if the tenant is the same network tenant; wherein the same network deployment strategy includes the collection component being sent by the central platform; and, if the tenant is a heterogeneous tenant, an agent is assigned to the tenant, and the collection component is deployed to the tenant according to the heterogeneous network deployment strategy; wherein the heterogeneous network deployment strategy includes the collection component being sent by the agent where the tenant is located; the deployment module is also used to assign a time series library to the tenant, and collect the tenant data of the tenant by running the deployed collection component and upload it to the tenant's time series library. Through the above scheme, it is possible to distinguish between the same network tenant and the heterogeneous network tenant, establish a connection with the heterogeneous network tenant through the agent, and thus realize data collection for the heterogeneous network tenant.
[0093] Embodiment 4
[0094] Embodiment 4 of the present application provides a device for collecting data of tenants in a different network. Based on embodiment 3, the device further includes:
[0095] A monitoring module is used to configure the alarm management component in the time series library, set the threshold and alarm rules of the monitoring items; wherein the monitoring items include the alarm level, alarm interval and abnormal duration;
[0096] The monitoring module is also used to monitor the collected data in the time series library in real time. If it is monitored that the collected data exceeds the threshold of the monitoring item, an alarm message is sent to the designated terminal according to the alarm rule.
[0097] Optionally, the alarm interval is set to minutes, the abnormal duration is set to seconds, and the collection frequency is set to minutes.
[0098] Optionally, the thresholds and alarm rules of monitoring items can be changed at any time according to tenant needs.
[0099] In the heterogeneous network tenant data collection device provided in this embodiment, the calculation module calculates the network service performance value of the first user and the network perception matching degree. The calculation module calculates the satisfaction rate of the first access point according to the network perception matching degree. Therefore, it is determined whether to perform further optimization according to the satisfaction rate of the first access point.
[0100] In the data collection method for tenants in different networks provided in this embodiment, the monitoring module is used to configure the alarm management component in the time series library, set the threshold of the monitoring item and the alarm rule; wherein the monitoring item includes the alarm level, the alarm interval and the abnormal duration state; the monitoring module is also used to monitor the collected data in the time series library in real time, and if the collected data is monitored to exceed the threshold of the monitoring item, an alarm message is sent to the designated terminal according to the alarm rule. Through the above scheme, the monitoring and collection data can be compared with the preset threshold of the monitoring item and the alarm rule, and abnormal collection can be discovered in time and an alarm is triggered, thereby realizing the monitoring and alarm of the collected data.
[0101] Embodiment 5
[0102] Figure 6 It is a device block diagram of a device for collecting data of tenants in a different network according to an exemplary embodiment. The device may be a mobile phone, a computer, a digital broadcast terminal, a message transceiver, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0103] The device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0104] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0105] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0106] The power supply component 806 provides power to the various components of the device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.
[0107] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0108] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0109] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0110] The sensor assembly 814 includes one or more sensors for providing various aspects of the status assessment of the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, and the sensor assembly 814 can also detect the position change of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and the temperature change of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0111] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0112] In an exemplary embodiment, the apparatus 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.
[0113] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by the processor 820 of the device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0114] Embodiment 6
[0115] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 7As shown, the electronic device includes:
[0116] The electronic device includes a processor 291 and a memory 292; it may also include a communication interface 293 and a bus 294. The processor 291, the memory 292, and the communication interface 293 may communicate with each other through the bus 294. The communication interface 293 may be used for information transmission. The processor 291 may call the logic instructions in the memory 292 to execute the method of the above embodiment.
[0117] In addition, the logic instructions in the above-mentioned memory 292 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.
[0118] The memory 292 is a computer-readable storage medium that can be used to store software programs and computer executable programs, such as program instructions / modules corresponding to the methods in the embodiments of the present application. The processor 291 executes functional applications and data processing by running the software programs, instructions, and modules stored in the memory 292, that is, implementing the methods in the above method embodiments.
[0119] The memory 292 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 292 may include a high-speed random access memory and may also include a non-volatile memory.
[0120] An embodiment of the present application provides a non-temporary computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the method described in the above embodiment.
[0121] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0122] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A method for collecting data of tenants in different networks. It is characterized in that include: Determine a first tenant type of the tenant, where the first tenant type includes a tenant in the same network or a tenant in a different network; If the tenant is a tenant of the same network, the collection component is deployed to the tenant according to the same network deployment strategy; wherein the same network deployment strategy includes the collection component being sent by the central platform; and, if the tenant is a tenant of a different network, an agent is allocated to the tenant, and the collection component is deployed to the tenant according to the different network deployment strategy; wherein the different network deployment strategy includes the collection component being sent by the agent where the tenant is located; determining a second tenant type of the tenant, the second tenant type comprising a remote tenant or a local tenant; If the tenant is a tenant in the same network and a remote tenant, the Etcd service discovery collection component is sent to the tenant according to the same network deployment strategy; if the tenant is a tenant in the same network and a local tenant, the Consul service discovery collection component is sent to the tenant according to the same network deployment strategy; If the tenant is a remote tenant, the Etcd service discovery collection component is sent to the proxy machine where the tenant is located according to the remote network deployment strategy; if the tenant is a local tenant, the Consul service discovery collection component is sent to the tenant according to the remote network deployment strategy; A time series library is allocated to the tenant, and the tenant data of the tenant is collected and uploaded to the time series library of the tenant by running the deployed collection component.
2. The method according to claim 1, It is characterized in that The determining the second tenant type of the tenant includes: According to the location information of the tenant, if the tenant location is within the coverage of the local area network, the tenant type of the tenant is determined to be a local tenant; if the tenant location is outside the coverage of the local area network, the tenant type of the tenant is determined to be a remote tenant.
3. The method according to claim 1, It is characterized in that The method further comprises: If the tenant is a federated business tenant, the collection component is not deployed for the tenant; and a time series library is allocated to the tenant, and the tenant data reported by the tenant is stored in the tenant's time series library.
4. The method according to claim 1, It is characterized in that The method further comprises: Configure the alarm management component in the time series library and set the threshold and alarm rules of the monitoring items; wherein the monitoring items include the alarm level, alarm interval and abnormal duration; The collected data in the time series library is monitored in real time. If the collected data is monitored to exceed the threshold of the monitoring item, an alarm message is sent to a designated terminal according to the alarm rule.
5. A device for collecting data of tenants in different networks, It is characterized in that include: A detection module, used to determine a first tenant type of a tenant, where the first tenant type includes a tenant in the same network or a tenant in a different network; A deployment module, for, if the tenant is a tenant of the same network, deploying the collection component to the tenant according to the same network deployment strategy; wherein the same network deployment strategy includes the central platform issuing the collection component; and, if the tenant is a tenant of a different network, allocating an agent to the tenant and deploying the collection component to the tenant according to the different network deployment strategy; wherein the different network deployment strategy includes the agent where the tenant is located issuing the collection component; The detection module is further used to determine a second tenant type of the tenant, where the second tenant type includes a remote tenant or a local tenant; The deployment module is also used to send the Etcd service discovery collection component to the tenant according to the same network deployment strategy if the tenant is a tenant on the same network and a remote tenant; if the tenant is a tenant on the same network and a local tenant, send the Consul service discovery collection component to the tenant according to the same network deployment strategy; The deployment module is also used to, if the tenant is a tenant in a different network and a remote tenant, send the Etcd service discovery collection component to the proxy machine where the tenant is located according to the different network deployment strategy; if the tenant is a tenant in a different network and a local tenant, send the Consul service discovery collection component to the tenant according to the different network deployment strategy; the deployment module is also used to allocate a timing library to the tenant, and collect the tenant data of the tenant and upload it to the tenant's timing library by running the deployed collection component.
6. The device according to claim 5, It is characterized in that The detection module is also used to determine the tenant type of the tenant as a local tenant based on the location information of the tenant if the tenant location is within the coverage of the local area network; if the tenant location is outside the coverage of the local area network, determine the tenant type of the tenant as a remote tenant.
7. The device according to claim 5, It is characterized in that The deployment module is also used for not deploying the collection component for the tenant if the tenant is a federated business tenant; and allocating a time series library to the tenant and storing the tenant data reported by the tenant in the tenant's time series library.
8. The device according to claim 5, It is characterized in that The device also includes: A monitoring module is used to configure the alarm management component in the time series library, set the threshold and alarm rules of the monitoring items; wherein the monitoring items include the alarm level, alarm interval and abnormal duration; The monitoring module is also used to monitor the collected data in the time series library in real time. If it is monitored that the collected data exceeds the threshold of the monitoring item, an alarm message is sent to the designated terminal according to the alarm rule.
9. An electronic device, It is characterized in that include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 4.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 4 when executed by a processor.
