CN116614554A - Data processing method and device based on Internet of things equipment - Google Patents

Data processing method and device based on Internet of things equipment Download PDF

Info

Publication number
CN116614554A
CN116614554A CN202310367204.8A CN202310367204A CN116614554A CN 116614554 A CN116614554 A CN 116614554A CN 202310367204 A CN202310367204 A CN 202310367204A CN 116614554 A CN116614554 A CN 116614554A
Authority
CN
China
Prior art keywords
equipment
data
internet
things
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310367204.8A
Other languages
Chinese (zh)
Inventor
陆维先
张二青
原雷
王伟
王燕灵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou New China And Big Polytron Technologies Inc
Hangzhou Haolian Intelligent Technology Co ltd
Original Assignee
Hangzhou New China And Big Polytron Technologies Inc
Hangzhou Haolian Intelligent Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou New China And Big Polytron Technologies Inc, Hangzhou Haolian Intelligent Technology Co ltd filed Critical Hangzhou New China And Big Polytron Technologies Inc
Priority to CN202310367204.8A priority Critical patent/CN116614554A/en
Publication of CN116614554A publication Critical patent/CN116614554A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/54Presence management, e.g. monitoring or registration for receipt of user log-on information, or the connection status of the users
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching

Abstract

The application discloses a data processing method and device based on Internet of things equipment, wherein the method comprises the steps of acquiring equipment data of the Internet of things equipment based on a preset communication network when at least one Internet of things equipment is detected to be in an offline state; carrying out matching processing on the equipment data according to the rule engine, and carrying out business logic processing on the matching result to obtain reporting data corresponding to the equipment data; and sending the reported data to a client terminal corresponding to the Internet of things equipment. By acquiring the equipment data of the offline Internet of things equipment and combining a rule engine and a business logic processing mode, different offline equipment can be abstracted, the problems of equipment island, data island and the like caused under the condition of serious fragmentation of the Internet of things are effectively solved, the rapid data acquisition of the offline equipment can be facilitated, and the overall processing efficiency is improved.

Description

Data processing method and device based on Internet of things equipment
Technical Field
The application belongs to the technical field of information processing, and particularly relates to a data processing method and device based on Internet of things equipment.
Background
With the accelerated development of information technology, in recent years, the technology of the internet of things is mature, hundreds of billions or even billions of devices are accessed to the network, and along with the promotion of the internet of things era of the internet of things, the requirement on an access platform of the internet of things is very high.
However, when the existing internet of things technology collects data, the problems of low data utilization efficiency, difficult mining of data value and the like are easily caused, and further data collection efficiency and user experience are affected.
Disclosure of Invention
The application provides a data processing method and device based on Internet of things equipment, which aims to solve the problems that the prior Internet of things technology is easy to bring about low data utilization efficiency, difficult mining of data value and the like when data are acquired, so as to influence the technical defects of data acquisition efficiency, user experience and the like, and has the technical scheme that:
in a first aspect, an embodiment of the present application provides a data processing method based on an internet of things device, including:
when at least one piece of Internet of things equipment is detected to be in an offline state, acquiring equipment data of the Internet of things equipment based on a preset communication network;
carrying out matching processing on the equipment data according to the rule engine, and carrying out business logic processing on the matching result to obtain reporting data corresponding to the equipment data;
and sending the reported data to a client terminal corresponding to the Internet of things equipment.
In an optional aspect of the first aspect, before detecting that the at least one internet of things device is in an offline state, the method further comprises:
Judging whether a first equipment serial number of the equipment of the Internet of things is consistent with any registered equipment serial number in a preset database; the preset database comprises at least two registered equipment serial numbers, and each registered equipment serial number is generated based on different equipment information;
when the first equipment serial number is detected to be consistent with any one of the registered equipment serial numbers, determining that the Internet of things equipment is registered equipment;
when the fact that the first equipment serial number is inconsistent with all registered equipment serial numbers is detected, acquiring equipment information of the equipment of the Internet of things;
encrypting the equipment information of the Internet of things equipment to obtain a second equipment serial number of the Internet of things equipment, and updating the second equipment serial number into a preset database;
and feeding back the second equipment serial number of the Internet of things equipment to the Internet of things equipment, and updating the first equipment serial number into the second equipment serial number by the Internet of things equipment.
In still another alternative of the first aspect, after obtaining the device data of the internet of things device based on the preset communication network, before performing the matching processing on the device data according to the rule engine, the method further includes:
analyzing the equipment data to obtain the number of data types in the equipment data;
And determining a target queue according to the number of the data types and a preset allocation rule, and allocating the equipment data to the target queue.
In yet another alternative of the first aspect, the matching processing of the device data according to the rule engine includes:
load data of each server are obtained, and corresponding weight values are distributed to each server according to the load data of each server and a preset weight algorithm;
and taking the server with the maximum weight value as a target server, and carrying out matching processing on the equipment data in the target queue according to the rule engine based on the target server.
In yet another alternative of the first aspect, the matching processing of the device data according to the rule engine includes:
extracting equipment address information from the equipment data, and processing the equipment address information based on a preset hash function to obtain a hash value;
when the hash value is detected to be in a preset interval corresponding to any one server, mapping the hash value to the server, and carrying out matching processing on the equipment data according to a rule engine based on the server.
In yet another alternative of the first aspect, sending the report data to the client terminal corresponding to the internet of things device includes:
Filtering the reported data, and writing the filtered reported data into a preset search engine;
creating an index based on the preset search engine, and performing visualization based on a preset visualization platform;
and sending the visualized report data to a client terminal corresponding to the Internet of things equipment.
In still another alternative of the first aspect, sending the visually processed report data to a client terminal corresponding to the internet of things device includes:
packaging the visualized report data to obtain a report message;
storing the reported message into a message queue, and judging whether a message request sent by a client terminal corresponding to the Internet of things equipment is received or not;
when the client terminal sends a message request, the report message in the message queue is sent to the client terminal.
In a second aspect, an embodiment of the present application provides a data processing apparatus based on an internet of things device, including:
the data acquisition module is used for acquiring equipment data of the Internet of things equipment based on a preset communication network when at least one Internet of things equipment is detected to be in an offline state;
The data processing module is used for carrying out matching processing on the equipment data according to the rule engine and carrying out business logic processing on the matching result to obtain reporting data corresponding to the equipment data;
and the data uploading module is used for sending the reported data to the client terminal corresponding to the Internet of things equipment.
In an alternative of the second aspect, the apparatus further comprises:
before detecting that at least one Internet of things device is in an offline state, judging whether a first device serial number of the Internet of things device is consistent with any one registered device serial number in a preset database; the preset database comprises at least two registered equipment serial numbers, and each registered equipment serial number is generated based on different equipment information;
when the first equipment serial number is detected to be consistent with any one of the registered equipment serial numbers, determining that the Internet of things equipment is registered equipment;
when the fact that the first equipment serial number is inconsistent with all registered equipment serial numbers is detected, acquiring equipment information of the equipment of the Internet of things;
encrypting the equipment information of the Internet of things equipment to obtain a second equipment serial number of the Internet of things equipment, and updating the second equipment serial number into a preset database;
And feeding back the second equipment serial number of the Internet of things equipment to the Internet of things equipment, and updating the first equipment serial number into the second equipment serial number by the Internet of things equipment.
In yet another alternative of the second aspect, the apparatus further comprises:
after acquiring the equipment data of the Internet of things equipment based on a preset communication network, analyzing the equipment data to obtain the number of data types in the equipment data before carrying out matching processing on the equipment data according to a rule engine;
and determining a target queue according to the number of the data types and a preset allocation rule, and allocating the equipment data to the target queue.
In a further alternative of the second aspect, the data processing module is specifically configured to:
load data of each server are obtained, and corresponding weight values are distributed to each server according to the load data of each server and a preset weight algorithm;
and taking the server with the maximum weight value as a target server, and carrying out matching processing on the equipment data in the target queue according to the rule engine based on the target server.
In a further alternative of the second aspect, the data processing module is specifically configured to:
extracting equipment address information from the equipment data, and processing the equipment address information based on a preset hash function to obtain a hash value;
When the hash value is detected to be in a preset interval corresponding to any one server, mapping the hash value to the server, and carrying out matching processing on the equipment data according to a rule engine based on the server.
In yet another alternative of the second aspect, the data uploading module is specifically configured to:
filtering the reported data, and writing the filtered reported data into a preset search engine;
creating an index based on the preset search engine, and performing visualization based on a preset visualization platform;
and sending the visualized report data to a client terminal corresponding to the Internet of things equipment.
In yet another alternative of the second aspect, the data uploading module is specifically configured to:
packaging the visualized report data to obtain a report message;
storing the reported message into a message queue, and judging whether a message request sent by a client terminal corresponding to the Internet of things equipment is received or not;
when the client terminal sends a message request, the report message in the message queue is sent to the client terminal.
In a third aspect, an embodiment of the present application further provides a data processing apparatus based on an internet of things device, including a processor and a memory;
the processor is connected with the memory;
a memory for storing executable program code;
the processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to implement the data processing method based on the internet of things device provided in the first aspect of the embodiment of the present application or any implementation manner of the first aspect.
In a fourth aspect, an embodiment of the present application provides a computer storage medium, where a computer program is stored, where the computer program includes program instructions, where the program instructions, when executed by a processor, may implement the data processing method based on the internet of things device provided in the first aspect or any implementation manner of the first aspect of the embodiment of the present application.
In the embodiment of the application, when the data of the Internet of things equipment is processed, the equipment data of the Internet of things equipment can be acquired based on a preset communication network when at least one Internet of things equipment is detected to be in an offline state; carrying out matching processing on the equipment data according to the rule engine, and carrying out business logic processing on the matching result to obtain reporting data corresponding to the equipment data; and sending the reported data to a client terminal corresponding to the Internet of things equipment. By acquiring the equipment data of the offline Internet of things equipment and combining a rule engine and a business logic processing mode, different offline equipment can be abstracted, the problems of equipment island, data island and the like caused under the condition of serious fragmentation of the Internet of things are effectively solved, the rapid data acquisition of the offline equipment can be facilitated, and the overall processing efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is an overall flowchart of a data processing method based on an internet of things device according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an internet of things device according to an embodiment of the present application;
FIG. 3 is a block diagram of a rule engine according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a message processing structure according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a data processing device based on an internet of things device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a data processing apparatus based on an internet of things device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application.
In the following description, the terms "first," "second," and "first," are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. The following description provides various embodiments of the application that may be substituted or combined between different embodiments, and thus the application is also to be considered as embracing all possible combinations of the same and/or different embodiments described. Thus, if one embodiment includes feature A, B, C and another embodiment includes feature B, D, then the present application should also be considered to include embodiments that include one or more of all other possible combinations including A, B, C, D, although such an embodiment may not be explicitly recited in the following.
The following description provides examples and does not limit the scope, applicability, or examples set forth in the claims. Changes may be made in the function and arrangement of elements described without departing from the scope of the application. Various examples may omit, replace, or add various procedures or components as appropriate. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Furthermore, features described with respect to some examples may be combined into other examples.
Referring to fig. 1, fig. 1 shows an overall flowchart of a data processing method based on an internet of things device according to an embodiment of the present application.
As shown in fig. 1, the data processing method based on the internet of things device at least may include the following steps:
step 102, acquiring device data of the internet of things device based on a preset communication network when at least one internet of things device is detected to be in an offline state.
In the embodiment of the present application, the data processing method based on the internet of things device may be, but is not limited to, applied to a server cluster, where the server cluster includes one or more servers, and when the server cluster includes a plurality of servers, the data processing method may be, but is not limited to, divided into a master server and a plurality of slave servers. The server cluster can establish communication connection with one or more internet of things devices, and can also establish connection with a client terminal corresponding to each internet of things device, so as to forward device data sent by the internet of things device to the corresponding client terminal. After the server cluster obtains the device data sent by the internet of things device, the device data can be subjected to matching processing according to a preset rule, then the matching result is processed according to service logic to obtain corresponding report data, and the report data can be timely sent to a client terminal corresponding to the internet of things device, so that the client terminal can rapidly analyze the report data, and further the current working state of the internet of things device is judged.
The internet of things device can directly send device data to the server cluster through the cellular data network or can indirectly send device data to the server cluster through the wireless data network so as to ensure that the device data can be sent to the server cluster in any situation. It can be appreciated that when the internet of things device indirectly transmits device data to the server cluster through the wireless data network, the internet of things device can be but not limited to be provided with a WIFI module, so as to establish communication connection with the server cluster through the WIFI module and the erected wireless communication network. Or, the internet of things device may, but is not limited to, be provided with a bluetooth module, so that the bluetooth module firstly transmits the collected device data to a mobile terminal (or to a designated APP on the mobile terminal) for establishing bluetooth communication connection, and then the mobile terminal transmits the device data to the server cluster through a cellular data network. In the embodiment of the application, the two modes do not need extra wiring operation, so that the transmission efficiency of equipment data is improved.
The structural schematic diagram of the internet of things device provided by the embodiment of the application can be referred to herein as shown in fig. 2. As shown in fig. 2, the server cluster may establish communication connection with a plurality of internet of things devices, which may be respectively represented as an internet of things device 1, an internet of things device 2 and an internet of things device 3, where each internet of things device may be provided with a WIFI module, a bluetooth module and a cellular data module (5G), and when the cellular data module of the internet of things device may be normally used, the acquired device data is sent to the server cluster by default through the cellular data module; when the cellular data module of the internet of things device cannot be normally used, communication connection can be established between the wireless communication network and the server cluster through the WIFI module and the erected wireless communication network, or the collected device data can be sent to a mobile terminal (or a designated APP on the mobile terminal) for establishing Bluetooth communication connection through the Bluetooth module, and then the mobile terminal sends the device data to the server cluster through the cellular data network, so that the method is not limited.
It should be noted that, in the embodiment of the present application, the device data collected by the internet of things device may include, but is not limited to, a device temperature, a device health status, a device anomaly warning number, and the like, and before the internet of things device sends the collected device data to the server cluster, the internet of things device needs to be registered in the server cluster, so as to ensure the security and privacy of the device data in the transmission process.
In addition, the JSON format is selected as the format of the device data interaction and configuration in the embodiment of the application, so that the user can conveniently read and modify the configuration, and the program can also conveniently read and analyze.
Specifically, when data of the internet of things device is processed, the server cluster can firstly determine whether the internet of things device is in a normal internet of things state, and it is to be understood that a mode of determining the internet of things state here can be, but is not limited to, sending a request for obtaining the data to the internet of things device by the server cluster according to a preset time interval, and when detecting that the internet of things device does not send the data to the server cluster through an interface or a channel corresponding to cellular data, determining that the internet of things device is in an offline state (namely, can be understood as an offline state). When the internet of things equipment is detected to send the data to the server cluster through the interface or the channel corresponding to the cellular data, the internet of things equipment is characterized to be in a networking state at the moment, and the data can be directly sent to the server cluster through the cellular data.
Further, when it is determined that the internet of things device is in an offline state, the server cluster may acquire device data of the internet of things device based on a preset communication network, where the preset communication network may be, but is not limited to, a WIFI module combined with the internet of things device and a preset wireless communication network, so that the internet of things device sends the acquired device data to the server cluster in the same local area network; or, the preset communication network may also be a cellular data network corresponding to a mobile terminal that establishes a bluetooth connection with the bluetooth module of the internet of things device, in other words, the server cluster may acquire device data sent by the mobile terminal through the cellular data network, where the device data is sent by the bluetooth module of the internet of things device.
As an optional implementation manner of the present application, before detecting that at least one internet of things device is in an offline state, the method further includes:
judging whether a first equipment serial number of the equipment of the Internet of things is consistent with any registered equipment serial number in a preset database; the preset database comprises at least two registered equipment serial numbers, and each registered equipment serial number is generated based on different equipment information;
When the first equipment serial number is detected to be consistent with any one of the registered equipment serial numbers, determining that the Internet of things equipment is registered equipment;
when the fact that the first equipment serial number is inconsistent with all registered equipment serial numbers is detected, acquiring equipment information of the equipment of the Internet of things;
encrypting the equipment information of the Internet of things equipment to obtain a second equipment serial number of the Internet of things equipment, and updating the second equipment serial number into a preset database;
and feeding back the second equipment serial number of the Internet of things equipment to the Internet of things equipment, and updating the first equipment serial number into the second equipment serial number by the Internet of things equipment.
Specifically, in order to ensure the safety and privacy of the device data in the transmission process, before the device data of the internet of things device are acquired, the server cluster can judge whether the internet of things device is a registered device according to the first device serial number of the internet of things device, wherein the server cluster can generate a corresponding device serial number according to the device information of each internet of things device in the registration process of the internet of things device, and feed the device serial number back to the internet of things device to represent that the internet of things device is registered, and each internet of things device corresponds to one device serial number. It may be understood that, in the embodiment of the present application, the server cluster may uniformly store the generated device serial numbers corresponding to each registered internet of things device into a preset database, and may update the device serial numbers corresponding to the newly registered internet of things devices into the preset database in real time.
When the server cluster determines that the equipment serial numbers of the equipment of the Internet of things are inconsistent with all registered equipment serial numbers in the preset database, the equipment serial numbers of the equipment of the Internet of things are represented by the equipment serial numbers corresponding to the equipment, and are not equipment serial numbers generated by the server cluster, namely the equipment of the Internet of things is unregistered equipment, further the equipment information of the equipment of the Internet of things can be obtained by the server cluster, and the equipment information of the equipment of the Internet of things is encrypted based on an encryption algorithm to generate the equipment serial numbers corresponding to the equipment of the Internet of things. Here, the device information of the internet of things device may include, but is not limited to, a product key, a device key, and a device name, which may be automatically generated and obtained by the internet of things device.
It should be noted that, the manner in which the server cluster obtains the device information and the device serial number of the internet of things device may be, but not limited to, the above-mentioned cellular data network, or the WIFI module, the preset wireless communication network, and the data network corresponding to the bluetooth module and the mobile terminal that establishes the bluetooth connection.
It can be further understood that, in order to further improve the efficiency of data processing, in a process that the server cluster obtains the device data of the internet of things device based on the preset communication network, the device serial number sent by the internet of things device can be synchronously obtained, and after the internet of things device is determined to be the registered device or registration is completed, the device data of the internet of things device can be obtained.
And 104, carrying out matching processing on the equipment data according to the rule engine, and carrying out business logic processing on the matching result to obtain reporting data corresponding to the equipment data.
Specifically, after obtaining the device data of the internet of things device, the server cluster may, but is not limited to, perform matching processing on the device data according to a preset rule engine, and perform corresponding service logic processing on the obtained matching result, so as to obtain reporting data corresponding to the device data. Wherein the rules engine may be configured to separate business decisions from application code, and to make business decisions based on the business rules by receiving data input and interpreting the business rules. The rule engine is also understood herein as an inference engine for matching input device data with set rules, the framework of which may be implemented based on the Rete algorithm. The Rete algorithm is an efficient method for comparing a large number of pattern sets with a large number of object sets, and finds out all objects and rules matching each pattern by a network screening method, and the core idea is to construct a matching network by using separated matching items, and simultaneously cache intermediate results.
The frame structure diagram of a rule engine provided in the embodiment of the present application as shown in fig. 3 may be further combined with the present application, and as shown in fig. 3, root Node may be understood as a Root Node, that is, an entry into which all device data enters; a Type Node may be understood as a Type of Node that represents a definition of a set of business rules that the rules engine only lets device data of a matching Type reach that Node and can propagate through that Type of Node to other nodes (e.g., conditional nodes). Here, the Type Node may be specifically classified into a Left Type Node and a Right Type Node. It will be appreciated that other nodes, such as a condition Node (Alpha Node), may be understood as a literal condition containing a rule, such as person. Age >10, which is a constraint on a condition Node, and when a rule has multiple literal conditions, the literal conditions are linked together. The Hash Map is added with the literal value (attribute name) as key and the Alpha Node as value, each time the Alpha Node is added to one Type Node. When a new instance enters the Type Node, the new instance is not transmitted to each Alpha Node, and the correct Alpha Node can be directly obtained from the Hash Map, so that unnecessary literal inspection is avoided.
In the embodiment of the present application, the device data of the internet of things device may be, but is not limited to, represented as follows:
wherein, the id can be the unique id for identifying the current device; version may correspond to version number; the DeviceSN may correspond to a device serial number (unique); method may correspond to a request method; params may correspond to request parameters (parameters may be customized according to different traffic scenarios); temperature may correspond to a device temperature; powerState may correspond to an equipment on/off state, on may be understood as off, off may be understood as off; the time may correspond to a timestamp; the warn count may correspond to a number of warnings; the error count may correspond to an anomaly number;
the reported data obtained by the server cluster through service logic processing can be represented as follows:
wherein success may correspond to success; the message may correspond to the returned message content; the code may correspond to a returned status code.
As still another alternative of the embodiment of the present application, after obtaining the device data of the internet of things device based on the preset communication network, before performing the matching processing on the device data according to the rule engine, the method further includes:
analyzing the equipment data to obtain the number of data types in the equipment data;
And determining a target queue according to the number of the data types and a preset allocation rule, and allocating the equipment data to the target queue.
Specifically, in order to improve concurrency performance of the data reporting interface of the internet of things device, after obtaining the device data of the internet of things device, the server cluster may analyze the device data to obtain the number of data types contained in the device data. The device data of the internet of things device includes, for example, a device temperature, a device health state, and a device abnormality warning number, and the number of obtained data types may be 3.
It may be understood that, in the embodiment of the present application, the server cluster may, but is not limited to, use Kafka message middleware to encapsulate acquired device data into a message, and store the message into a corresponding message queue, and may encapsulate a processing result after processing the device data into a message and store the message into the message queue, so that a client terminal may acquire, in real time, a message corresponding to the processing result by subscribing to the message queue, thereby improving concurrency performance of an internet of things device data reporting interface.
Further, after determining the number of data types in the device data, the server cluster may classify the number of data types according to a preset allocation rule, so as to divide the device data into corresponding target queues. The preset allocation rule may, but is not limited to, correspond to different numbers of data types for different types of queues, and the server cluster may determine, according to the number of data types in the device data, a corresponding queue as a target queue, and allocate the device data to the target queue for waiting. It can be understood that different types of queues can correspond to servers with different loads or different processing speeds, so that the server cluster can conveniently distribute equipment data to the corresponding servers for processing, and further, the data processing efficiency is effectively improved.
As still another alternative of the embodiment of the present application, performing matching processing on device data according to a rule engine includes:
load data of each server are obtained, and corresponding weight values are distributed to each server according to the load data of each server and a preset weight algorithm;
and taking the server with the maximum weight value as a target server, and carrying out matching processing on the equipment data in the target queue according to the rule engine based on the target server.
Specifically, in the process of processing the device data, the server cluster may further obtain current load data of each server in order to ensure load balancing of each server, and allocate a corresponding weight value to each server in combination with a preset weight algorithm, so as to determine which server to allocate the device data to according to the weight value. If the load of a certain server is high, the weight value of the server is reduced, so that the allocation amount of the request is reduced, and the purpose of load balancing is achieved. It will be appreciated that a plurality of servers are included in a server cluster, each server being capable of processing device data.
Further, after obtaining the corresponding weight value allocated to each server, the server cluster may use the server with the largest weight value as the target server, and allocate the device data in the target queue to the target server, so that the target server performs matching processing on the device data in combination with the rule engine.
As still another alternative of the embodiment of the present application, performing matching processing on device data according to a rule engine includes:
extracting equipment address information from the equipment data, and processing the equipment address information based on a preset hash function to obtain a hash value;
when the hash value is detected to be in a preset interval corresponding to any one server, mapping the hash value to the server, and carrying out matching processing on the equipment data according to a rule engine based on the server.
Specifically, in the process of processing the device data, in order to ensure load balancing of each server, the server cluster may further extract device address information from the device data of the internet of things device, where the device address information may be, but is not limited to, an IP address or URL information of the internet of things device, and input the device address information into a preset hash function to obtain a corresponding hash value.
Further, after obtaining the hash value corresponding to the device address information of the internet of things device, the server cluster may map the hash value to a corresponding server when detecting that the hash value is in a preset interval corresponding to any one server, so that the server can perform matching processing on the device data in combination with a rule engine.
Referring also to fig. 4, a schematic diagram of a message processing structure provided by an embodiment of the present application is shown in fig. 4, where a message Producer (corresponding to a Producer in the figure and not limited to one or more), a message middleware (corresponding to a Broker in the figure and not limited to one or more), and a message consumer (corresponding to a coomer in the figure and not limited to one or more) may be included in a message processing process, where the message Producer may be used to obtain device data of an internet of things device, the message consumer may be used to parse the device data, match a rule engine, and execute business logic, and the message middleware may be used to provide the device data to the message consumer and store the device data.
And 106, transmitting the reported data to a client terminal corresponding to the Internet of things equipment.
As the number of the Internet of things devices is increased, the reporting frequency of the data is increased, the stored data is increased, the database pressure is high, in order to avoid influencing the processing efficiency of the data, the server cluster can monitor and filter the reported data based on a log hash handler processing frame, store the filtered reported data into a preset search engine for creating an index, and then can perform visual processing on the reported data after the index creating processing based on a preset visual platform. The log-stand loader processing framework can be understood as a lightweight and open-source log collecting processing framework, can conveniently collect scattered and diversified logs, performs custom filtering analysis processing and then transmits the logs to a designated position; the preset search engine can be understood as an elastiscearch, i.e. a real-time distributed search and analysis engine, which can be used for full text searching, structured searching and analysis; the preset visual platform can be understood as kibana, namely an open-source data analysis visual platform, the user can perform efficient search, visual summarization and multidimensional analysis on log data provided by logstack and elastiscearch by using kibana, and can interact with data in an elastiscearch search engine, and the user can quickly create a dynamic dashboard based on interface operation of a browser.
Further, after obtaining the reported data after the visualization processing, the server cluster may send the reported data to a client terminal corresponding to the internet of things device, so that the client terminal can quickly and effectively analyze the running state of the internet of things device in combination with the reported data.
As still another alternative of the embodiment of the present application, sending the visually processed report data to a client terminal corresponding to the internet of things device includes:
packaging the visualized report data to obtain a report message;
storing the reported message into a message queue, and judging whether a message request sent by a client terminal corresponding to the Internet of things equipment is received or not;
when the client terminal sends a message request, the report message in the message queue is sent to the client terminal.
Specifically, to ensure the validity and instantaneity of the reported data, the server cluster may further encapsulate the reported data into a message and store the message in a message queue, and accurately judge whether the client terminal has a requirement of acquiring the reported data by acquiring a message request sent by the client terminal corresponding to the internet of things device according to a preset time interval.
Referring to fig. 5, fig. 5 shows a schematic structural diagram of a data processing apparatus based on an internet of things device according to an embodiment of the present application.
As shown in fig. 5, the data processing apparatus 500 based on the internet of things device may at least include a data acquisition module 501, a data processing module 502, and a data uploading module 503, where:
the data acquisition module 501 is configured to acquire device data of the internet of things device based on a preset communication network when at least one internet of things device is detected to be in an offline state;
the data processing module 502 is configured to perform matching processing on the device data according to the rule engine, and perform service logic processing on the matching result to obtain reporting data corresponding to the device data;
and the data uploading module 503 is configured to send the reported data to a client terminal corresponding to the internet of things device.
In some possible embodiments, the apparatus further comprises:
before detecting that at least one Internet of things device is in an offline state, judging whether a first device serial number of the Internet of things device is consistent with any one registered device serial number in a preset database; the preset database comprises at least two registered equipment serial numbers, and each registered equipment serial number is generated based on different equipment information;
When the first equipment serial number is detected to be consistent with any one of the registered equipment serial numbers, determining that the Internet of things equipment is registered equipment;
when the fact that the first equipment serial number is inconsistent with all registered equipment serial numbers is detected, acquiring equipment information of the equipment of the Internet of things;
encrypting the equipment information of the Internet of things equipment to obtain a second equipment serial number of the Internet of things equipment, and updating the second equipment serial number into a preset database;
and feeding back the second equipment serial number of the Internet of things equipment to the Internet of things equipment, and updating the first equipment serial number into the second equipment serial number by the Internet of things equipment.
In some possible embodiments, the apparatus further comprises:
after acquiring the equipment data of the Internet of things equipment based on a preset communication network, analyzing the equipment data to obtain the number of data types in the equipment data before carrying out matching processing on the equipment data according to a rule engine;
and determining a target queue according to the number of the data types and a preset allocation rule, and allocating the equipment data to the target queue.
In some possible embodiments, the data processing module is specifically configured to:
load data of each server are obtained, and corresponding weight values are distributed to each server according to the load data of each server and a preset weight algorithm;
And taking the server with the maximum weight value as a target server, and carrying out matching processing on the equipment data in the target queue according to the rule engine based on the target server.
In some possible embodiments, the data processing module is specifically configured to:
extracting equipment address information from the equipment data, and processing the equipment address information based on a preset hash function to obtain a hash value;
when the hash value is detected to be in a preset interval corresponding to any one server, mapping the hash value to the server, and carrying out matching processing on the equipment data according to a rule engine based on the server.
In some possible embodiments, the data uploading module is specifically configured to:
filtering the reported data, and writing the filtered reported data into a preset search engine;
creating an index based on the preset search engine, and performing visualization based on a preset visualization platform;
and sending the visualized report data to a client terminal corresponding to the Internet of things equipment.
In some possible embodiments, the data uploading module is specifically configured to:
Packaging the visualized report data to obtain a report message;
storing the reported message into a message queue, and judging whether a message request sent by a client terminal corresponding to the Internet of things equipment is received or not;
when the client terminal sends a message request, the report message in the message queue is sent to the client terminal.
It will be clear to those skilled in the art that the technical solutions of the embodiments of the present application may be implemented by means of software and/or hardware. "Unit" and "module" in this specification refer to software and/or hardware capable of performing a specific function, either alone or in combination with other components, such as Field programmable gate arrays (Field-Programmable Gate Array, FPGAs), integrated circuits (Integrated Circuit, ICs), etc.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a data processing apparatus based on an internet of things device according to an embodiment of the present application.
As shown in fig. 6, the data processing apparatus 600 based on the internet of things device may comprise at least one processor 601, at least one network interface 604, a user interface 603, a memory 605 and at least one communication bus 602.
Wherein the communication bus 602 may be used to enable connectivity communication for the various components described above.
The user interface 603 may include keys, and the optional user interface may also include a standard wired interface, a wireless interface, among others.
The network interface 604 may include, but is not limited to, a bluetooth module, an NFC module, a Wi-Fi module, etc.
Wherein the processor 601 may include one or more processing cores. The processor 601 performs various functions and processes of routing the data of the internet of things device based data processing apparatus 600 by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 605 and invoking data stored in the memory 605 using various interfaces and lines connecting the various parts within the internet of things device based data processing apparatus 600. Alternatively, the processor 601 may be implemented in at least one hardware form of DSP, FPGA, PLA. The processor 601 may integrate one or a combination of several of a CPU, GPU, modem, and the like. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 601 and may be implemented by a single chip.
The memory 605 may include RAM or ROM. Optionally, the memory 605 includes a non-transitory computer readable medium. Memory 605 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 605 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described above, etc.; the storage data area may store data or the like referred to in the above respective method embodiments. The memory 605 may also optionally be at least one storage device located remotely from the processor 601. As shown in fig. 6, an operating system, a network communication module, a user interface module, and a data processing application based on an internet of things device may be included in the memory 605, which is one type of computer storage medium.
Specifically, the processor 601 may be configured to invoke a data processing application program based on the internet of things device stored in the memory 605, and specifically perform the following operations:
when at least one piece of Internet of things equipment is detected to be in an offline state, acquiring equipment data of the Internet of things equipment based on a preset communication network;
Carrying out matching processing on the equipment data according to the rule engine, and carrying out business logic processing on the matching result to obtain reporting data corresponding to the equipment data;
and sending the reported data to a client terminal corresponding to the Internet of things equipment.
In some possible embodiments, before detecting that at least one internet of things device is in an offline state, the method further includes:
judging whether a first equipment serial number of the equipment of the Internet of things is consistent with any registered equipment serial number in a preset database; the preset database comprises at least two registered equipment serial numbers, and each registered equipment serial number is generated based on different equipment information;
when the first equipment serial number is detected to be consistent with any one of the registered equipment serial numbers, determining that the Internet of things equipment is registered equipment;
when the fact that the first equipment serial number is inconsistent with all registered equipment serial numbers is detected, acquiring equipment information of the equipment of the Internet of things;
encrypting the equipment information of the Internet of things equipment to obtain a second equipment serial number of the Internet of things equipment, and updating the second equipment serial number into a preset database;
and feeding back the second equipment serial number of the Internet of things equipment to the Internet of things equipment, and updating the first equipment serial number into the second equipment serial number by the Internet of things equipment.
In some possible embodiments, after obtaining the device data of the internet of things device based on the preset communication network, before performing the matching processing on the device data according to the rule engine, the method further includes:
analyzing the equipment data to obtain the number of data types in the equipment data;
and determining a target queue according to the number of the data types and a preset allocation rule, and allocating the equipment data to the target queue.
In some possible embodiments, matching the device data according to the rules engine includes:
load data of each server are obtained, and corresponding weight values are distributed to each server according to the load data of each server and a preset weight algorithm;
and taking the server with the maximum weight value as a target server, and carrying out matching processing on the equipment data in the target queue according to the rule engine based on the target server.
In some possible embodiments, matching the device data according to the rules engine includes:
extracting equipment address information from the equipment data, and processing the equipment address information based on a preset hash function to obtain a hash value;
when the hash value is detected to be in a preset interval corresponding to any one server, mapping the hash value to the server, and carrying out matching processing on the equipment data according to a rule engine based on the server.
In some possible embodiments, sending the report data to a client terminal corresponding to the internet of things device includes:
filtering the reported data, and writing the filtered reported data into a preset search engine;
creating an index based on the preset search engine, and performing visualization based on a preset visualization platform;
and sending the visualized report data to a client terminal corresponding to the Internet of things equipment.
In some possible embodiments, sending the visualized report data to a client terminal corresponding to the internet of things device includes:
packaging the visualized report data to obtain a report message;
storing the reported message into a message queue, and judging whether a message request sent by a client terminal corresponding to the Internet of things equipment is received or not;
when the client terminal sends a message request, the report message in the message queue is sent to the client terminal.
The present application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the above method. The computer readable storage medium may include, among other things, any type of disk including floppy disks, optical disks, DVDs, CD-ROMs, micro-drives, and magneto-optical disks, ROM, RAM, EPROM, EEPROM, DRAM, VRAM, flash memory devices, magnetic or optical cards, nanosystems (including molecular memory ICs), or any type of media or device suitable for storing instructions and/or data.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present application is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required for the present application.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, such as a division of units, merely a division of logic functions, and there may be additional divisions in actual implementation, such as multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some service interface, device or unit indirect coupling or communication connection, electrical or otherwise.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable memory. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in whole or in part in the form of a software product stored in a memory, comprising several instructions for causing a computer device (which may be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method of the various embodiments of the present application. And the aforementioned memory includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Those of ordinary skill in the art will appreciate that all or a portion of the steps in the various methods of the above embodiments may be performed by hardware associated with a program that is stored in a computer readable memory, which may include: flash disk, read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), magnetic or optical disk, and the like.
The above are merely exemplary embodiments of the present disclosure and are not intended to limit the scope of the present disclosure. That is, equivalent changes and modifications are contemplated by the teachings of this disclosure, which fall within the scope of the present disclosure. Embodiments of the present disclosure will be readily apparent to those skilled in the art from consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a scope and spirit of the disclosure being indicated by the claims.

Claims (10)

1. The data processing method based on the Internet of things equipment is characterized by comprising the following steps of:
When at least one piece of Internet of things equipment is detected to be in an offline state, acquiring equipment data of the Internet of things equipment based on a preset communication network;
matching the equipment data according to a rule engine, and carrying out business logic processing on a matching result to obtain reporting data corresponding to the equipment data;
and sending the reported data to a client terminal corresponding to the Internet of things equipment.
2. The method of claim 1, further comprising, prior to the detecting that the at least one internet of things device is offline:
judging whether a first equipment serial number of the equipment of the Internet of things is consistent with any registered equipment serial number in a preset database; the preset database comprises at least two registered equipment serial numbers, and each registered equipment serial number is generated based on different equipment information;
when the first equipment serial number is detected to be consistent with any one of the registered equipment serial numbers, determining that the Internet of things equipment is registered equipment;
when the first equipment serial number is detected to be inconsistent with all the registered equipment serial numbers, acquiring equipment information of the Internet of things equipment;
Encrypting the equipment information of the Internet of things equipment to obtain a second equipment serial number of the Internet of things equipment, and updating the second equipment serial number into the preset database;
and feeding back a second equipment serial number of the Internet of things equipment to the Internet of things equipment, and updating the first equipment serial number to the second equipment serial number by the Internet of things equipment.
3. The method according to claim 1, wherein after the obtaining the device data of the internet of things device based on the preset communication network, before the matching processing of the device data according to the rule engine, the method further comprises:
analyzing the equipment data to obtain the number of data types in the equipment data;
and determining a target queue according to the number of the data types and a preset allocation rule, and allocating the equipment data to the target queue.
4. A method according to claim 3, wherein said matching said device data according to a rules engine comprises:
load data of each server are obtained, and corresponding weight values are distributed to each server according to the load data of each server and a preset weight algorithm;
And taking the server with the maximum weight value as a target server, and carrying out matching processing on the equipment data in the target queue according to a rule engine based on the target server.
5. A method according to claim 3, wherein said matching said device data according to a rules engine comprises:
extracting equipment address information from the equipment data, and processing the equipment address information based on a preset hash function to obtain a hash value;
when the hash value is detected to be in a preset interval corresponding to any one server, mapping the hash value to the server, and carrying out matching processing on the equipment data according to a rule engine based on the server.
6. The method of claim 1, wherein the sending the report data to the client terminal corresponding to the internet of things device comprises:
filtering the reported data, and writing the filtered reported data into a preset search engine;
creating an index based on the preset search engine for the filtered reported data, and performing a visualization based on a preset visualization platform for the reported data after the index creation;
And sending the visualized report data to a client terminal corresponding to the Internet of things equipment.
7. The method of claim 6, wherein the sending the visualized data to the client terminal corresponding to the internet of things device comprises:
packaging the visualized report data to obtain a report message;
storing the reported message into a message queue, and judging whether a message request sent by a client terminal corresponding to the Internet of things equipment is received or not;
and when the client terminal sends the message request, sending the report message in the message queue to the client terminal.
8. Data processing apparatus based on thing networking device, characterized in that includes:
the data acquisition module is used for acquiring equipment data of the Internet of things equipment based on a preset communication network when at least one Internet of things equipment is detected to be in an offline state;
the data processing module is used for carrying out matching processing on the equipment data according to a rule engine and carrying out business logic processing on a matching result to obtain reporting data corresponding to the equipment data;
And the data uploading module is used for sending the reported data to a client terminal corresponding to the Internet of things equipment.
9. The data processing device based on the Internet of things equipment is characterized by comprising a processor and a memory;
the processor is connected with the memory;
the memory is used for storing executable program codes;
the processor runs a program corresponding to executable program code stored in the memory by reading the executable program code for performing the steps of the method according to any of claims 1-7.
10. A computer readable storage medium having stored thereon a computer program, characterized in that the computer readable storage medium has stored therein instructions which, when run on a computer or a processor, cause the computer or the processor to perform the steps of the method according to any of claims 1-7.
CN202310367204.8A 2023-04-07 2023-04-07 Data processing method and device based on Internet of things equipment Pending CN116614554A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310367204.8A CN116614554A (en) 2023-04-07 2023-04-07 Data processing method and device based on Internet of things equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310367204.8A CN116614554A (en) 2023-04-07 2023-04-07 Data processing method and device based on Internet of things equipment

Publications (1)

Publication Number Publication Date
CN116614554A true CN116614554A (en) 2023-08-18

Family

ID=87673586

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310367204.8A Pending CN116614554A (en) 2023-04-07 2023-04-07 Data processing method and device based on Internet of things equipment

Country Status (1)

Country Link
CN (1) CN116614554A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117056133A (en) * 2023-10-12 2023-11-14 杭州浩联智能科技有限公司 Data backup method, device and medium based on distributed Internet of things architecture

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117056133A (en) * 2023-10-12 2023-11-14 杭州浩联智能科技有限公司 Data backup method, device and medium based on distributed Internet of things architecture
CN117056133B (en) * 2023-10-12 2024-02-06 杭州浩联智能科技有限公司 Data backup method, device and medium based on distributed Internet of things architecture

Similar Documents

Publication Publication Date Title
CN108270618B (en) Alarm determination method, device and alarm system
CN111274095B (en) Log data processing method, device, equipment and computer readable storage medium
CN109271793B (en) Internet of things cloud platform equipment category identification method and system
KR102478464B1 (en) System, apparatuses, and methods of processing and managing web traffic data
CN111176202A (en) Safety management method, device, terminal equipment and medium for industrial control network
CN116614554A (en) Data processing method and device based on Internet of things equipment
CN113760641A (en) Service monitoring method, device, computer system and computer readable storage medium
CN114338188B (en) Intelligent cloud detection system for malicious software based on process behavior sequence segmentation
CN111400189A (en) Code coverage rate monitoring method and device, electronic equipment and storage medium
JP6207451B2 (en) Sensor data collection system
CN111770022B (en) Capacity expansion method, system, equipment and computer storage medium based on link monitoring
CN111157245B (en) Supervision method and system for rail transit running gear bearing
CN112000548A (en) Big data component monitoring method and device and electronic equipment
CN110177024B (en) Monitoring method of hotspot equipment, client, server and system
US10282239B2 (en) Monitoring method
CN115033876A (en) Log processing method, log processing device, computer device and storage medium
CN112636942A (en) Method and device for monitoring service host node
CN110380902B (en) Topological relation generation method and device, electronic equipment and storage medium
CN115022153B (en) Fault root cause analysis method, device, equipment and storage medium
CN109614382B (en) Log segmentation method and device for application
US10693754B2 (en) Method and apparatus for determining resource indicator
KR20210000041A (en) Method and apparatus for analyzing log data in real time
CN115827379A (en) Abnormal process detection method, device, equipment and medium
CN114817482A (en) Method, device and equipment for determining product manufacturing program and storage medium
CN115333966A (en) Nginx log analysis method, system and equipment based on topology

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination