Background
With the development of internet technology, more and more devices and sensors have access to the internet, and the devices and sensors have the capability of mutual communication, so that the internet of things is formed. These equipment and the sensor of access thing networking will produce a large amount of operating mode data, and the following characteristic exists in the operating mode data of present thing networking: the method has the advantages of being continuous, high-speed, large in quantity and time series, and due to the characteristics, the problem of poor visualization performance exists when the working condition data of the Internet of things are displayed.
No effective solution has been proposed to the above problems.
Disclosure of Invention
In view of this, the present invention provides a method and a system for visualizing operating condition data, so as to alleviate the technical problem in the prior art that the visualization performance of the operating condition data of the internet of things device is low.
In a first aspect, an embodiment of the present invention provides a method for visualizing operating condition data, including: after a data call instruction sent by a client is obtained, determining the current reporting frequency of the Internet of things equipment corresponding to the data call instruction; if the current reporting frequency is greater than a preset threshold, determining a data display strategy based on target parameters, wherein the target parameters comprise: the method comprises the steps that target reporting frequency of the Internet of things equipment, the size of a client display page, updating frequency of the client display page and pixel density of the client display page are obtained, and the data display strategy is used for reducing display pressure of the client; sending the target reporting frequency to the Internet of things equipment, and acquiring working condition data reported by the Internet of things equipment at the target reporting frequency; processing the working condition data according to a preset aggregation strategy to obtain target working condition data; and sending the data display strategy and the target working condition data to the client so that the client generates and displays a first time series curve based on the data display strategy and the target working condition data.
Further, the preset aggregation policy includes: an average aggregation strategy or a sample aggregation strategy.
Further, if the preset aggregation strategy is the average aggregation strategy, processing the operating condition data according to the preset aggregation strategy to obtain target operating condition data, including: calculating an average value of the working condition data acquired in each first preset time period to obtain a plurality of average values; and determining the average values as the target working condition data.
Further, if the preset aggregation policy is the sampling aggregation policy, processing the operating condition data according to the preset aggregation policy to obtain target operating condition data, including: sampling the working condition data acquired in each second preset time period according to a preset sampling algorithm to obtain a plurality of sampled data; and determining the plurality of sample data as the target working condition data.
Further, the method further comprises: and if the current reporting frequency is less than or equal to the preset threshold, sending the working condition data of the Internet of things equipment to the client, so that the client generates and displays a second display time sequence curve based on the working condition data.
Further, the method further comprises: and if the Internet of things equipment cannot report the working condition data at the target reporting frequency, acquiring the working condition data reported by the Internet of things equipment at the current reporting frequency.
In a second aspect, an embodiment of the present invention further provides a system for visualizing operating condition data, including: the system comprises the Internet of things equipment, a server and a client, wherein the Internet of things equipment is used for reporting working condition data at a target reporting frequency after the target reporting frequency sent by the server is acquired; the server is used for determining the current reporting frequency of the Internet of things equipment corresponding to the data calling instruction after the data calling instruction sent by the client is obtained; the server is further configured to determine a data display policy based on a target parameter when the current reporting frequency is greater than a preset threshold, where the target parameter includes: the method comprises the steps that target reporting frequency of the Internet of things equipment, the size of a client display page, updating frequency of the client display page and pixel density of the client display page are obtained, and the data display strategy is used for reducing display pressure of the client; the server is further configured to send the target reporting frequency to the internet of things device, and acquire working condition data reported by the internet of things device at the target reporting frequency; the server is further used for processing the working condition data according to a preset aggregation strategy to obtain target working condition data; the server is further used for sending the data display strategy and the target working condition data to the client; and the client is used for sending the data calling instruction to the server and generating and displaying a first time sequence curve based on a data display strategy and the target working condition data.
Further, the server is further configured to calculate an average value of the working condition data acquired in each first preset time period to obtain a plurality of average values when the preset aggregation policy is the average aggregation policy; and determining the average values as the target working condition data.
Further, the server is further configured to sample the operating condition data acquired within each second preset time period according to a preset sampling algorithm under the condition that the preset aggregation policy is the sampling aggregation policy, so as to obtain a plurality of sampled data; and determining the plurality of sample data as the target working condition data.
In the embodiment of the invention, after acquiring a data calling instruction sent by a client, a server determines the current reporting frequency of the Internet of things equipment corresponding to the data calling instruction; if the current reporting frequency is greater than a preset threshold, determining a data display strategy based on the target parameter, wherein the data display strategy is used for reducing the display pressure of the client; sending the target reporting frequency to the Internet of things equipment, and acquiring working condition data reported by the Internet of things equipment at the target reporting frequency; processing the working condition data according to a preset aggregation strategy to obtain target working condition data; send data display strategy and target operating mode data for the client to make the client generate and show the time series curve based on data display strategy and target operating mode data, in this application, through thing networking equipment, the purpose of the method of improving visualization performance has been reached under the prerequisite of guaranteeing the display effect in cooperation of platform and client three parties, and then the lower technical problem of visualization performance to the operating mode data of thing networking equipment among the prior art, thereby realized having promoted the technical effect of the visualization performance of networking equipment operating mode data.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The first embodiment is as follows:
in accordance with an embodiment of the present invention, there is provided an embodiment of a method for visualizing operational condition data, it should be noted that the steps illustrated in the flowchart of the figures may be performed in a computer system, such as a set of computer-executable instructions, and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than presented herein.
FIG. 1 is a flow chart of visualization of condition data according to an embodiment of the present invention, as shown in FIG. 1, the method includes the following steps:
step S102, after a data call instruction sent by a client is obtained, determining the current reporting frequency of the Internet of things equipment corresponding to the data call instruction;
step S104, if the current reporting frequency is greater than a preset threshold, determining a data display strategy based on target parameters, wherein the target parameters comprise: the method comprises the steps that target reporting frequency of the Internet of things equipment, the size of a client display page, updating frequency of the client display page and pixel density of the client display page are obtained, and the data display strategy is used for reducing display pressure of the client;
it should be noted that the preset threshold may be set by a user according to an actual situation, and is not specifically limited in the embodiment of the present invention, and generally, the maximum value of the preset threshold may be set as a limit frequency of human eye refreshing.
Step S106, sending the target reporting frequency to the Internet of things equipment, and acquiring working condition data reported by the Internet of things equipment at the target reporting frequency;
step S108, processing the working condition data according to a preset aggregation strategy to obtain target working condition data;
specifically, the preset aggregation policy includes: an average aggregation strategy or a sample aggregation strategy.
Step S110, sending the data display policy and the target operating condition data to the client, so that the client generates and displays a first time series curve based on the data display policy and the target operating condition data.
In the embodiment of the invention, after acquiring a data calling instruction sent by a client, a server determines the current reporting frequency of the Internet of things equipment corresponding to the data calling instruction; if the current reporting frequency is greater than a preset threshold, determining a data display strategy based on the target parameter, wherein the data display strategy is used for reducing the display pressure of the client; sending the target reporting frequency to the Internet of things equipment, and acquiring working condition data reported by the Internet of things equipment at the target reporting frequency; processing the working condition data according to a preset aggregation strategy to obtain target working condition data; send data display strategy and target operating mode data for the client to make the client generate and show the time series curve based on data display strategy and target operating mode data, in this application, through thing networking equipment, the purpose of the method of improving visualization performance has been reached under the prerequisite of guaranteeing the display effect in cooperation of platform and client three parties, and then the lower technical problem of visualization performance to the operating mode data of thing networking equipment among the prior art, thereby realized having promoted the technical effect of the visualization performance of networking equipment operating mode data.
With the development of internet technology, more and more devices and sensors have access to the internet, and the devices and sensors have the capability of mutual communication, so that the internet of things is formed.
For example, the internet of things formed by processing equipment in a factory, the internet of things formed by bridge monitoring equipment and the like, wherein the operation data of the processing equipment can be used as working condition data, and the bridge deck pressure data collected by the bridge monitoring equipment can also be used as the working condition data.
Due to the characteristics of high speed, large amount of operating condition data, and the like, a time-series curve generated according to the operating condition data contains a large amount of data in a small area, for example, the time-series curve contains tens of operating condition data in one pixel, and thus, when a worker analyzes the pressure of the machining equipment or the bridge floor using the time-series curve, it is difficult to perform a detailed analysis thereof.
The method for aggregating and sampling the working condition data in the self-adaption mode of the reported data volume improves the display performance of the working condition data on the premise of guaranteeing the display effect through the cooperation of the Internet of things equipment, the platform and the client.
In this embodiment of the present invention, if the preset aggregation policy is the average aggregation policy, step S108 includes the following steps:
step S11, calculating an average value of the working condition data acquired in each first preset time period to obtain a plurality of average values;
and step S12, determining the average values as the target working condition data.
In the embodiment of the present invention, in order to improve the visualization performance of the working condition data, the working condition data may be divided into a plurality of data blocks according to the time sequence of obtaining the working condition data, where one data block corresponds to the working condition data obtained within a first preset time period.
Then, an average value of the operating condition data acquired in each first preset time period is calculated, and the average value is determined as the operating condition data (i.e., the target operating condition data) in the first time period.
The average value is determined as the working condition data in the first time period, so that the running condition of the equipment in the first preset time period can be reflected, the quantity of the working condition data needing to be displayed by the client is reduced, the visualization performance of the client is improved, and convenience is brought to the analysis of the working condition data by workers.
In this embodiment of the present invention, if the preset aggregation policy is the sampling aggregation policy, step S108 includes the following steps:
step S21, sampling the working condition data acquired in each second preset time period according to a preset sampling algorithm to obtain a plurality of sampled data;
step S22, determining the plurality of sample data as the target operating condition data.
In the embodiment of the present invention, in order to improve the visualization performance of the working condition data, the working condition data may be divided into a plurality of data blocks according to the time sequence of obtaining the working condition data, where one data block corresponds to the working condition data obtained within a second preset time period.
It should be noted that the first preset time period and the second preset time period may be the same time period or different time periods, and the first preset time period and the second preset time period may be set by a worker according to an actual situation, which is not specifically limited in the embodiment of the present invention.
Then, sampling the working condition data acquired in each second preset time period according to a preset sampling algorithm to obtain a plurality of sampled data, and determining each sampled data as the corresponding working condition data (i.e. target working condition data) in the second time period.
Through confirming every sample data as the operating mode data in the corresponding second time quantum, not only can reflect the running condition of equipment in the second preset time quantum, also reduced the quantity of the operating mode data that the customer end needs to show simultaneously, and then promoted the visual performance of customer end, provide convenience for the staff to the analysis of operating mode data.
Specifically, when the operating condition data is temperature data of the internet of things device, because under a general condition, the temperature of the internet of things device does not change greatly in a short time, one temperature data can be sampled in each second preset time period to serve as the temperature data of each second preset time.
In the embodiment of the present invention, as shown in fig. 2, the method further includes the following steps:
step S103, if the current reporting frequency is less than or equal to the preset threshold, the working condition data of the Internet of things equipment is sent to the client, so that the client generates and displays a second time series curve based on the working condition data.
In the embodiment of the invention, when the current reporting frequency is determined to be less than or equal to the preset threshold, the client displays the working condition data reported by the current reporting frequency, and the working condition data can be normally displayed without working pressure.
In the embodiment of the present invention, as shown in fig. 3, the method further includes the following steps:
step S107, if the Internet of things equipment cannot report the working condition data at the target reporting frequency, the working condition data reported by the Internet of things equipment at the current reporting frequency is obtained.
In the embodiment of the invention, because the reporting frequency of part of the internet of things equipment cannot be modified, the server can directly acquire the working condition data sent by the internet of things equipment at the current reporting frequency, and then directly execute the steps S108 and S110, so that the technical effects of improving the visualization performance of the working condition data of the internet of things equipment and reducing the display pressure of the client can be achieved.
Example two:
the embodiment of the present invention further provides a visualization system of operating condition data, where the visualization system of operating condition data is used to execute the visualization method of operating condition data provided in the foregoing description of the embodiment of the present invention, and the following is a specific description of the visualization system of operating condition data provided in the embodiment of the present invention.
As shown in fig. 4, fig. 4 is a schematic diagram of the visualization system of the operating condition data, and the visualization system of the operating condition data includes: the internet of things device 10, the server 20 and the client 30, wherein,
the internet of things equipment is used for reporting the working condition data at the target reporting frequency after the target reporting frequency sent by the server is acquired;
the server is used for determining the current reporting frequency of the Internet of things equipment corresponding to the data calling instruction after the data calling instruction sent by the client is obtained;
the server is further configured to determine a data display policy based on a target parameter when the current reporting frequency is greater than a preset threshold, where the target parameter includes: the method comprises the steps that target reporting frequency of the Internet of things equipment, the size of a client display page, updating frequency of the client display page and pixel density of the client display page are obtained, and the data display strategy is used for reducing display pressure of the client;
the server is further configured to send the target reporting frequency to the internet of things device, and acquire working condition data reported by the internet of things device at the target reporting frequency;
the server is further used for processing the working condition data according to a preset aggregation strategy to obtain target working condition data;
the server is further used for sending the data display strategy and the target working condition data to the client;
and the client is used for sending the data calling instruction to the server and generating and displaying a first time sequence curve based on a data display strategy and the target working condition data.
In the embodiment of the invention, after acquiring a data calling instruction sent by a client, a server determines the current reporting frequency of the Internet of things equipment corresponding to the data calling instruction; if the current reporting frequency is greater than a preset threshold, determining a data display strategy based on the target parameter, wherein the data display strategy is used for reducing the display pressure of the client; sending the target reporting frequency to the Internet of things equipment, and acquiring working condition data reported by the Internet of things equipment at the target reporting frequency; processing the working condition data according to a preset aggregation strategy to obtain target working condition data; send data display strategy and target operating mode data for the client to make the client generate and show the time series curve based on data display strategy and target operating mode data, in this application, through thing networking equipment, the purpose of the method of improving visualization performance has been reached under the prerequisite of guaranteeing the display effect in cooperation of platform and client three parties, and then the lower technical problem of visualization performance to the operating mode data of thing networking equipment among the prior art, thereby realized having promoted the technical effect of the visualization performance of networking equipment operating mode data.
Preferably, the preset aggregation policy includes: an average aggregation strategy or a sample aggregation strategy.
Preferably, the server is further configured to calculate an average value of the operating condition data acquired in each first preset time period to obtain a plurality of average values when the preset aggregation policy is the average aggregation policy; and determining the average values as the target working condition data.
Preferably, the server is further configured to sample the operating condition data acquired within each second preset time period according to a preset sampling algorithm under the condition that the preset aggregation policy is the sampling aggregation policy, so as to obtain a plurality of sampled data; and determining the plurality of sample data as the target working condition data.
Preferably, the server is further configured to send the operating condition data of the internet of things device to the client when the current reporting frequency is less than or equal to the preset threshold, so that the client generates and displays a second display time series curve based on the operating condition data.
Preferably, the server is further configured to acquire the operating condition data reported by the internet of things device at the current reporting frequency under the condition that the internet of things device cannot report the operating condition data at the target reporting frequency.
In addition, in the description of the embodiments of the present invention, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.