Disclosure of Invention
The invention aims to provide a data reporting method and system, which can effectively improve the safety and reliability of equipment to be monitored at a client side.
In order to achieve the above object, the present invention provides the following technical solutions:
a data reporting method, comprising:
the proxy host establishes a session with a cloud end so as to realize data transmission to the cloud end based on the established session; the established session only allows the proxy host to access the cloud end in one direction;
the proxy host periodically collects the equipment information of the connected client-side equipment to be monitored, and obtains corresponding data to be reported based on the currently collected equipment information;
and the proxy host reports the data to be reported to the cloud end so that corresponding personnel can acquire the data to be reported from the cloud end to realize corresponding analysis and processing.
Preferably, the proxy establishes a session with the cloud, including:
The proxy host sends user information of a user currently logged in to the cloud, the cloud verifies the user information currently received, if the user information passes verification, the access of the proxy host is allowed, so that the session establishment with the proxy host is realized, and otherwise, the access of the proxy host is refused.
Preferably, after the proxy host reports the data to be reported to the cloud, the method further includes:
And the cloud acquires the host information of the proxy host carried in the data to be reported, verifies the acquired host information, stores the data to be reported if the verification is passed, and discards the data to be reported if the verification is not passed.
Preferably, after the proxy establishes the session with the cloud, the method further includes:
and monitoring the session with the proxy host in real time by the cloud, and refusing the access of the proxy host if the duration of the session reaches the preset duration.
Preferably, before the proxy establishes the session with the cloud, the method further includes:
The proxy host sends user information of a user needing to be registered currently to the cloud, the cloud verifies the user information received currently, if the user information is verified, information passing the user information verification is fed back, and otherwise, the proxy host is determined to be refused to register;
after receiving the information that the user information passes through verification, the proxy host sends the host information of the proxy host to the cloud, the cloud verifies the currently received host information, the proxy host regularly inquires the result of verifying the corresponding host information from the cloud, and when inquiring that the verification of the corresponding host information passes through, the state of successful registration is saved, otherwise, the fact that registration cannot be achieved is determined.
Preferably, the cloud end verifies the corresponding host information before the proxy host is successfully registered, including:
the cloud end outputs the currently received host information to a corresponding terminal of the manager, and determines whether verification of the corresponding host information is passed or not based on the information fed back by the manager through the corresponding terminal;
The cloud end verifies corresponding host information after the proxy host is successfully registered, and the cloud end comprises the following steps:
The cloud end compares the currently received host information with the host information of the registered proxy host, if the host information of the registered proxy host which is the same as the currently received host information exists, the currently received host information is verified to pass, otherwise, the currently received host information is verified to fail.
Preferably, after the proxy registration is successful, the method further includes:
The proxy host receives an information change request sent by a currently logged-in user and sends the information change request to the cloud; the information change request comprises user information of a user currently logged in, host information of the proxy host and user information of the user needing to be changed;
And the cloud end verifies the user information of the user currently logged in the information change request and the host information, if the user information passes the verification, the user information of the user needing to be changed in the information change request is replaced with the user information of the user currently logged in, otherwise, the user change cannot be realized.
The utility model provides a data reporting system, includes proxy host computer, high in the clouds and waits to monitor equipment, wherein:
The proxy is used for: establishing a session with a cloud end so as to realize data transmission to the cloud end based on the established session; acquiring equipment information of equipment to be monitored of a connected client side at fixed time, and acquiring corresponding data to be reported based on the currently acquired equipment information; reporting the data to be reported to the cloud; the established session only allows the proxy host to access the cloud end in one direction;
the cloud end is used for: receiving the data to be reported so that corresponding personnel can acquire the data to be reported to realize corresponding analysis and processing;
the device to be monitored is used for: and the proxy host realizes the collection of corresponding equipment information.
Preferably, the proxy is specifically configured to: transmitting user information of a currently logged-in user to the cloud;
The cloud end is further configured to: and verifying the currently received user information, and if the user information passes the verification, allowing the access of the proxy host so as to establish a session with the proxy host, otherwise, refusing the access of the proxy host.
Preferably, the cloud end is further configured to: and after the proxy host reports the data to be reported to the cloud, acquiring host information of the proxy host carried in the data to be reported, verifying the acquired host information, if the verification is passed, storing the data to be reported, otherwise, discarding the data to be reported.
The application provides a data reporting method and a system, wherein the method comprises the following steps: the proxy host establishes a session with a cloud end so as to realize data transmission to the cloud end based on the established session; the proxy host periodically collects the equipment information of the connected client-side equipment to be monitored, and obtains corresponding data to be reported based on the currently collected equipment information; the proxy host reports the data to be reported to the cloud end so that corresponding personnel can acquire the data to be reported from the cloud end to realize corresponding analysis and processing; the established session only allows the proxy host to access the cloud end in one direction. In the application, an agent host is arranged between the cloud end and the equipment to be monitored of the client, and after the agent host establishes a session with the cloud end, the equipment information of the equipment to be monitored, which is acquired at regular time, is reported to the cloud end so that corresponding personnel can realize operations such as inquiry analysis of the equipment information from the cloud end; and the session established between the proxy host and the cloud only allows the proxy host to access the cloud in one direction, and does not allow the cloud to access the proxy host. Therefore, the cloud end cannot access the proxy host and the equipment to be monitored on the client side through the setting of the proxy host, and the equipment to be monitored does not need to be brought into cloud platform management, so that potential safety hazards caused by bringing the equipment to be monitored into the cloud platform management are avoided, and the safety and reliability of the equipment to be monitored on the client side can be effectively improved.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, a flowchart of a data reporting method provided by an embodiment of the present invention may include:
S11: the proxy host establishes a session with the cloud end so as to realize data transmission to the cloud end based on the established session; wherein, the established session only allows the proxy host to access the cloud in one direction.
In the embodiment of the application, the equipment to be monitored can be IT products such as storage equipment, servers and the like at the client side, and can also be other products appointed according to actual needs, and the equipment to be monitored is within the protection scope of the application. In order to safely realize data reporting, a Client (proxy host) is arranged between equipment to be monitored and a cloud end of a cloud platform, and the proxy host can pre-establish a session with the cloud end in order to realize data reporting to the cloud end, so that data reporting to the cloud end is realized at least once based on the session; and only the proxy host is allowed to access the cloud (the proxy host can transmit data to the cloud or query data in the cloud based on the session), but the cloud is refused to access the proxy host based on the session (the cloud can only feed back data to the proxy host based on the session but cannot query data in the proxy host based on the session), and the cloud is not allowed to access the device to be monitored. The cloud platform can be cooperatively operated by a front-end system and a cloud system, the front-end system is deployed in equipment to be monitored of a client side, information such as equipment alarm of the equipment to be monitored of the client side can be collected, the cloud system is deployed in the cloud, information such as equipment alarm can be received all weather, and technical service personnel can be automatically informed to conduct timely processing.
S12: the proxy host periodically collects the equipment information of the connected client-side equipment to be monitored, and obtains corresponding data to be reported based on the currently collected equipment information.
The agent host can regularly acquire the equipment information of the connected equipment to be monitored, and then sends the equipment information to the cloud based on a session established between the agent host and the cloud in advance, so that after the cloud stores the received data, corresponding personnel can conveniently realize data query, analysis and the like in the cloud, and therefore remote maintenance functions such as remote inspection, remote log collection and the like are realized. The device information may include information such as performance, capacity, hard disk, alarm, heartbeat packet, etc., and of course, other settings may be performed according to actual needs, which are all within the protection scope of the present invention.
S13: the proxy host reports the data to be reported to the cloud end so that corresponding personnel can acquire the data to be reported from the cloud end to realize corresponding analysis and processing.
In the application, an agent host is arranged between the cloud end and the equipment to be monitored of the client, and after the agent host establishes a session with the cloud end, the equipment information of the equipment to be monitored, which is acquired at regular time, is reported to the cloud end so that corresponding personnel can realize operations such as inquiry analysis of the equipment information from the cloud end; and the session established between the proxy host and the cloud only allows the proxy host to access the cloud in one direction, and does not allow the cloud to access the proxy host. Therefore, the cloud end cannot access the proxy host and the equipment to be monitored on the client side through the setting of the proxy host, and the equipment to be monitored does not need to be brought into cloud platform management, so that potential safety hazards caused by bringing the equipment to be monitored into the cloud platform management are avoided, and the safety and reliability of the equipment to be monitored on the client side can be effectively improved.
The method for reporting data provided by the embodiment of the invention, before the proxy host establishes the session with the cloud, can further include:
The agent host sends the user information of the user needing to be registered currently to the cloud end, the cloud end verifies the user information received currently, if the user information is verified, the user information is fed back to verify the information, otherwise, the agent host is refused to register;
after receiving the information of the user information passing through verification, the proxy host sends the host information of the proxy host to the cloud, the cloud verifies the currently received host information, the proxy host regularly inquires the result of verifying the corresponding host information from the cloud, and when inquiring that the corresponding host information passes through verification, the proxy host stores the successful registration state, otherwise, the proxy host determines that the registration cannot be realized.
The embodiment of the application can be realized based on a proxy registration mechanism, and as shown in fig. 2, the proxy can realize login authentication before registration. When login authentication is realized, user information (which can comprise a user name, a password and the like) of a user needing to be registered currently is input on the proxy host by the outside world and the user information is clicked to be registered, the proxy host initiates an https request to the cloud end so as to send the user information input by the outside world to the cloud end, the cloud end verifies the user information, whether the user information is a legal user which is known in advance or not can be verified, the user information can be output to a manager for manual verification and the like, and the cloud end feeds back corresponding information of the proxy host after the user information verification is passed so as to inform that the authentication of the login authentication is successful, otherwise, the registration of the proxy host is refused. When authentication is successful to realize registration, the proxy host initiates a registration request to the cloud, wherein the registration request is a POST request, and parameters in the POST request can comprise equipment information such as client_id, client_name, client_position, client_ manger _user and the like, and the cloud waits for processing the registration request; the proxy host polls and inquires the result of the registration request in the cloud, namely the result of verifying the equipment information, determines that the registration is successful when the verification is inquired, persists the successful registration state to the local, stores the user information and the host information which are verified in the local, and determines that the registration is failed if the verification is not inquired within a certain period of time. By the method, the dual authentication registration of the user and the proxy host is realized, and the reliability of the authentication registration can be effectively improved. In addition, the registration status in the proxy may include unregistered, registered user information error, unregistered, and the like.
The method for reporting data provided by the embodiment of the invention, wherein the proxy host establishes a session with a cloud, can comprise the following steps:
The proxy host sends the user information of the currently logged-in user to the cloud, the cloud verifies the currently received user information, if the user information passes the verification, the access of the proxy host is allowed, so that the session establishment with the proxy host is realized, and if the user information passes the verification, the access of the proxy host is refused.
After the proxy host reports the data to be reported to the cloud, the method may further include:
The cloud acquires host information of the proxy host carried in the data to be reported, verifies the acquired host information, and if the verification is passed, saves the data to be reported, otherwise, discards the data to be reported.
The proxy host obtains corresponding data to be reported based on the device information, specifically, the device information and host information (such as client_id) representing the proxy host form the data to be reported, and then the data to be reported is uploaded to the cloud. As shown in fig. 3, in the process of implementing data reporting by the proxy host, the proxy host may first determine a locally-persisted registration state, and if the proxy host is not registered, continue implementing data reporting, otherwise, implement the above-described registration process first; after the registered security policies stored in the local can be queried, the device information of the type specified in the security policies can be reported to the cloud, other device information cannot be reported to the cloud, and then only the device information which can be reported to the cloud is reported to the cloud to obtain corresponding data to be reported; after obtaining the data to be reported which can be reported to the cloud, login authentication of a registered user can be realized, the login authentication comprises the steps that user information of the user currently logged in to the proxy host is sent to the cloud, the cloud locally indicates that authentication is successful if the user information currently received is stored, at the moment, a session is established (information of successful authentication can be fed back to the proxy host), the proxy host is allowed to realize access to the cloud based on the session, and otherwise authentication fails; after authentication is successful, the proxy host reports the data to be reported to the cloud, the cloud acquires host information carried in the data to be reported, if the host information received currently is stored locally, the proxy host is legal, the data to be uploaded is stored, otherwise, the data to be uploaded is discarded, and the result information is fed back to the proxy host. Therefore, the corresponding data to be uploaded is stored after the user information and the host information are subjected to double verification, and the reliability and the safety of the data to be uploaded are further ensured. In addition, the function of timing the reporting of data may be triggered by a preset timer.
The method for reporting data provided by the embodiment of the invention, in which the cloud verifies the corresponding host information before the proxy host is successfully registered, can include:
the cloud end outputs the currently received host information to a corresponding terminal of the manager, and determines whether verification of the corresponding host information is passed or not based on the information fed back by the manager through the corresponding terminal;
the cloud end verifies corresponding host information after the proxy host is successfully registered, and the method comprises the following steps:
The cloud compares the currently received host information with the host information of the registered proxy host, if the host information of the registered proxy host which is the same as the currently received host information exists, the verification of the currently received host information is passed, otherwise, the verification is not passed.
In order to improve the effectiveness of information verification, the host information of the proxy host in the registration process can be verified manually by corresponding management personnel, if the information fed back by the management personnel is verification passing, the verification of the proxy host is determined to be passed, otherwise, the verification of the proxy host is determined to be failed; in order to improve convenience of information verification, when the cloud performs verification on host information in the data to be uploaded, the cloud may compare the host information in the data to be uploaded with the locally stored host information of the proxy host which is successfully registered, if the locally stored host information in the data to be uploaded, the verification is passed, or else the verification is failed.
The method for reporting data provided by the embodiment of the invention can further comprise the following steps after the proxy host is successfully registered:
The proxy host receives an information change request sent by a currently logged-in user and sends the information change request to the cloud; the information change request comprises user information of a user currently logged in, host information of the proxy host and user information of the user needing to be changed;
the cloud end verifies the user information and the host information of the user currently logged in the information change request, if the user information and the host information pass the verification, the user information of the user needing to be changed in the information change request is used for replacing the user information of the user currently logged in, otherwise, the user change cannot be realized.
After successful registration of the user and the proxy host is realized, the embodiment of the application can also realize reliable change of the user based on actual needs by the outside; specifically, if the account needs to be changed, the user (i.e. the original user) which is successfully registered can send an information change request to the cloud end through the proxy host, the cloud end verifies the user information and host information of the original user in the information change request, namely, the user information and host information are compared with the corresponding local information to realize verification, if the verification is passed, the user information of the original user which is locally stored is replaced by the user information and the user information which need to be changed, and therefore user change is realized, otherwise, the notification of user information errors and/or host information errors is fed back and displayed on the proxy host.
The method for reporting data provided by the embodiment of the invention, after the proxy host establishes the session with the cloud, further comprises the following steps:
the cloud end monitors the session with the proxy host in real time, and if the duration of the session reaches the preset duration, the access of the proxy host is refused.
The preset time length can be set according to actual needs; in order to further ensure the reliability of access to the cloud end, the cloud end in the embodiment of the application can also monitor the session with the proxy host in real time, and consider that the session time is invalid after the duration of the session reaches the preset duration, so that the access of the proxy host is refused, the proxy host is required to reestablish the session, and otherwise, the proxy host is allowed to directly realize the access to the cloud end based on the session.
According to the method and the device for monitoring the cloud platform, an implementation scheme based on a proxy host registration mechanism is provided for solving the problem of potential safety hazards existing in the fact that the device to be monitored on the client side is connected with the cloud platform, and the device to be monitored is brought into the cloud platform cloud through the proxy host accessed in one direction, so that the safety and reliability of the system can be effectively improved. Specifically, the proxy host can access the cloud and the equipment to be monitored simultaneously, the equipment to be monitored is managed through the proxy host, information such as performance, capacity, hard disk, alarm and heartbeat packet is reported to the cloud at regular time, and the cloud cannot access the proxy host and the equipment to be monitored; the registration mechanism of the proxy host prevents the data from being forged, so that the equipment to be monitored can be more safely accessed to the cloud platform, and is prevented from being attacked by hackers, and the equipment to be monitored can safely and reliably provide services to the outside.
The embodiment of the invention also provides a data reporting system, as shown in fig. 4, which may include a proxy 12, a cloud 13 and a device 11 to be monitored, wherein:
The proxy 12 is configured to: establishing a session with the cloud end 13 to realize data transmission to the cloud end 13 based on the established session; the method comprises the steps of regularly collecting equipment information of equipment 11 to be monitored of a connected client side, and obtaining corresponding data to be reported based on the currently collected equipment information; reporting the data to be reported to the cloud end 13; wherein, the established session only allows the proxy 12 to access the cloud 13 in one direction;
cloud 13 is used for: receiving data to be reported so that corresponding personnel can acquire the data to be reported to realize corresponding analysis and processing;
The device to be monitored 11 is for: for the proxy 12 to effect the collection of corresponding device information.
The data reporting system provided by the embodiment of the invention can be specifically used for an agent host: transmitting user information of a currently logged-in user to a cloud;
The cloud may also be used to: and verifying the currently received user information, and if the user information passes the verification, allowing the access of the proxy host to establish a session with the proxy host, otherwise, rejecting the access of the proxy host.
The cloud end can also be used for the data reporting system provided by the embodiment of the invention: after the proxy host reports the data to be reported to the cloud, acquiring host information of the proxy host carried in the data to be reported, verifying the acquired host information, if the verification is passed, storing the data to be reported, otherwise, discarding the data to be reported.
The data reporting system provided by the embodiment of the invention, the proxy host is also used for: after establishing the session with the cloud, monitoring the session with the proxy in real time, and refusing the access of the proxy if the duration of the session reaches the preset duration.
The proxy host is further used for sending user information of the user needing to be registered to the cloud before establishing a session with the cloud, the cloud is further used for verifying the user information received currently, if the user information is verified, the user information is fed back to verify the passed information, and if the user information is not verified, the registration of the proxy host is refused;
The proxy host is also used for sending host information of the proxy host to the cloud after receiving the information passing through the user information verification, so that the cloud verifies the currently received host information; and inquiring the result of verifying the corresponding host information from the cloud at fixed time, and storing the successful registration state when the verification of the corresponding host information is inquired to pass, otherwise, determining that the registration cannot be realized.
The cloud end is used for verifying corresponding host information before the proxy host is successfully registered, and specifically comprises the following steps: the cloud end outputs the currently received host information to a corresponding terminal of the manager, and determines whether verification of the corresponding host information is passed or not based on the information fed back by the manager through the corresponding terminal;
The cloud end is used for verifying corresponding host information after the proxy host is successfully registered, and specifically comprises the following steps: the cloud compares the currently received host information with the host information of the registered proxy host, if the host information of the registered proxy host which is the same as the currently received host information exists, the verification of the currently received host information is passed, otherwise, the verification is not passed.
The data reporting system provided by the embodiment of the invention, the proxy host is also used for: after successful registration, receiving an information change request sent by a currently logged-in user, and sending the information change request to a cloud; the information change request comprises user information of a user currently logged in, host information of the proxy host and user information of the user needing to be changed;
The cloud end is also used for: and verifying the user information and the host information of the user currently logged in the information change request, if the user information and the host information pass the verification, replacing the user information of the user which needs to be changed to the user in the information change request with the user information of the user currently logged in, otherwise, determining that the user change cannot be realized.
It should be noted that, for the description of the relevant part in the data reporting system provided by the embodiment of the present invention, please refer to the detailed description of the corresponding part in the data reporting method provided by the embodiment of the present invention, and the detailed description is omitted here. In addition, the parts of the above technical solutions provided in the embodiments of the present invention, which are consistent with the implementation principles of the corresponding technical solutions in the prior art, are not described in detail, so that redundant descriptions are avoided.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.