CN111565218B - Data processing method and electronic equipment - Google Patents

Data processing method and electronic equipment Download PDF

Info

Publication number
CN111565218B
CN111565218B CN202010277713.8A CN202010277713A CN111565218B CN 111565218 B CN111565218 B CN 111565218B CN 202010277713 A CN202010277713 A CN 202010277713A CN 111565218 B CN111565218 B CN 111565218B
Authority
CN
China
Prior art keywords
internet
things
data
edge gateway
equipment
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.)
Active
Application number
CN202010277713.8A
Other languages
Chinese (zh)
Other versions
CN111565218A (en
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.)
Shenzhen Shuliantianxia Intelligent Technology Co Ltd
Original Assignee
Shenzhen Shuliantianxia 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 Shenzhen Shuliantianxia Intelligent Technology Co Ltd filed Critical Shenzhen Shuliantianxia Intelligent Technology Co Ltd
Priority to CN202010277713.8A priority Critical patent/CN111565218B/en
Publication of CN111565218A publication Critical patent/CN111565218A/en
Application granted granted Critical
Publication of CN111565218B publication Critical patent/CN111565218B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • 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/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • 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/565Conversion or adaptation of application format or content
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Abstract

The invention relates to the technical field of Internet of things, in particular to a data processing method and electronic equipment. The method is applied to an edge gateway and comprises the following steps: receiving a connection request sent by the Internet of things equipment, and connecting the Internet of things equipment according to the connection request, wherein the connection request is triggered after the Internet of things equipment receives a network switching command sent by an Internet of things cloud platform after passing the authentication of the Internet of things cloud platform; receiving a data access request sent by the Internet of things equipment; if the internet of things equipment is determined to meet the preset access requirement according to the data access request, sending an access authentication success indication to the internet of things equipment, wherein the fact that the internet of things equipment meets the access requirement comprises the following steps: the Internet of things equipment is equipment which is supported by the edge gateway to be accessed, and the Internet of things equipment and the edge gateway correspond to the same registered user; and receiving the service data sent by the equipment of the Internet of things, and processing the service data. The invention reduces the network time delay and improves the data transmission efficiency.

Description

Data processing method and electronic equipment
[ technical field ] A method for producing a semiconductor device
The invention relates to the technical field of Internet of things, in particular to a data processing method and electronic equipment.
[ background of the invention ]
With the advent of the internet of things era, more and more industries are improving efficiency by means of the power of the internet of things, and great potential of industrial innovation is released.
However, as more and more users join the internet, various devices are connected to the cloud, so that the server needs to calculate and analyze a large amount of data, especially when network delay occurs, the request of the user becomes slower, and related data cannot be presented to the user in time, so that the experience of the user is affected.
[ summary of the invention ]
The invention aims to provide a data processing method and electronic equipment to reduce system response time delay and improve system response speed.
One aspect of the embodiments of the present invention provides a data processing method, which is applied to an edge gateway, where the edge gateway is in communication connection with an internet of things cloud platform, and the method includes:
receiving a connection request sent by Internet of things equipment, and connecting the Internet of things equipment according to the connection request, wherein the connection request is triggered after the Internet of things equipment receives a network switching command sent by an Internet of things cloud platform after passing the authentication of the Internet of things cloud platform;
receiving a data access request sent by the Internet of things equipment;
if the Internet of things equipment is determined to meet the preset access requirement according to the data access request, sending an access authentication success indication to the Internet of things equipment, wherein the condition that the Internet of things equipment meets the access requirement comprises the following steps: the Internet of things equipment is equipment which supports access by the edge gateway, and the Internet of things equipment and the edge gateway both correspond to the same registered user;
and receiving the service data sent by the equipment of the Internet of things, and processing the service data.
Optionally, the connection request includes identification information of the internet of things device;
before receiving the data access request sent by the internet of things device, the method further includes:
and associating the identification information with an equipment channel so as to communicate with the Internet of things equipment through the equipment channel.
Optionally, the receiving the service data sent by the internet of things device and performing data processing on the service data includes:
receiving a service message which is sent by the Internet of things equipment and has a format corresponding to a preset communication protocol, wherein the service message comprises a protocol header of the preset communication protocol, a data area containing service data and a protocol check bit, and the protocol header comprises the length of the data area and an analysis identifier for indicating an analysis mode;
extracting the service data from the service message according to the length of the data area, and checking the extracted service data according to the protocol check bit;
under the condition that the extracted service data is verified to pass, converting the extracted service data into service data in a preset data format according to the analysis identifier;
and performing service calculation on the service data in the preset data format obtained by conversion to obtain a data processing result.
Optionally, the method further comprises: and displaying the data processing result to a user.
Optionally, the protocol header further includes a version number of the preset communication protocol;
the method further comprises the following steps:
associating the version number with the Internet of things equipment;
the converting the extracted service data into service data in a preset data format according to the analysis identifier includes:
and selecting an analysis template corresponding to the version number according to the analysis identifier, and converting the extracted service data into service data in a preset data format.
Optionally, the method further comprises:
and sending the service data and the data processing result of the service data to the Internet of things cloud platform so as to synchronize the data of the Internet of things cloud platform.
In another aspect of the embodiments of the present invention, a data processing method is provided, which is applied to an internet of things device, and the method includes:
after the IOT equipment passes authentication of an IOT cloud platform, receiving a network switching command sent by the IOT cloud platform, wherein the network switching command comprises edge gateway information;
sending a connection request to an edge gateway corresponding to the edge gateway information according to the network switching command so as to enable the Internet of things equipment to be connected with the edge gateway;
sending a data access request to the edge gateway so that the edge gateway judges whether the internet of things equipment meets a preset access requirement, wherein the internet of things equipment meeting the access requirement comprises the following steps: the Internet of things equipment is equipment which supports access by the edge gateway, and the Internet of things equipment and the edge gateway both correspond to the same registered user;
and after receiving an access authentication success indication sent by the edge gateway, sending service data to the edge gateway so that the edge gateway performs data processing on the service data.
Optionally, the sending the service data to the edge gateway to enable the edge gateway to perform data processing on the service data includes:
sending a service message in a format corresponding to a preset communication protocol to the edge gateway, where the service message includes a protocol header of the preset communication protocol, a data area containing service data, and a protocol check bit, the protocol header includes a length of the data area and an analysis identifier for indicating an analysis manner, the length of the data area is used by the edge gateway to extract the service data from the service message, the protocol check bit is used by the edge gateway to check the extracted service data, and the analysis identifier is used by the edge gateway to convert the extracted service data into service data in a preset data format, so as to perform service calculation on the converted service data in the preset data format, thereby obtaining a data processing result.
Optionally, before receiving the network switching command sent by the internet of things cloud platform, the method further includes:
receiving connection information of an Internet of things cloud platform sent by terminal equipment, wherein the connection information comprises authentication information of the Internet of things cloud platform;
sending an authentication message to the Internet of things cloud platform according to the connection information of the Internet of things cloud platform, wherein the authentication message comprises authentication information of the Internet of things cloud platform and identification information of the Internet of things equipment;
and receiving an authentication passing message sent by the Internet of things cloud platform, wherein the authentication passing message is sent after the Internet of things cloud platform determines that the Internet of things equipment passes authentication according to the authentication information and associates the identification information of the Internet of things equipment with the user registration identification corresponding to the terminal equipment.
In another aspect of the embodiments of the present invention, an electronic device is provided, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the data processing method as described above.
Different from the prior art, the data processing method and the electronic device provided by the embodiment of the invention have the advantages that the internet of things device and the edge gateway are in communication connection, so that the internet of things device and the edge gateway are in the same local area network, the service data acquired by the internet of things device can be directly subjected to edge calculation at the edge gateway to obtain a calculation result, and the calculation result can be fed back to a user through the edge gateway. Therefore, the data processing method and the electronic device provided by the embodiment of the invention reduce network time delay, improve data transmission efficiency, enable a user to be fed back in time and improve user experience.
[ description of the drawings ]
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to scale unless otherwise specified.
Fig. 1 is a schematic structural diagram of an internet of things data processing system according to an embodiment of the present invention;
FIG. 2 is an architectural diagram of the convergence layer provided by embodiments of the present invention;
FIG. 3 is a flow chart of a data processing method according to an embodiment of the present invention;
fig. 4 is a flowchart of a method for receiving service data sent by the internet of things device and processing the service data according to the embodiment of the present invention;
FIG. 5 is a flow chart of a data processing method according to another embodiment of the present invention;
FIG. 6 is an interaction diagram of a data processing method according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present invention.
[ detailed description ] embodiments
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It should be noted that, if not conflicted, the various features of the embodiments of the invention may be combined with each other within the scope of protection of the invention. Additionally, while functional block divisions are performed in the device diagrams, with logical sequences shown in the flowcharts, in some cases, the steps shown or described may be performed in a different order than the block divisions in the device diagrams, or the flowcharts.
The data processing method provided by the embodiment of the invention is mainly based on the traditional layered architecture of the Internet of things, a convergence layer is additionally arranged between an equipment sensing layer and a network layer, the convergence layer adopts an edge gateway, analyzes and processes data acquired from the equipment sensing layer based on an edge computing technology, and timely feeds back a data processing result to a user, wherein the convergence layer and the equipment sensing layer are positioned in the same local area network. The data processing pressure of the platform layer can be relieved through the convergence layer, the broadband cost of the platform layer is reduced, in addition, the network delay can be reduced, the dependence on the network is reduced, and the advantages of fast response data and the like are achieved.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a data processing system of the internet of things according to an embodiment of the present invention, and as shown in fig. 1, the system 100 includes a device awareness layer 101, a convergence layer 102, a network layer 103, a platform layer 104, and an application layer 105. The device perception layer 101 comprises a plurality of internet of things devices, the convergence layer 102 comprises edge gateways, the edge gateways are carriers for realizing edge calculation and can run edge gateway programs, and the carriers comprise other devices with calculation capacity, such as a PC (personal computer) computer, an industrial personal computer, a mini computer and an internet of things gateway box. The network layer 103 includes various network devices, which may be routers or the like. The platform layer 104 is an internet of things cloud platform, the internet of things cloud platform can be composed of servers, the servers can be a physical server or a logic server formed by a plurality of physical servers in a virtual mode, the servers can also be a server cluster formed by a plurality of interconnected communication servers, and each functional module can be respectively distributed on each server in the server cluster. The application layer 105 includes a number of clients through which a user may remotely access the internet of things cloud platform.
In this embodiment, the system 100 collects service data through the device awareness layer 101, analyzes the service data through the edge gateway in the convergence layer 102, performs pre-calculation on the service data, makes a real-time response, and backs up local data to the platform layer 104 when the edge gateway is idle, so as to provide remote access to a user of the application layer 105. The platform layer 104 serves as a processing core of the system 100, and is responsible for analyzing device data, managing a data channel of an edge gateway, analyzing and calculating data, and the like. The convergence layer 102 and the device sensing layer 101 are in the same local area network, and nearby service data collected by the internet of things device is calculated to share the calculation pressure of the platform layer 104.
Specifically, the internet of things devices in the device sensing layer 101 may specifically be smart home devices, such as an air conditioner box, a smart band, a sleep monitor, a wearable hearing aid, and the like. All internet of things devices constitute the device sensing layer 101. Each internet of things device is used for collecting service data, for example, the service data includes the temperature and the operation mode of an air conditioner, heartbeat data of a user, sleep time of the user, and the like.
When accessing the device awareness layer 101, the internet of things device may be networked first, and then perform security authentication and associated user registration to the platform layer 104 through the convergence layer 102 and the network layer 103. The Internet of things equipment needs to acquire network capacity through a distribution network access router. Some thing networking devices (such as air conditioner box, intelligent bracelet etc.) do not have the input peripheral hardware, can realize joining in marriage the net through third party APP to this type of equipment, can adopt smartconfig or AP mode to realize joining in marriage the net specifically. The smart tconfig realizes the distribution network specifically that the internet of things equipment monitors all messages in the network in a promiscuous mode; the third party APP encodes the SSID and the password into the UDP message and sends the UDP message through a broadcast packet or a multicast packet; and the Internet of things equipment receives the broadcast packet or the multicast packet to obtain a UDP message, decodes the UDP message to obtain a correct SSID and a correct password, and then actively connects the route of the specified SSID to access the network. The AP mode realizes that the network is specifically distributed, and the thing networking device is in the AP mode, runs the intelligent terminal of third party APP is the station mode, and intelligent terminal connects constitute local area network behind the AP of thing networking device, this intelligent terminal send need connect the SSID and the password of route extremely thing networking device to make this thing networking device initiative go to connect appointed route, join in marriage the network in order to accomplish. The third-party APP is a preset application program and runs on the intelligent terminal.
The operation of the network distribution of the Internet of things equipment can be performed when the Internet of things equipment is firstly accessed into the local area network, and the networking is not required to be repeated after the Internet of things equipment is networked. When new internet of things equipment is added into the equipment sensing layer 101, the method can be also adopted to network the newly added internet of things equipment.
After the internet of things device is networked, an authentication command can be sent to the platform layer 104, so that the internet of things cloud platform corresponding to the platform layer 104 associates the internet of things device with the registered user.
It is worth to be noted that the internet of things device and the edge gateway are located in the same local area network after being networked, and the internet of things device and the edge gateway are successfully authenticated on the internet of things cloud platform and are associated with the registered user of the internet of things cloud platform.
After the Internet of things equipment is networked and associated with the registered user, the Internet of things equipment is also used for realizing the communication between the edge gateway and each piece of Internet of things equipment by connecting the edge gateway. When the internet of things equipment is connected with the edge gateway, the edge gateway generally sends a broadcast packet, and the internet of things equipment is connected with the edge gateway according to the broadcast packet. However, when there are many internet of things devices, there are different IP network segment problems, so that the broadcast communication scheme in the local area network cannot be used, and therefore, in some embodiments, the connection between the internet of things device and the edge gateway may be implemented through the third party APP. Specifically, the third party APP acquires edge gateway information from the Internet of things cloud platform, and sends a network switching command request to the Internet of things cloud platform according to the acquired edge gateway information; the Internet of things cloud platform sends a network switching command to the Internet of things equipment according to the network switching command request, and the Internet of things equipment receiving the network switching command is connected to the edge gateway corresponding to the network switching command request.
The internet of things equipment which establishes communication connection with the edge gateway can comprise one or more than one piece of internet of things equipment, the number of the edge gateways can also be one or more than one piece of internet of things equipment, one edge gateway corresponds to one or more than one piece of internet of things equipment, and the internet of things equipment which is connected with the same edge gateway is accessed into the same local area network.
It can be understood that the edge gateway has a network capability, and can be used as a server to support various internet of things devices to access in a client form.
Therefore, in some embodiments, after the edge gateway establishes a connection with each piece of internet of things equipment, the edge gateway is further configured to receive an authentication command sent by the piece of internet of things equipment, and verify the validity of the piece of internet of things equipment according to the authentication command, so as to implement service data communication with the piece of internet of things equipment.
The Internet of things equipment connected with the edge gateway needs to complete authentication on the Internet of things cloud platform, and the Internet of things equipment after authentication can obtain the IP and the port of the edge gateway to be connected. And the Internet of things equipment is connected with the edge gateway according to the IP and the port. After the internet of things equipment is successfully connected with the edge gateway, the internet of things equipment sends an authentication command to the edge gateway to determine whether the internet of things equipment meets a preset access requirement, if so, the edge gateway sends an access authentication success indication to the internet of things equipment, and therefore the internet of things equipment can be in service data communication with the edge gateway. Wherein the preset access requirement comprises: the Internet of things equipment is the equipment which supports access by the edge gateway, and the Internet of things equipment and the edge gateway both correspond to the same registered user.
The internet of things equipment is the equipment which the edge gateway supports access, namely the internet of things equipment is accessed to the internet of things cloud platform to be authenticated and authenticated, and only the internet of things equipment which passes the authentication and authentication can be accessed to the edge gateway. And the authentication needs the matching of the Internet of things cloud platform. Specifically, for example, after the internet of things device comes online, the internet of things device may be associated with a specific user on the internet of things cloud platform, then the internet of things cloud platform pushes data of the internet of things device to an edge gateway below the user, the edge gateway locally may synchronize the data of the internet of things device with the internet of things cloud platform in real time, and finally, the edge gateway determines whether the internet of things device can access the edge gateway according to local internet of things device data, wherein when the internet of things device data meets the requirement of the edge gateway, the internet of things device may access the edge gateway.
The fact that the Internet of things equipment and the edge gateway correspond to the same registered user means that the Internet of things equipment and the edge gateway are associated with the same registered user on the Internet of things cloud platform.
In this embodiment, the identity of the internet of things device accessing the edge gateway is verified through the two conditions, so that the security of the edge gateway and the accessed data is improved, and malicious devices are prevented from accessing the edge gateway. In addition, the accessed Internet of things equipment and the edge gateway correspond to the same registered user, so that the management of the Internet of things cloud platform on the user and the equipment is facilitated.
In some embodiments, before the edge gateway verifies the validity of the internet of things device, the edge gateway is further configured to establish a communication channel with the internet of things device according to a connection request sent by the internet of things device. After the Internet of things equipment has network capacity, sending a connection request to the edge gateway to connect the edge gateway, wherein the connection request is triggered after the Internet of things equipment receives a network switching command sent by the Internet of things cloud platform after passing through the authentication of the Internet of things cloud platform. In this embodiment, the connection request includes identification information of the internet of things device, and the establishing, by the edge gateway, the communication channel with the internet of things device according to the connection request sent by the internet of things device includes: and the edge gateway associates the identification information with an equipment channel so as to communicate with the Internet of things equipment through the equipment channel. The edge gateway is provided with at least one equipment channel, and the edge gateway can associate the identification information of the Internet of things equipment with the equipment channel, so that the edge gateway communicates with the corresponding Internet of things equipment through the equipment channel. The identification information is the only identification registered by the Internet of things equipment on the Internet of things cloud platform. The identification information and the device channel may be in a one-to-one or many-to-one relationship, that is, one identification information corresponds to one device channel, or a plurality of identification information corresponds to one device channel. The edge gateway can issue an instruction to the internet of things device according to the device channel. The edge gateway may control the opening and closing of the device channel. The corresponding relationship between the device channel and the identification information may be stored locally or on an internet of things cloud platform, and a user may manage the corresponding relationship between the device channel and the identification information.
When the internet of things equipment is the equipment which can be accessed by data and passes the verification of the edge gateway, the internet of things equipment and the edge gateway can carry out data transmission through the equipment channel. The internet of things equipment can transmit data to the edge gateway, and the edge gateway can also send commands to the internet of things equipment.
Specifically, the edge gateway is configured to receive service data sent by the internet of things device, and perform data processing on the service data. The receiving the service data sent by the internet of things equipment and the data processing of the service data comprise:
receiving a service message which is sent by the Internet of things equipment and has a format corresponding to a preset communication protocol, wherein the service message comprises a protocol header of the preset communication protocol, a data area containing service data and a protocol check bit, and the protocol header comprises the length of the data area and an analysis identifier for indicating an analysis mode;
extracting the service data from the service message according to the length of the data area, and checking the extracted service data according to the protocol check bit;
under the condition that the extracted service data is verified to pass, converting the extracted service data into service data in a preset data format according to the analysis identifier;
and performing service calculation on the service data in the preset data format obtained by conversion to obtain a data processing result.
The protocol header is mainly used for adding some common information, for example, the common information is used for indicating what protocol the current protocol is. Part of information of the protocol header can be used for checking the legality of the protocol and identifying the Internet of things equipment for sending the data packet. In addition, the sticky packet phenomenon in the process of transmitting the TCP transmission content can be solved by utilizing the information of the protocol header, wherein the sticky packet phenomenon refers to that a plurality of packet data sent by a sender are pasted into one packet when being received by a receiver, and the header of the next packet data is next to the tail of the previous packet data from the view point of a receiving buffer area. The common ways to solve the TCP packet sticking phenomenon include two approaches, the first is to format the data, i.e. each piece of data has a fixed format (start and end); the second type is the transmission length, that is, the length of each piece of data is transmitted together when each piece of data is transmitted, for example, the first 4 bits of each piece of data can be selected as the length of the data, and the start and the end of each piece of data can be judged according to the length when the application layer processes. Then, the resolution of the TCP sticky packet phenomenon using the information of the protocol header may be to define a start symbol and an end symbol of each piece of data in the protocol header, or to define a length of each piece of data, so that the TCP sticky packet phenomenon can be resolved according to the information defined by the protocol header. The data area is used for storing data to be transmitted, the data area can be json format data inside the data area, and can also be byte data generated by an XML definition template, wherein the json format is a light-weight data exchange format, and the json format data can be suitable for equipment with high computing capacity. The XML definition template generates byte data, that is, data in an XML format, which is a plain text format and is suitable for devices with weak computing power. The protocol check bit is mainly used for detecting a content error problem occurring in the network transmission process, and the content error problem can cause abnormal operation of the edge gateway.
In this embodiment, the protocol header includes a length of the data area and a resolution flag indicating a resolution mode. The length of the data area is used for indicating the length of the service data stored in the data area, and the analysis identifier is used for indicating the data format of the service data stored in the data area.
The extracting the service data from the service message according to the length of the data area is that: and extracting service data with a preset length from the service message, wherein the preset length is stored in the protocol header.
The service data extracted according to the protocol check bit check is that: and checking whether the extracted service data is complete or not through the protocol check bit, whether errors occur in the network transmission process or not and the like. Therefore, abnormal operation of the edge gateway caused by content errors can be avoided, and the stability of the equipment is improved. The content of the protocol check bit may specifically be a CRC code generated according to the content of the protocol header and the data area, and the service data is checked by the CRC code. In other embodiments, hamming codes may be used in place of CRC codes, which may check for errors but not correct them, and when device protocol data changes during transmission, hamming codes may be used to know where protocol errors are and correct the erroneous bits.
The step of converting the extracted service data into service data in a preset data format according to the analysis identifier is that: and converting the extracted service data into service data in a preset data format according to the data format of the service data indicated by the analysis identifier. For example, the analysis identifier indicates that the service data in the data area is in a json format, and at this time, the edge gateway directly converts the extracted service data into json data according to the analysis identifier; for another example, the parsing identifier indicates that the service data in the data area is in an XML format, and at this time, the edge gateway selects a predefined template (e.g., an XML template) to parse and extract the obtained service data, and then generates corresponding json data from the parsed service data.
In some embodiments, the protocol header further includes a version number of the preset communication protocol. Wherein the version number corresponds to one or more parsing templates (such as multiple XML templates) for parsing or encapsulating the service data in the data area. Wherein, the converting the extracted service data into service data in a preset data format according to the analysis identifier further comprises: and selecting an analysis template corresponding to the version number according to the analysis identifier, and converting the extracted service data into service data in a preset data format.
For example, the parsing flag indicates that the service data in the data area is in an XML format, and it is known that the edge gateway prestores multiple XML templates, where the content and the content length of the data area respectively defined by the multiple XML templates have a certain difference. And selecting the parsing template corresponding to the version number according to the parsing identifier, namely selecting one or more XML templates corresponding to the version number from the plurality of XML templates. And finally, analyzing and converting the extracted service data according to the selected XML template. The method comprises the steps that an xstream. In this embodiment, the service data is parsed by using the XML template, so that some internet of things devices with poor computing capabilities can be supported to access the edge gateway.
The edge gateway is further configured to associate the version number with the internet of things device. Therefore, the analysis template corresponding to the Internet of things equipment can be obtained according to the version number. When the internet of things equipment sends a service message to the edge gateway based on the format corresponding to the preset communication protocol each time, the version number of the preset communication protocol can be carried in the protocol header corresponding to the format, the edge gateway associates the version number with the internet of things equipment, and when the edge gateway communicates with the internet of things equipment, a corresponding analysis template can be selected according to the version number, so that the edge gateway can package a issued instruction based on the analysis template or analyze a received instruction.
The service message is transmitted through the format corresponding to the preset communication protocol, so that on one hand, the abnormal data can be intervened and processed in time; on the other hand, the method can support the Internet of things equipment with poor computing capability to access the edge gateway; finally, security and flexibility are higher.
The edge gateway may also feed back a processing result of the data to the user, for example, provide the running state of the internet of things device (for example, whether the device is online or offline or has a fault, etc.) for the user, the service data acquired by the internet of things device (for example, the current heart rate and body movement of the user, whether the user is lying in bed, etc.), and data alarm information (for example, if the heart rate of a certain user exceeds a set alarm value, the data is synchronized to a relevant worker in time to alarm), etc.
Further, the edge gateway can synchronize the obtained data to the internet of things cloud platform. The edge gateway may store the service data and the processing result of the service data locally, and may sequentially store data according to the type of the internet of things device and the timestamp corresponding to the service data. When the edge gateway network is unobstructed, locally stored data are synchronized to the internet of things cloud platform, the internet of things cloud platform can perform offline calculation based on the received data, for example, a user sleep quality report can be generated according to the received user sleep data, and the user quality report can be pushed to a user.
In this embodiment, the edge gateway is mainly used for edge computing to compute data collected by the internet of things device nearby. The data of the internal equipment of the edge gateway can be synchronous with the data of the Internet of things cloud platform, and when one edge gateway is abnormal, the data collected by the Internet of things cloud platform and the Internet of things equipment can be continuously used for calculation. When the data of the edge gateway and the data of the internet of things cloud platform are synchronized, two strategies can be adopted, the first strategy is to directly burn data which are not changed frequently (such as a protocol template of factory equipment of a company) into edge gateway software when the internet of things equipment leaves a factory, therefore, the edge gateway is not required to obtain the data through a network, the dependence of the edge gateway on the network is reduced, and the processing speed is accelerated. The second is for data which is not burned into the edge gateway, the data cannot be known before leaving the factory, and the data can be obtained by the edge gateway according to an active pull strategy. The edge gateway may obtain related data based on the two manners, when the obtained data needs to be updated, the internet of things cloud platform may notify the edge gateway of updating the data based on a TCP protocol, and the data to be updated may be downloaded by the edge gateway from the internet of things cloud platform through the network layer 103.
In summary, the edge gateway may be connected to an internet of things device, perform security authentication on the accessed internet of things device, obtain service data from the internet of things device connected to the edge gateway, perform data calculation on the service data, and display a result of the data calculation to a user. When the edge gateway is configured, internal data of the edge gateway can be synchronized with an internet of things cloud platform; in data transmission, data can be transmitted based on a preset protocol format, the protocol is parsed in the form of an XML template, and supported protocols can be managed and updated.
In some embodiments, the edge gateway may implement the functions described in the foregoing embodiments through a device access module, a data buffering module, a service processing module, and a service presentation module running thereon, and specifically, as shown in fig. 2, is an architectural design of the convergence layer. The equipment access module, the data buffer module, the service processing module and the service display module realize the connection and data access of the Internet of things equipment, the calculation of data transmitted by the Internet of things equipment and the display of data calculation results based on the architecture. The equipment access module is used for receiving the service data and converting the service data into a preset data format according to a communication protocol of transmission data; the data buffer module is used for caching the service data converted into the preset data format; the business processing module is used for analyzing and processing the business data converted into the preset data format to generate display data; and the service display module is used for feeding back the display data to the user.
The device access module can convert the service data into json format. The data buffer module can buffer high concurrent flow data besides the service data converted into the preset data format. The display data generated by the service processing module may be specifically graphical data, such as a user sleep condition analysis table, which includes sleep time, movement times, whether snoring occurs, and the like of the user. The service display module may obtain the display data from the service processing module based on an http protocol, and display the display data to a user. The service display module can also provide an APP or WEB access interface based on an http protocol so that a user can access data at any time and know the relevant conditions of the monitored user.
The device access module further comprises at least one device channel, and the edge gateway is further configured to acquire identification information registered by the internet of things device on the platform layer, associate the identification information with the device channel, and enable the edge gateway to communicate with the internet of things device corresponding to the identification information according to the associated device channel. The edge gateway serves as an edge node, the Internet of things equipment can transparently transmit data through the edge gateway, the edge gateway can also judge whether the Internet of things equipment has the capacity of executing specific services according to the data, and if yes, the edge gateway can establish special connection with the Internet of things equipment. Therefore, the internet of things equipment and the edge gateway can be associated through the equipment channel and the identification information, and when the edge gateway needs to drive the internet of things equipment, the corresponding internet of things equipment can be found according to the equipment channel and the identification information. A graph (such as a mapping table) may be established to associate the unique identifier of the internet of things device with the device channels, and when one or more of the device channels are closed, the corresponding device channel may be removed from the graph.
In the embodiment of the present invention, the service data may specifically be user health data, and the user health data is used to indicate a health state of a user, such as a heart rate, a blood pressure, a blood sugar, a sleep quality, a weight, and the like. The internet of things data processing system 100 can be specifically applied to the endowment service industry, the internet of things data processing system 100 can be established for a nursing home or an endowment home, a local area network is established in the nursing home or the endowment home, an edge gateway is established, various intelligent home devices in the nursing home or the endowment home can be connected to the local area network, data collected by the intelligent home devices are calculated through the edge gateway, and responses are made in time. Meanwhile, the Internet of things cloud platform can analyze and calculate data collected by the intelligent household equipment and provide reference opinions for the health condition of the old.
The embodiment of the invention provides an Internet of things data processing system which comprises an equipment sensing layer, a convergence layer, a network layer and a platform layer, wherein the equipment sensing layer and the convergence layer are positioned in the same local area network, the equipment sensing layer comprises a plurality of Internet of things equipment, the Internet of things equipment is used for collecting service data, the convergence layer comprises an edge gateway, the edge gateway is in communication connection with the Internet of things equipment and is used for analyzing and processing the service data and directly feeding back a result obtained by processing the service data to a user, the network layer is in communication connection with the edge gateway and is used for transmitting the processed service data to the platform layer, and the platform layer receives the processed service data and synchronously stores the processed service data. The data processing system of the internet of things provided by the embodiment of the invention processes the data through the convergence layer and feeds the data back to the user in time, and the convergence layer and the equipment sensing layer are in the same local area network, so that the network delay is reduced, the data transmission efficiency is improved, the user can obtain feedback in time, and the user experience is improved.
Based on the internet of things data processing system, the following embodiments provide a data processing method, which is applied to the edge gateway located in the convergence layer, where the edge gateway is in communication connection with the internet of things cloud platform, as shown in fig. 3, and the method includes:
s21, receiving a connection request sent by the Internet of things equipment, and connecting the Internet of things equipment according to the connection request, wherein the connection request is triggered after the Internet of things equipment receives a network switching command sent by the Internet of things cloud platform after passing through the authentication of the Internet of things cloud platform.
The connection request is a request of the internet of things equipment for establishing communication connection with the edge gateway. And the Internet of things equipment needs to complete the networking and authentication of the Internet of things equipment before sending the connection request. The internet of things equipment needs to be accessed into the router through a distribution network to obtain network capacity, and for the internet of things equipment without input peripheral (such as an air conditioner box and the like), the distribution network needs to be realized by means of an external terminal in a smartconfig or ap mode. The smart tconfig realizes the distribution network specifically that the internet of things equipment monitors all messages in the network in a promiscuous mode; the third party APP on the terminal equipment encodes the SSID and the password into the UDP message and sends the UDP message through a broadcast packet or a multicast packet; and the Internet of things equipment receives the broadcast packet or the multicast packet to obtain a UDP message, decodes the UDP message to obtain a correct SSID and a correct password, and then actively connects the route of the specified SSID to access the network. The AP mode realizes that the network is distributed, the Internet of things equipment is in an AP mode and operates the terminal equipment is in a station mode, the terminal equipment is connected with a local area network formed behind the AP of the Internet of things equipment, the terminal equipment sends an SSID (service set identifier) and a password which need to be connected with a route to the Internet of things equipment, so that the Internet of things equipment is actively connected with an appointed route to complete the network distribution. The third party APP is a preset application program, which runs on the terminal device, and the terminal device is an external device, which may be a mobile phone, a tablet computer, a notebook computer, and the like of a user.
In this embodiment, the process of networking and authenticating the internet of things device includes: the method comprises the steps that the Internet of things equipment receives connection information of an Internet of things cloud platform sent by terminal equipment, wherein the connection information comprises authentication information of the Internet of things cloud platform; the Internet of things equipment sends an authentication message to the Internet of things cloud platform according to the connection information of the Internet of things cloud platform, wherein the authentication message comprises authentication information of the Internet of things cloud platform and identification information of the Internet of things equipment; the Internet of things equipment receives an authentication passing message sent by the Internet of things cloud platform, wherein the authentication passing message is generated after the Internet of things cloud platform determines that the Internet of things equipment passes authentication according to the authentication information and associates the identification information of the Internet of things equipment with the user registration identification corresponding to the terminal equipment. The terminal device can send connection information of the cloud platform of the internet of things to the device of the internet of things through a third party APP, wherein the connection information specifically can be a Service Set Identifier (SSID) and a password key, and the password key is authentication information of the cloud platform of the internet of things. The identification information of the internet of things device is used for uniquely identifying the internet of things device, and may be a device serial number, for example. And the Internet of things cloud platform authenticates the Internet of things equipment according to the authentication information and the identification information of the Internet of things equipment, and when the authentication information sent by the Internet of things equipment is the same as the authentication information of the Internet of things cloud platform, the Internet of things equipment passes the authentication. After the Internet of things equipment passes the authentication, the Internet of things cloud platform associates the identification information of the Internet of things equipment with the user registration identification corresponding to the Internet of things equipment, so that the Internet of things equipment associates users.
After the internet of things equipment passes the authentication, I P and a port of the edge gateway can be obtained from the internet of things cloud platform, and the internet of things equipment accesses the edge gateway according to the I P and the port.
It should be noted that the edge gateway may also perform authentication on the internet of things cloud platform by using the above manner, and associate the user registered on the internet of things cloud platform.
After the internet of things equipment is networked and authentication is completed, the internet of things cloud platform can send a network switching command to the internet of things equipment, and the internet of things equipment receives the network switching command and then sends a connection request to an edge gateway corresponding to the network switching command. The internet of things cloud platform can actively send a network switching command to the internet of things equipment according to a command set by the internet of things cloud platform, and the internet of things cloud platform can also trigger the network switching command after receiving a message sent by the terminal equipment, wherein the terminal equipment is external equipment and can obtain edge gateway information to be connected of the internet of things equipment, and the network switching command can be actively triggered by a user.
In some embodiments, the connection request sent by the internet of things device includes identification information of the internet of things device, the edge gateway is provided with at least one device channel, and the edge gateway can associate the identification information of the internet of things device with the device channel, so that the edge gateway communicates with the corresponding internet of things device through the device channel. The identification information is the only identification of the Internet of things equipment registered on the Internet of things cloud platform. The identification information and the device channel may be in a one-to-one or many-to-one relationship, that is, one identification information corresponds to one device channel, or a plurality of identification information corresponds to one device channel. The edge gateway can issue an instruction to the internet of things device according to the device channel. The edge gateway may control the opening and closing of the device channel. The corresponding relationship between the device channel and the identification information may be stored locally or on an internet of things cloud platform, and a user may manage the corresponding relationship between the device channel and the identification information.
And S22, receiving a data access request sent by the Internet of things equipment.
The data access request is a request of the internet of things equipment for sending service data to the edge gateway. Wherein the data access request may be received through the device channel.
S23, if the Internet of things equipment is determined to meet the preset access requirement according to the data access request, sending an access authentication success indication to the Internet of things equipment, wherein the fact that the Internet of things equipment meets the access requirement comprises the following steps: the Internet of things equipment is the equipment which supports access by the edge gateway, and the Internet of things equipment and the edge gateway both correspond to the same registered user.
It can be appreciated that the edge gateway has network capabilities that can serve as a server to support access by various internet of things devices in the form of clients. Therefore, in order to improve the security of the device, the validity of the accessed internet of things device needs to be detected, and only the internet of things device meeting the requirement can send service data to the edge gateway.
The internet of things equipment is the equipment which the edge gateway supports access, namely the internet of things equipment is accessed to the internet of things cloud platform to be authenticated and authenticated, and the internet of things equipment which passes the authentication and authentication can be accessed to the edge gateway. The authentication needs the matching of the internet of things cloud platform, specifically, after the internet of things equipment is on line, the internet of things equipment is associated with a specific user on the internet of things cloud platform, then the internet of things cloud platform pushes data of the internet of things equipment to an edge gateway below the user, the edge gateway locally synchronizes the data of the internet of things equipment with the internet of things cloud platform in real time, and finally, the edge gateway judges whether the internet of things equipment can be accessed into the edge gateway according to local internet of things equipment data.
In some other embodiments, determining whether the internet of things device is a device that the edge gateway supports access may further include: the method comprises the steps that information (such as identification information of the Internet of things equipment) is sent to the Internet of things cloud platform, the Internet of things cloud platform encrypts the information and returns a secret key to the Internet of things equipment, the Internet of things equipment sends the secret key to an edge gateway, the edge gateway decrypts the secret key through a preset algorithm, if the decrypted secret key meets the requirement, the Internet of things equipment is represented as equipment supporting access, and if not, the Internet of things equipment is not the equipment supporting access.
The fact that the Internet of things equipment and the edge gateway correspond to the same registered user means that the Internet of things equipment and the edge gateway are associated with the same registered user on the Internet of things cloud platform. For example, the registered user is a certain nursing home, and the internet of things device and the edge gateway are all internet of things devices and all edge gateways under the nursing home. One registered user may correspond to one or more edge gateways, and one edge gateway may correspond to one or more internet of things devices.
In this embodiment, the identity of the internet of things device accessing the edge gateway is verified through the two conditions, so that the security of the edge gateway and the accessed data is improved, and malicious devices are prevented from accessing the edge gateway. In addition, the accessed Internet of things equipment and the edge gateway correspond to the same registered user, so that the management of the Internet of things cloud platform on the user and the equipment is facilitated.
And S24, receiving the service data sent by the Internet of things equipment, and performing data processing on the service data.
The business data is all data related to the current business, for example, the current business is intelligent endowment, and the business data includes physical health data (such as heart rate, blood pressure, blood sugar, sleep data (including sleep time, body movement, snoring, etc.)) of the old. The business data also comprises data of equipment for detecting the body health data of the old people, such as operation state data of the equipment (including whether the equipment is on-line or off-line or has faults and the like), power utilization data of the equipment and the like.
In this embodiment, after obtaining the service data, the edge gateway performs data processing on the service data, and specifically, as shown in fig. 4, the receiving the service data sent by the internet of things device and performing data processing on the service data includes:
s241, receiving a service message which is sent by the Internet of things equipment and has a format corresponding to a preset communication protocol, wherein the service message comprises a protocol header of the preset communication protocol, a data area containing service data and a protocol check bit, and the protocol header comprises the length of the data area and an analysis identifier for indicating an analysis mode;
s242, extracting the service data from the service message according to the length of the data area, and checking the extracted service data according to the protocol check bit;
s243, under the condition that the extracted service data passes the verification, converting the extracted service data into service data in a preset data format according to the analysis identification;
s244, performing service calculation on the service data in the preset data format obtained by conversion to obtain a data processing result;
and S245, displaying the data processing result to a user.
In the present embodiment, a communication protocol format is defined, and the communication protocol format includes a protocol header, a data field, and a protocol parity bit. The protocol header is a defined internal protocol standard, and includes a protocol type, a protocol length, and the like. The length of the data area refers to the length of data extracted from the data area. The parsing flag refers to a flag indicating a format of data stored in the data area. The data area is used for storing data, such as business data. The data format of the data area can be json format, XML format or other data format. The format of the data area data can be obtained through the analysis identification. The protocol check bit is used for checking the data content of the data area to detect whether the data has the problem of content error in the network transmission process, so that the increased inspection caused by abnormal operation of the edge gateway can be avoided.
Wherein the protocol header further includes a version number of the preset communication protocol, and the method further includes: and associating the version number with the Internet of things equipment. The converting the extracted service data into service data in a preset data format according to the analysis identifier includes: and selecting an analysis template corresponding to the version number according to the analysis identifier, and converting the extracted service data into service data in a preset data format.
It should be noted that, the detailed process of the above steps S21 to S24 can refer to the above system embodiment.
The data processing result is related to the service data, for example, the service data is sleep state data of the user, which includes sleep time and duration, number of body movements, whether to snore, whether to lie in bed, and the like, and the data processing result may be a sleep quality detection report of the user. For another example, the service data is operating state data of the internet of things device, which includes temperature, operating frequency, power consumption, whether a fault occurs, and the like of the air conditioner, and the data processing result may be a detection report of the internet of things device.
And the edge gateway displays the data processing result to a user after obtaining the data processing result. When the data processing result is displayed, the data processing result may be directly displayed on a user interface of the edge gateway, or the edge gateway may send the data processing result to a user terminal, so that a user obtains the data processing result.
In some embodiments, the data processing result may further include data alarm information, for example, when the heart rate of a certain user is obtained to exceed a set alarm value, the data alarm information may be synchronized to the relevant staff member in time.
In some embodiments, referring also to fig. 3, the method further comprises:
and S25, sending the service data and the data processing result of the service data to the Internet of things cloud platform so as to enable the Internet of things cloud platform to carry out data synchronization.
The edge gateway may store the service data and the data processing result of the service data locally, and may sequentially store related data according to the type of the internet of things device that sends the service data and a timestamp corresponding to the data. When the edge gateway network is unobstructed, locally stored data are synchronized to the internet of things cloud platform, the internet of things cloud platform can perform offline calculation based on the received data, for example, a user sleep quality report can be generated according to the received user sleep data, and the user quality report can be pushed to a user.
The embodiment of the invention provides a data processing method, which can be used for calculating and processing data collected by various Internet of things equipment nearby at the edge side, presenting processing results of related data to a user in real time, and intervening and processing in time when an abnormality occurs. In addition, the edge gateway and the internet of things equipment are in the same local area network, and when network jitter occurs or no external network exists, the service can still be provided. And finally, managing a plurality of Internet of things devices through the edge gateway, and filtering data which is not needed by the Internet of things cloud platform, so that the node access number and the bandwidth of the Internet of things cloud platform are reduced.
Based on the data processing system of the internet of things, the following embodiments provide a data processing method, which is applied to the internet of things device located in the device sensing layer, as shown in fig. 5, and the method includes:
s31, after the Internet of things equipment passes authentication of an Internet of things cloud platform, receiving a network switching command sent by the Internet of things cloud platform, wherein the network switching command comprises edge gateway information;
s32, sending a connection request to an edge gateway corresponding to the edge gateway information according to the network switching command so that the Internet of things equipment is connected with the edge gateway;
s33, sending a data access request to the edge gateway so that the edge gateway judges whether the Internet of things equipment meets a preset access requirement, wherein the Internet of things equipment meeting the access requirement comprises the following steps: the Internet of things equipment is equipment which supports access by the edge gateway, and the Internet of things equipment and the edge gateway both correspond to the same registered user;
and S34, after receiving the access authentication success indication sent by the edge gateway, sending service data to the edge gateway so that the edge gateway performs data processing on the service data.
Wherein, the sending the service data to the edge gateway to enable the edge gateway to perform data processing on the service data includes: sending a service message in a format corresponding to a preset communication protocol to the edge gateway, where the service message includes a protocol header of the preset communication protocol, a data area containing service data, and a protocol check bit, the protocol header includes a length of the data area and an analysis identifier for indicating an analysis manner, the length of the data area is used by the edge gateway to extract the service data from the service message, the protocol check bit is used by the edge gateway to check the extracted service data, and the analysis identifier is used by the edge gateway to convert the extracted service data into service data in a preset data format, so as to perform service calculation on the converted service data in the preset data format, thereby obtaining a data processing result.
Before receiving a network switching command sent by the internet of things cloud platform, the method further includes:
receiving connection information of an Internet of things cloud platform sent by terminal equipment, wherein the connection information comprises authentication information of the Internet of things cloud platform;
sending an authentication message to the Internet of things cloud platform according to the connection information of the Internet of things cloud platform, wherein the authentication message comprises authentication information of the Internet of things cloud platform and identification information of the Internet of things equipment;
and receiving an authentication passing message sent by the Internet of things cloud platform, wherein the authentication passing message is sent after the Internet of things cloud platform determines that the Internet of things equipment passes authentication according to the authentication information and associates the identification information of the Internet of things equipment with the user registration identification corresponding to the terminal equipment.
It should be noted that the data processing method provided in the embodiment of the present invention is based on the same concept as the apparatus embodiment and the method embodiment, and specific contents may refer to descriptions in the apparatus embodiment and the method embodiment of the present invention, and are not described herein again.
As shown in fig. 6, fig. 6 is an interaction diagram of a data processing method according to an embodiment of the present invention, where the data processing method is applied to an edge gateway and an internet of things device. Firstly, the internet of things equipment is networked to obtain network capability, and the internet of things equipment can be networked by means of an external equipment terminal, which can be referred to the method embodiment specifically. After the Internet of things equipment is networked, an authentication command is sent to the Internet of things cloud platform, and meanwhile, the edge gateway authenticates the Internet of things cloud platform. And the Internet of things cloud platform associates the Internet of things equipment and the edge gateway which are successfully authenticated with the same registered user. One registered user may correspond to one or more edge gateways, and one edge gateway may correspond to one or more internet of things devices. Next, through the external terminal device will the internet of things device is connected the edge gateway, the external terminal device can follow the internet of things cloud platform acquires edge gateway information, and to the internet of things cloud platform sends connection request, the internet of things cloud platform according to connection request to the internet of things device sends the network switching command, the network switching command includes the information of edge gateway (such as I P and the port of edge gateway), the internet of things device according to the network switching command is connected the edge gateway. The internet of things equipment is connected with the edge gateway, and then can to the edge gateway sends the data access request, through the data access request the edge gateway is right the legality of the internet of things equipment is detected, only when the internet of things equipment meets the preset requirement, the internet of things equipment is the equipment that can legally access data, wherein, the preset requirement includes the internet of things equipment is the equipment that the edge gateway supports access, and the internet of things equipment with the edge gateway all corresponds same registered user. When the internet of things equipment is detected to be legal, the edge gateway sends a data access success command to the internet of things equipment, at the moment, the internet of things equipment can send service data to the edge gateway, the edge gateway carries out data processing on the service data, and a processing result of the service data is displayed to a user. In the process of sending the service data, message transmission is performed based on a format corresponding to a preset communication protocol, so that when the edge gateway performs data processing on the service data, processing may be performed according to the preset communication protocol, and in particular, reference may be made to the foregoing embodiments. Further, the edge gateway may synchronize the data it obtains to the internet of things cloud platform.
The method provided by the embodiment of the invention mainly comprises the steps of communicating with the Internet of things equipment through the edge gateway, analyzing and calculating data obtained from the Internet of things equipment through the edge gateway based on the edge calculation technology and the like, and displaying a data processing result to a user. In addition, the method provided by the invention can still provide services under the condition of network jitter or no external network, thereby reducing the dependence on the network. Finally, the device with weak computing capability can be supported to access the edge gateway through a self-defined communication protocol format, so that the abnormal data generated in the network transmission process can be intervened and processed in time, and the safety and the flexibility of the whole system are improved.
Fig. 7 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present invention, where the electronic device 40 may be configured to execute the above method embodiment. The electronic device 40 includes:
one or more processors 41 and memory 42, with one processor 41 being an example in fig. 7.
The processor 41 and the memory 42 may be connected by a bus or other means, and fig. 7 illustrates the connection by a bus as an example.
The memory 42, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the data processing method in the embodiments of the present invention. The processor 41 implements the data processing method provided by the above-described method embodiments by running non-volatile software programs, instructions, and modules stored in the memory 42.
The memory 42 may include high speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, memory 42 may optionally include memory located remotely from processor 41, which may be connected to processor 41 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The program instructions/modules are stored in the memory 42 and, when executed by the one or more processors 41, perform the data processing method in any of the method embodiments described above.
The electronic device 40 may exist in various forms, such as the electronic device 40 being an edge gateway including, but not limited to, a PC computer, an industrial personal computer, an internet of things gateway box, and the like. For example, the electronic device 40 is an internet of things device including, but not limited to, an air conditioner, a sleep detector, a heart rate meter, and the like.
Embodiments of the present invention also provide a non-volatile computer storage medium storing computer-executable instructions, which are executed by one or more processors, such as one of the processors 41 in fig. 7, so that the one or more processors can execute the data processing method in any of the method embodiments.
Embodiments of the present invention also provide a computer program product, where the computer program product includes a computer program stored on a non-volatile computer-readable storage medium, where the computer program includes program instructions, and when the program instructions are executed by the electronic device, the electronic device is caused to execute the data processing method in any of the above method embodiments.
The above-described embodiments of the apparatus or device are merely illustrative, wherein the unit modules described as separate parts may or may not be physically separate, and the parts displayed as module units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network module units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a general hardware platform, and certainly can also be implemented by hardware. Based on such understanding, the above technical solutions substantially or contributing to the related art may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; within the idea of the invention, also technical features in the above embodiments or in different embodiments may be combined, steps may be implemented in any order, and there are many other variations of the different aspects of the invention as described above, which are not provided in detail for the sake of brevity; although the present invention has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A data processing method is applied to an edge gateway, the edge gateway is in communication connection with an Internet of things cloud platform, and the method comprises the following steps:
receiving a connection request sent by equipment of the Internet of things, and connecting the equipment of the Internet of things according to the connection request, wherein the connection request is triggered after the equipment of the Internet of things receives a network switching command sent by a cloud platform of the Internet of things after passing through authentication of the cloud platform of the Internet of things, and the network switching command is actively sent to the equipment of the Internet of things by the cloud platform of the Internet of things according to a command set by a system or is sent after the cloud platform of the Internet of things receives a message sent by terminal equipment;
receiving a data access request sent by the Internet of things equipment;
if the Internet of things equipment meets the preset access requirement according to the data access request, sending an access authentication success indication to the Internet of things equipment, wherein the condition that the Internet of things equipment meets the access requirement comprises the following steps: the Internet of things equipment and the edge gateway are in the same local area network after being networked, the Internet of things equipment and the edge gateway are successfully authenticated on the Internet of things cloud platform, and the Internet of things equipment and the edge gateway correspond to the same registered user;
and receiving the service data sent by the equipment of the Internet of things, and processing the service data.
2. The method of claim 1, wherein the connection request includes identification information of the internet of things device;
before receiving the data access request sent by the internet of things device, the method further includes:
and associating the identification information with an equipment channel so as to communicate with the Internet of things equipment through the equipment channel.
3. The method according to claim 1, wherein the receiving the service data sent by the internet of things device and performing data processing on the service data comprises:
receiving a service message of which the format is corresponding to a preset communication protocol and sent by the internet of things equipment, wherein the service message comprises a protocol header of the preset communication protocol, a data area containing service data and a protocol check bit, and the protocol header comprises the length of the data area and an analysis identifier for indicating an analysis mode;
extracting the service data from the service message according to the length of the data area, and verifying the extracted service data according to the protocol check bit;
under the condition that the extracted service data passes the verification, converting the extracted service data into service data in a preset data format according to the analysis identification;
and performing service calculation on the service data in the preset data format obtained by conversion to obtain a data processing result.
4. The method of claim 3, further comprising:
and displaying the data processing result to a user.
5. The method of claim 3, wherein the protocol header further comprises a version number of the pre-set communication protocol, and wherein the method further comprises:
associating the version number with the Internet of things equipment;
the converting the extracted service data into service data in a preset data format according to the analysis identifier includes:
and selecting an analysis template corresponding to the version number according to the analysis identifier, and converting the extracted service data into service data in a preset data format.
6. The method according to any one of claims 1 to 5, further comprising:
and sending the service data and the data processing result of the service data to the Internet of things cloud platform so as to synchronize the data of the Internet of things cloud platform.
7. A data processing method is applied to Internet of things equipment, and comprises the following steps:
after the IOT equipment passes authentication of an IOT cloud platform, receiving a network switching command sent by the IOT cloud platform, wherein the network switching command comprises edge gateway information, and the network switching command is actively sent to the IOT equipment by the IOT cloud platform according to a command set by a system or sent after the IOT cloud platform receives a message sent by terminal equipment;
sending a connection request to an edge gateway corresponding to the edge gateway information according to the network switching command so as to enable the Internet of things equipment to be connected with the edge gateway;
sending a data access request to the edge gateway so that the edge gateway judges whether the internet of things equipment meets a preset access requirement, wherein the internet of things equipment meeting the access requirement comprises the following steps: the Internet of things equipment and the edge gateway are in the same local area network after being networked, the Internet of things equipment and the edge gateway are successfully authenticated on the Internet of things cloud platform, and the Internet of things equipment and the edge gateway correspond to the same registered user;
and after receiving an access authentication success indication sent by the edge gateway, sending service data to the edge gateway so that the edge gateway performs data processing on the service data.
8. The method of claim 7, wherein the sending the traffic data to the edge gateway to enable the edge gateway to perform data processing on the traffic data comprises:
the method comprises the steps of sending a service message with a format corresponding to a preset communication protocol to an edge gateway, wherein the service message comprises a protocol head of the preset communication protocol, a data area containing service data and a protocol check bit, the protocol head comprises the length of the data area and an analysis identifier used for indicating an analysis mode, the length of the data area is used for extracting the service data from the service message by the edge gateway, the protocol check bit is used for verifying the extracted service data by the edge gateway, the analysis identifier is used for converting the extracted service data into the service data with the preset data format by the edge gateway so as to perform service calculation on the converted service data with the preset data format, and thus a data processing result is obtained.
9. The method according to claim 7 or 8, wherein before receiving the network switching command sent by the internet of things cloud platform, the method further comprises:
receiving connection information of an Internet of things cloud platform sent by terminal equipment, wherein the connection information comprises authentication information of the Internet of things cloud platform;
sending an authentication message to the Internet of things cloud platform according to the connection information of the Internet of things cloud platform, wherein the authentication message comprises authentication information of the Internet of things cloud platform and identification information of the Internet of things equipment;
and receiving an authentication passing message sent by the Internet of things cloud platform, wherein the authentication passing message is sent after the Internet of things cloud platform determines that the Internet of things equipment passes authentication according to the authentication information and associates the identification information of the Internet of things equipment with the user registration identification corresponding to the terminal equipment.
10. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor;
wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 9.
CN202010277713.8A 2020-04-08 2020-04-08 Data processing method and electronic equipment Active CN111565218B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010277713.8A CN111565218B (en) 2020-04-08 2020-04-08 Data processing method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010277713.8A CN111565218B (en) 2020-04-08 2020-04-08 Data processing method and electronic equipment

Publications (2)

Publication Number Publication Date
CN111565218A CN111565218A (en) 2020-08-21
CN111565218B true CN111565218B (en) 2023-03-10

Family

ID=72070412

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010277713.8A Active CN111565218B (en) 2020-04-08 2020-04-08 Data processing method and electronic equipment

Country Status (1)

Country Link
CN (1) CN111565218B (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111966868B (en) * 2020-09-07 2021-04-06 航天云网数据研究院(广东)有限公司 Data management method based on identification analysis and related equipment
CN112583796B (en) * 2020-11-30 2022-07-08 国电南瑞科技股份有限公司 Method and system for accessing terminal equipment to power Internet of things, Internet of things management platform and storage medium
CN112738158B (en) * 2020-12-11 2022-11-25 深圳供电局有限公司 Information transmission method, information transmission device, computer equipment and storage medium
CN112637221B (en) * 2020-12-25 2022-10-14 青岛海尔科技有限公司 Equipment control method and device
CN112910706B (en) * 2021-02-02 2022-07-22 烽火通信科技股份有限公司 Automatic configuration method, system, device and readable storage medium
CN112954065B (en) * 2021-02-26 2023-12-29 厦门熵基科技有限公司 Data pushing method and device, electronic equipment and storage medium
CN113022662B (en) * 2021-04-16 2022-10-18 湖南中车时代通信信号有限公司 Vehicle-mounted ATC network system and rail transit system
CN113114705B (en) * 2021-06-15 2021-09-21 杭州海康威视数字技术股份有限公司 Credible and programmable video internet of things terminal endogenous security detection method and device
CN114124451B (en) * 2021-10-15 2023-08-22 杭州安恒信息技术股份有限公司 Data processing method and system for Internet of things equipment and computer storage medium
CN114205350A (en) * 2021-11-01 2022-03-18 国网浙江省电力有限公司信息通信分公司 Edge side protocol conversion system and method
CN114090246B (en) * 2021-11-17 2022-10-18 苏州和氏设计营造股份有限公司 Method and device for processing data of displayed and aged artwork based on big data
CN114301997A (en) * 2021-12-28 2022-04-08 上海线友电子有限公司 Internet of things equipment and cloud platform communication method based on network application layer
CN115378787A (en) * 2022-08-19 2022-11-22 深圳前海环融联易信息科技服务有限公司 Cloud edge cooperation-based equipment management method, device, equipment and medium
CN115499259A (en) * 2022-08-26 2022-12-20 青岛海尔空调器有限总公司 Method and device for controlling household appliance, gateway air conditioner and storage medium
CN115988490B (en) * 2022-12-02 2023-10-20 广东保伦电子股份有限公司 APP-based hardware equipment network distribution method, apparatus and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104580185A (en) * 2014-12-30 2015-04-29 北京工业大学 Method and system for network access control
CN107172051A (en) * 2017-05-23 2017-09-15 南京邮电大学 A kind of method that internet of things equipment finds and managed
CN108833471A (en) * 2018-04-28 2018-11-16 中南设计集团(武汉)工程技术研究院有限公司 Internet of things service processing method, things-internet gateway and Internet of Things
CN109143948A (en) * 2018-08-30 2019-01-04 四川创客知佳科技有限公司 Intelligent safety and defence system based on Internet of Things
EP3425873A1 (en) * 2017-07-05 2019-01-09 Wipro Limited Method and system for processing data in an internet of things (iot) environment
CN109890058A (en) * 2019-01-28 2019-06-14 博频云彩(北京)科技有限公司 A kind of self-organization of network method of extensive low discharge data source access
CN110198363A (en) * 2019-05-10 2019-09-03 深圳市腾讯计算机系统有限公司 A kind of selection method of mobile edge calculations node, apparatus and system
CN110198307A (en) * 2019-05-10 2019-09-03 深圳市腾讯计算机系统有限公司 A kind of selection method of mobile edge calculations node, apparatus and system
CN110351388A (en) * 2019-07-31 2019-10-18 南京三满互联网络科技有限公司 A kind of application method based on internet of things architecture system
CN110474839A (en) * 2019-07-08 2019-11-19 冯瑞军 Edge calculations gateway

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104580185A (en) * 2014-12-30 2015-04-29 北京工业大学 Method and system for network access control
CN107172051A (en) * 2017-05-23 2017-09-15 南京邮电大学 A kind of method that internet of things equipment finds and managed
EP3425873A1 (en) * 2017-07-05 2019-01-09 Wipro Limited Method and system for processing data in an internet of things (iot) environment
CN108833471A (en) * 2018-04-28 2018-11-16 中南设计集团(武汉)工程技术研究院有限公司 Internet of things service processing method, things-internet gateway and Internet of Things
CN109143948A (en) * 2018-08-30 2019-01-04 四川创客知佳科技有限公司 Intelligent safety and defence system based on Internet of Things
CN109890058A (en) * 2019-01-28 2019-06-14 博频云彩(北京)科技有限公司 A kind of self-organization of network method of extensive low discharge data source access
CN110198363A (en) * 2019-05-10 2019-09-03 深圳市腾讯计算机系统有限公司 A kind of selection method of mobile edge calculations node, apparatus and system
CN110198307A (en) * 2019-05-10 2019-09-03 深圳市腾讯计算机系统有限公司 A kind of selection method of mobile edge calculations node, apparatus and system
CN110474839A (en) * 2019-07-08 2019-11-19 冯瑞军 Edge calculations gateway
CN110351388A (en) * 2019-07-31 2019-10-18 南京三满互联网络科技有限公司 A kind of application method based on internet of things architecture system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Edge Computing Gateway of the Industrial Internet of Things Using Multiple Collaborative Microcontrollers;Ching-Han Chen等;《 Network, IEEE》;20181231;第32卷(第1期);全文 *
实时数据库系统数据安全采集方案;尚振阳等;《电信科学》;20161020(第10期);全文 *
新型基础设施支撑的物联网服务的安全分析;刘文懋等;《邮电设计技术》;20190420(第04期);全文 *

Also Published As

Publication number Publication date
CN111565218A (en) 2020-08-21

Similar Documents

Publication Publication Date Title
CN111565218B (en) Data processing method and electronic equipment
US11146470B2 (en) Apparatus and methods for monitoring and diagnosing a wireless network
WO2021203733A1 (en) Power edge gateway device and device-based sensor data uplink storage method
US11057352B2 (en) Communication system and method for machine data routing
US10547594B2 (en) Systems and methods for implementing data communication with security tokens
CN107395312B (en) A kind of secure network method for synchronizing time and device
WO2019047631A1 (en) Blockchain-based micro-base station communication management method, system and device
WO2017215452A1 (en) Connection establishment method, apparatus and device
CN103401946B (en) HTTP uploads accelerated method and system
US10355961B2 (en) Network traffic capture analysis
Gao et al. Toward emulation-based performance assessment of constrained application protocol in dynamic networks
CN109889454A (en) A kind of the message driving means and method of micro services framework
Laine et al. Performance evaluation of XMPP on the Web
CN105612723A (en) Method and device for distributing traffic by using plurality of network interfaces in wireless communication system
WO2019242256A1 (en) Communication method, device, storage medium, voice board, detection board, and air conditioner
CN114205375A (en) Electric power data acquisition system based on edge internet of things agent equipment
CN115118526B (en) VR device data migration method
CN201657020U (en) Mobile SSL VPN system based on remote Socks 5 agent
JP5365694B2 (en) Base station control device and communication system
CN109246639A (en) A kind of data gateway system and its communication means
WO2016184025A1 (en) Device management method and apparatus
CN113766007A (en) Authentication front-end system and authentication method based on multi-source heterogeneous data analysis protocol
WO2022041827A1 (en) Transmission method and apparatus for mobile network detection information, and storage medium
CN113746807A (en) Block chain node point support cryptographic algorithm communication detection method
KR20150027606A (en) Apparatus and method for coverting data rate

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
GR01 Patent grant
GR01 Patent grant