CN116319775A - Equipment cooperative processing method, device, edge gateway, system and storage medium - Google Patents

Equipment cooperative processing method, device, edge gateway, system and storage medium Download PDF

Info

Publication number
CN116319775A
CN116319775A CN202211531633.6A CN202211531633A CN116319775A CN 116319775 A CN116319775 A CN 116319775A CN 202211531633 A CN202211531633 A CN 202211531633A CN 116319775 A CN116319775 A CN 116319775A
Authority
CN
China
Prior art keywords
data
task
equipment
engine
processed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211531633.6A
Other languages
Chinese (zh)
Inventor
杜杨浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Qianhai Huanrong Lianyi Information Technology Service Co Ltd
Original Assignee
Shenzhen Qianhai Huanrong Lianyi Information Technology Service 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 Qianhai Huanrong Lianyi Information Technology Service Co Ltd filed Critical Shenzhen Qianhai Huanrong Lianyi Information Technology Service Co Ltd
Priority to CN202211531633.6A priority Critical patent/CN116319775A/en
Publication of CN116319775A publication Critical patent/CN116319775A/en
Pending legal-status Critical Current

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/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • 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/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention relates to the technical field of edge computing, and discloses a device cooperative processing method, a device, an edge gateway, a system and a storage medium. According to the method, a task to be processed sent by a first device is received, a target cooperative micro-service corresponding to a task type is adopted, and first data in the task to be processed are cooperatively processed according to the task type in the task to be processed, so that second data after processing and conversion are obtained, and the dependence on a third-party API or SDK is reduced by adopting the target cooperative micro-service to process the first data; and if the task to be processed comprises the second equipment identifier, sending the second data to second equipment corresponding to the second equipment identifier, and if the task to be processed does not comprise the second equipment identifier, storing the second data in a local memory, so that the second data processed by the target collaborative micro-service is forwarded according to the task to be processed, and the stability of connection among the first equipment, the second equipment and the edge gateway is improved.

Description

Equipment cooperative processing method, device, edge gateway, system and storage medium
Technical Field
The present invention relates to the field of edge computing technologies, and in particular, to a device co-processing method, device, edge gateway, system, and storage medium.
Background
Compared with the method of totally relying on cloud computing, the method of computing the edge is also called as a distributed computing mode, the method can enable the data storage of the computer to be closer to a required place, and the method of processing the distributed data greatly reduces the requirements of equipment on data transmission and processing capacity. The most typical application modes are: the information of the production end is collected through various monitoring and sensor equipment, the information is summarized and sent to the edge gateway, the high-performance processor is used for preprocessing data, analysis, screening and judgment are carried out, then the intensive data are transmitted to the industrial cloud platform through the network port, timely and efficient reporting of the production information is achieved, and monitoring and decision making requirements of a manager are met.
At present, because protocols used by all devices are different, the Internet of things device is accessed to an edge gateway and a networking cloud platform by a device API or an SDK provided by a third party, then interaction between a cloud platform and the devices can be completed through an interface packaged according to the API or the SDK, and device access logic is automatically realized by the third party, so that the cost of device access is improved, dependence on the third party is improved, the risk in the connection process of the Internet of things cloud platform and the Internet of things device is improved, and the stability of edge calculation is reduced. The existing equipment access scheme has the problem that the dependency on a third party is strong, and further the stability of edge calculation is low.
Disclosure of Invention
The embodiment of the invention provides a device cooperative processing method, a device, an edge gateway, a system and a storage medium, which solve the problem of lower stability of edge calculation in the prior art.
The embodiment of the invention provides a device cooperative processing method, which comprises the following steps:
receiving a task to be processed sent by first equipment, wherein the task to be processed comprises a task type and first data;
performing cooperative processing on the first data by adopting a target cooperative microservice corresponding to the task type to obtain second data;
if the task to be processed comprises a second equipment identifier, the second data is sent to second equipment corresponding to the second equipment identifier;
and if the task to be processed does not comprise the second equipment identifier, storing the second data in a local memory.
The embodiment of the invention also provides a device cooperation device, which comprises:
the device comprises a task receiving module for receiving a task to be processed, which is sent by a first device, wherein the task to be processed comprises a task type and first data;
the second data acquisition module is used for carrying out cooperative processing on the first data by adopting a target cooperative micro service corresponding to the task type to acquire second data;
The second data sending module is used for sending the second data to second equipment corresponding to the second equipment identifier if the task to be processed comprises the second equipment identifier;
and the second data storage module is used for storing the second data in the local memory if the task to be processed does not comprise the second equipment identifier.
The embodiment of the invention also provides an edge gateway, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor realizes the device cooperative processing method when executing the computer program.
The embodiment of the invention also provides an Internet of things system, which comprises the edge gateway, and further comprises an Internet of things cloud platform and Internet of things equipment which are communicated with the edge gateway; the internet of things cloud platform is the first device, and the internet of things device is the second device; or the internet of things device or the edge gateway is the first device, and the internet of things cloud platform is the second device.
The embodiment of the invention also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program realizes the device cooperative processing method when being executed by a processor.
According to the device cooperative processing method, the device, the edge gateway, the system and the storage medium, the target cooperative micro-service corresponding to the task type is adopted by receiving the task to be processed sent by the first device, and the first data in the task to be processed is cooperatively processed according to the task type in the task to be processed, so that the processed and converted second data are obtained, and the dependence on the third-party API or the SDK is reduced by adopting the target cooperative micro-service to perform the first data processing; and if the task to be processed comprises the second equipment identifier, sending the second data to second equipment corresponding to the second equipment identifier, and if the task to be processed does not comprise the second equipment identifier, storing the second data in a local memory, so that the second data processed by the target collaborative micro-service is forwarded according to the task to be processed, and the stability of connection among the first equipment, the second equipment and the edge gateway is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments of the present invention will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic view of an application environment of a device co-processing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method of device co-processing in accordance with one embodiment of the present invention;
FIG. 3 is another flow chart of a device co-processing method in an embodiment of the invention;
FIG. 4 is another flow chart of a device co-processing method in an embodiment of the invention;
FIG. 5 is another flow chart of a device co-processing method in an embodiment of the invention;
FIG. 6 is another flow chart of a device co-processing method in an embodiment of the invention;
FIG. 7 is another flow chart of a device co-processing method in an embodiment of the invention;
FIG. 8 is a schematic diagram of a device cooperation apparatus according to an embodiment of the present invention;
fig. 9 is a schematic diagram of an edge gateway according to an embodiment of the invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The device co-processing method provided by the embodiment of the invention can be applied to an application environment shown in fig. 1. As shown in fig. 1, the internet of things device communicates with an edge gateway or an internet of things cloud platform through a network. The internet of things equipment is also called a user side, and corresponds to communication with an edge gateway or an internet of things cloud platform, and provides local services for clients. The edge gateway or the internet of things cloud platform can communicate by using an independent server, and can also be a cloud server for providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDNs), basic cloud computing services such as big data and artificial intelligent platforms, and the like.
The device co-processing method provided by the embodiment of the invention can be applied to an application environment shown in figure 1. Specifically, the device cooperation processing method is applied to a device cooperation system, and the device cooperation system comprises the internet of things device and an edge gateway or an internet of things cloud platform which are shown in fig. 1, wherein the internet of things device and the edge gateway or the internet of things cloud platform communicate through a network, and the device cooperation processing method is used for realizing the device cooperation processing of the internet of things device by the communication of the edge gateway or the internet of things cloud platform so as to improve the stability of device cooperation.
Edge computing refers to providing near-end services on one side near the object or data source by adopting an open platform with integrated network, computing, storage and application core capabilities. The application program analyzes and processes data at the edge side, has no data circulation, generates faster network service response, meets the basic requirements of industry in the aspects of real-time service, application intelligence, security, privacy protection and the like, and further reduces network flow and response time.
The edge gateway is called as an edge computing gateway, and refers to any node with computing resources and network resources between a data generation source and a cloud center, and the edge gateway can rapidly and autonomously respond to an event of an internet of things device by expanding the function of an internet of things cloud platform to the edge gateway, so that a local computing service with low delay, low cost, privacy safety and local autonomy is provided.
The internet of things device is a nonstandard computing device, can be connected to a network in a wireless mode, and has the capability of transmitting data. The internet of things relates to traditional internet-unapplied physical devices and everyday objects that extend the range of internet connectivity from standard devices such as desktops, notebooks, smartphones, and tablets to any range. Through embedding the equipment into the corresponding processor, communication and interaction can be carried out through the cloud platform of the Internet of things, and the equipment can also be monitored and controlled remotely.
In one embodiment, as shown in fig. 2, a device co-processing method is provided, and the method is applied to the edge gateway in fig. 1, and is illustrated as an example, and includes the following steps:
s201: receiving a task to be processed sent by first equipment, wherein the task to be processed comprises a task type and first data;
s202: performing cooperative processing on the first data by adopting a target cooperative microservice corresponding to the task type to acquire second data;
s203: if the task to be processed comprises the second equipment identifier, the second data is sent to second equipment corresponding to the second equipment identifier;
s204: and if the task to be processed does not comprise the second equipment identifier, storing the second data in the local memory.
The first device, i.e. the device that sends the task to be processed, may be an internet of things cloud platform, an internet of things device, or an edge gateway according to the different tasks to be processed. Correspondingly, the second device, namely the device for receiving the second data, can be an internet of things cloud platform, an internet of things device or an edge gateway according to different tasks to be processed, and if the second device is not specified, the second data does not need to be correspondingly sent.
As an example, in step S201, the edge gateway performs subsequent steps according to the task type and the first data in the task to be processed by receiving the task to be processed sent by the first device. The task to be processed can be triggered by the user through the first device, or can be generated by the first device according to a rule or a period, and the edge gateway performs the next operation on the task to be processed.
In this example, according to the different task types, the sent first data also has a corresponding difference, and the first device sends the corresponding first data according to the actual task type.
As an example, in step S202, after receiving the task to be processed sent by the first device, the edge gateway determines a task type of the task to be processed, and performs cooperative processing on the first data by using a target cooperative microservice corresponding to the task type, so as to obtain processed second data. The second data is used for being sent to the second device or stored in the local memory according to different task types, so that information transmission work can be efficiently completed.
In this example, the server may set a plurality of micro services to perform corresponding function implementation, including, but not limited to, an equipment management micro service, a data storage micro service, and in each example, a target collaboration micro service corresponding to each type of task is set according to a service requirement, and information transfer between each micro service is performed through a message bus (message bus or message bus Kafka), which may be set at an edge gateway, or may be set at an independent server, for example, a server with the target collaboration micro service installed is set between the edge gateway and an internet of things device, or a server with the target collaboration micro service installed is respectively set between the edge gateway and the internet of things device, and between the edge gateway and an internet of things cloud platform. The target cooperative microservice function is used for converting data sent or received by each Internet of things device according to a protocol corresponding to the Internet of things device, so that the problem that the original device API or SDK provided by a third party is relied on to access the Internet of things cloud platform is solved. The protocols of the internet of things equipment include, but are not limited to, modbus protocol, HTTP (s)/CoAP protocol and MQTT protocol, and data formats received or transmitted by the edge gateway and the internet of things cloud platform are JSON formats.
As an example, in step S203, after obtaining the second data processed by the target collaborative micro service, the edge gateway determines whether the second data is sent to the second device according to whether the task to be processed includes a second device identifier, that is, whether forwarding is required for the task type corresponding to the task to be processed, and if the task to be processed includes the second device identifier, sends the second data to the second device corresponding to the second device identifier, so that the second device processes the second data accordingly.
As an example, in step S204, after obtaining the second data processed by the target collaborative micro service, the edge gateway determines whether the second data is sent out to the second device according to whether the task to be processed includes the second device identifier, that is, whether forwarding is required, according to the task type corresponding to the task to be processed, and if the task to be processed does not include the second device identifier, the edge gateway stores the second data in the local memory.
In the example, a target cooperative micro-service is adopted for receiving a task to be processed sent by a first device, and first data in the task to be processed is cooperatively processed according to the task type in the task to be processed, so that processed and converted second data are obtained, and the dependence on a third-party API or SDK is reduced by adopting the target cooperative micro-service for carrying out first data processing; if the task to be processed comprises the second equipment identifier, the second data is sent to second equipment corresponding to the second equipment identifier, if the task to be processed does not comprise the second equipment identifier, the second data is stored in a local memory, so that the second data processed by the target collaborative micro-service is correspondingly forwarded according to the requirement of the task to be processed, and the connection stability of the first equipment, the second equipment and the edge gateway is improved.
In an embodiment, as shown in fig. 3, if the task type includes a protocol access task, the task to be processed further includes a first device identifier and a second device identifier, and the first data includes a first device attribute;
step S202, performing cooperative processing on the first data by adopting a target cooperative micro-service corresponding to the task type, and obtaining second data, wherein the steps include:
s301: if the task type is a protocol access task, determining a first equipment protocol corresponding to the first equipment identifier according to the first equipment identifier;
s302: and adopting a protocol access micro-service corresponding to the protocol access task to perform protocol access cooperative processing on the first equipment protocol and the first equipment attribute, and obtaining second data.
The protocol access task is to access the first device to the target cooperative micro service of the edge gateway, so that the target cooperative micro service can identify the first device attribute of the first device, and perform data conversion on the first data according to the corresponding first device protocol, and convert the first data into second data which can be identified by the second device.
When the task type comprises a protocol access task, the task to be processed comprises a second equipment identifier, namely second data of the equipment access result is sent to second equipment corresponding to the second equipment identifier.
It can be appreciated that when the edge gateway is disconnected from the internet of things cloud platform, the edge gateway can still communicate with the internet of things device through the target collaborative micro-service.
As an example, in step S301, after confirming the task type, if the task type is a protocol access task, the edge gateway confirms a first device protocol corresponding to the first device identifier according to the first device identifier carried by the first data sent by the first device, so as to be used for storing the device protocol corresponding to the device access of the target cooperative micro service.
In this example, the format and content of the messages that the device interacts with will change according to the protocol, so that the protocol of the device corresponding to the device changes, and the access of the device to the corresponding module will also change. In this example, the master control module confirms the corresponding protocol according to the first device identifier, and if the first device is a CoAP device, confirms the corresponding CoAP protocol.
As an example, in step S302, after acquiring the first device protocol, the edge gateway accesses the micro service using the protocol corresponding to the protocol access task, and according to the confirmed first device protocol and the corresponding first device attribute, stores the first device protocol and the second device attribute in the device cache module corresponding to the protocol access micro service, and generates the device access result as second data for sending to the second device.
In this example, when the first device is an internet of things device, the second device is a corresponding internet of things cloud platform, after a device protocol and a device attribute corresponding to the internet of things device are stored, a protocol access micro-service corresponding to a protocol access task is adopted to generate a corresponding device access result as second data, and the second data is used for being sent to the internet of things cloud platform. The first device identifier comprises an object model id and a device id, and is used for confirming the device identity and improving the safety and stability of data transmission.
Wherein the first device attribute is set according to the difference of the object model functions of the first device, for example, the definition of the object model functions is a temperature sensor, which is an object model, the corresponding attribute has a temperature, and the corresponding first device attribute includes temperature data; the first device attributes also include specific information and status of the device at runtime.
Further, the protocol access microservice comprises a master control module, a protocol conversion module and a device cache module. The master control module is used for receiving a task to be processed of the Internet of things cloud platform or the Internet of things equipment, identifying and executing; the device cache module is used for storing device attributes and device protocols of the devices of the Internet of things, such as device attributes (device IDs), acquisition frequencies (sampling intervals), protocol parameters (network interfaces, communication rates and the like); the protocol conversion module is used for carrying out protocol conversion on the task to be processed.
In this example, if the general control module of the protocol access micro-service collects a data uploading task sent by the internet of things device, by identifying a corresponding internet of things device identifier, determining the attribute of the internet of things device and the protocol of the internet of things device, converting data corresponding to the data uploading task into a corresponding JSON format by using the pluggable protocol, and sending the corresponding JSON format to the internet of things cloud platform; if the general control module of the protocol access micro-service receives a command issuing task sent by the internet of things cloud platform, according to the to-be-received internet of things equipment identifier, determining the attribute of the internet of things equipment and the internet of things equipment protocol, converting command operation content corresponding to the command issuing task into a format of the internet of things equipment protocol by using a pluggable protocol, sending the format of the internet of things equipment protocol to the internet of things equipment, and further, carrying out command issuing at regular time according to the acquisition frequency in the command operation content.
In this example, if the task type is a protocol access task, the protocol access micro service is ensured to perform format conversion according to the data sent by the first device identifier and the second device identifier in subsequent processing by determining a first device protocol corresponding to the first device identifier according to the first device identifier, and storing a first device attribute in the first device protocol and the first data in the protocol access micro service to obtain second data, so that the stability of data transmission is improved.
In an embodiment, as shown in fig. 4, if the task type includes a command issuing task, the task to be processed includes a second device identifier, and the first data includes command operation content;
step S202, performing cooperative processing on the first data by adopting a target cooperative micro-service corresponding to the task type, and obtaining second data, wherein the steps include:
s401: if the task type comprises a command issuing task, determining a second equipment protocol corresponding to the second equipment identifier according to the second equipment identifier;
s402: and adopting a command issuing micro service corresponding to the command issuing task to perform data conversion cooperative processing on the second equipment protocol and the command operation content, and obtaining second data.
The command issuing task is that the first device issues command operation content according to service requirements so that the second device executes the command operation content, the first device corresponding to the command issuing task comprises an edge gateway or an internet of things cloud platform, the command operation content is issued to the corresponding second device after being converted according to a second device protocol, and the second device can respond to the command but cannot send the command reversely.
As an example, in step S401, after confirming the task type, if the task type is a command issuing task, the edge gateway confirms a second device protocol corresponding to a second device identifier according to the second device identifier corresponding to the task to be processed, so as to process the command operation content corresponding to the first data.
In this example, if the command operation content is data sampling of the internet of things device, which includes an acquisition frequency, the corresponding command operation content is periodically issued through the acquisition frequency. For example, if the attribute information corresponding to a certain internet of things device is a temperature sensor and the corresponding acquisition frequency is 60s, the command operation content is converted into a message of a corresponding protocol acceptable by the device, namely, second data according to the device identifier. According to different protocols, the acquisition frequencies are different, and for protocols like modbus type, data sampling is carried out by sending a sampling request every other acquisition frequency; for protocols like http, a sampling request is sent once, then the acquisition frequency is transmitted to the device, and the device reports data once every acquisition frequency interval.
As an example, in step S402, after determining the second device protocol corresponding to the second device identifier, the edge gateway issues the command corresponding to the command issuing task to the micro service to perform data conversion on the command operation content corresponding to the first data, and converts the command operation content into the second data in a format corresponding to the second device protocol, so as to provide the second device with the second data in a format corresponding to the second device protocol for identification and execution, thereby ensuring the call of the first device to the second device.
In this example, the command issuing micro-service is configured to receive command operation content in first data of a first device (edge gateway or internet of things cloud platform) connected to the bus, send corresponding command operation content (for example, the second device is temperature) according to a second device attribute corresponding to the second device (internet of things device), and convert the command operation content into second data that can be identified by the second device by using the protocol conversion module to perform data conversion.
In this example, if the task type includes a command issuing task, a second device protocol corresponding to the second device identifier is determined according to the second device identifier, and through a command issuing micro service corresponding to the command issuing task, data conversion collaborative processing is performed on the second device protocol and command operation content, and the command operation content is converted into second data that can be identified by the second device, so that efficiency of issuing the command issuing task is improved.
In an embodiment, as shown in fig. 5, if the task type includes an engine synchronization task, the task to be processed includes a second device identifier, and the first data includes an engine version identifier;
step S202, performing cooperative processing on the first data by adopting a target cooperative micro-service corresponding to the task type, and obtaining second data, wherein the steps include:
S501: if the task type comprises an engine synchronous task, judging whether a local rule engine corresponding to the engine version identifier exists in the local memory according to the engine version identifier;
s502: if the local rule engine exists, checking the local rule engine by adopting a first engine synchronization micro-service corresponding to the engine synchronization task to acquire second data;
s503: and if the local rule engine does not exist, adopting a second engine synchronization micro-service corresponding to the engine synchronization task to perform engine synchronization cooperative processing on the version rule engine corresponding to the engine version identifier to acquire second data.
The engine synchronization task is to update a rule engine of the first device, namely the internet of things cloud platform, to an edge gateway closer to the device, so that the edge gateway can quickly and autonomously respond to an event of the local internet of things device according to the local rule engine. The task type is an engine synchronization task, and the first equipment is used as a second equipment identifier to feed back according to the engine synchronization condition of the edge gateway, so that the smooth proceeding of the engine synchronization task is ensured.
The rule engine performs corresponding execution after identifying and judging collected data corresponding to the collected internet of things equipment, for example, when the temperature value of the internet of things equipment A is greater than 50 degrees, the rule engine starts to send command operation content for enabling the internet of things equipment B to cool and sends the command operation content to the internet of things equipment B to perform cooperative linkage after the collected data reach the standard.
It can be appreciated that when the edge gateway is disconnected from the internet of things cloud platform, the local rule engine using the edge gateway can still perform corresponding linkage, and meanwhile, other computing services on the edge gateway are not affected.
As an example, in step S501, after confirming the task type, if the task type is an engine synchronization task, the edge gateway is configured to determine whether a local rule engine corresponding to the engine version identifier exists in the local memory according to the engine version identifier in the task type, so as to determine whether synchronization is required, and reduce waste of operation resources.
In an example, whether the local rule engine of the edge gateway needs to be updated can be confirmed according to the engine version identification, so that the function of the rule engine is guaranteed to be updated in time, and the stability of the internet of things system is improved.
As an example, in step S502, if a local rule engine exists in the local memory corresponding to the edge gateway, the first engine synchronization micro service corresponding to the engine synchronization task performs data checking on the local rule engine, and generates an engine synchronization result as second data, that is, the engine synchronization result is that the local check passes, and the engine synchronization operation is not required.
In this example, the first engine synchronization micro-service is configured to check, according to the engine version identifier, a data file corresponding to the local rule engine by the engine to determine the integrity of the local rule engine, thereby improving the stability of the local rule engine.
In an example, the local rule engine of the edge gateway may also be checked by identifying the engine version, and if the local rule engine fails, the local rule engine may be synchronized according to the engine version identification.
In step S503, if the local rule engine does not exist, the version of the local rule engine of the edge gateway is considered to be older, or the local rule engine corresponding to the engine version identifier is not set, and the second engine synchronization micro-service corresponding to the engine synchronization task performs synchronization processing on the version rule engine corresponding to the downloaded or transmitted according to the first data through the engine version identifier, and generates an engine synchronization result as second data, that is, the engine synchronization result is that the synchronization operation is completed.
In this example, the second engine synchronization micro-service is configured to synchronize to the local memory by identifying a corresponding version rule engine for the engine version when the local rule engine is not present, so as to complete the engine synchronization task.
In this example, if the task type includes an engine synchronization task, determining, according to the engine version identifier, whether a local rule engine corresponding to the engine version identifier exists in the local memory, and if the local rule engine exists, performing data checking on the local rule engine by using a first engine synchronization micro-service corresponding to the engine synchronization task to determine the integrity of the local rule engine, and generating an engine synchronization result as second data; if the local rule engine does not exist, a second engine synchronization micro-service corresponding to the engine synchronization task is adopted to perform engine synchronization cooperative processing on the version rule engine corresponding to the engine version identifier, and the version rule engine is synchronized to the edge gateway in time, so that the update of the local rule engine of the edge gateway is ensured, and the stability of the local rule engine is improved.
In an embodiment, as shown in fig. 6, if the task type includes a data upload task, the task to be processed includes a first device identifier but does not include a second device identifier, and the first data includes a first device protocol;
step S202, performing cooperative processing on the first data by adopting a target cooperative micro-service corresponding to the task type, and obtaining second data, wherein the steps include:
S601: if the task type comprises a data uploading task, determining a first equipment protocol corresponding to the first equipment identifier according to the first equipment identifier;
s602: and adopting a data uploading micro-service corresponding to the data uploading task to perform data conversion on the first equipment protocol and the first data, and obtaining second data.
The data uploading task is to upload the collected data corresponding to the first device, namely the internet of things device, or the alarm event, so that corresponding rule judgment and collaborative linkage are performed by using a local rule engine through the second device, namely the edge gateway or the internet of things cloud platform. Wherein the alarm event includes information, alarms and faults that the first device needs to be externally perceived and processed.
In an example, the data uploading task performs feedback according to the command operation content, or may perform periodic uploading of the first data according to the acquisition frequency corresponding to the command operation content without receiving the command operation content. The collection frequency refers to an interval of uploading attribute data corresponding to the collection data by the device, for example, 60s, and then uploading attribute values every 60s, wherein the attribute data of the device attribute is specific, for example, a temperature attribute and a temperature value corresponding to a temperature sensor.
As an example, in step S601, after confirming the task type, if the task type is a data upload task, the edge gateway determines, according to the first device identifier, a first device protocol corresponding to the first device identifier, so as to convert the first data into a data format of the first device protocol.
As an example, in step S602, after confirming the first device protocol, the edge gateway performs data conversion on the first data according to the data uploading micro service corresponding to the data uploading task, and obtains the second data to send to the corresponding second device. In this example, when the first device is an internet of things device, according to a protocol of the internet of things device, the first data is converted into second data in a Json format, and the second data is sent to a corresponding edge gateway or an internet of things cloud platform for processing.
In this example, the data uploading micro-service is configured to receive first data (collected data) of a first device (an internet of things device), and obtain, according to a first device identifier, a corresponding first device protocol from a device cache module, so that data conversion is performed by using a protocol conversion module, and the collected data is converted into second data in a Json format that can be identified by a second device.
In this example, if the task type includes a data uploading task, a first device protocol corresponding to the first device identifier is determined according to the first device identifier, and data conversion is performed on the first device protocol and the first data by adopting a data uploading micro service corresponding to the data uploading task, so that the first data is converted into second data in a format that can be identified by the second device, and therefore the efficiency of data collection by the data uploading task is improved.
In one embodiment, as shown in fig. 7, step S204, if the task to be processed does not include the second device identifier, stores the second data in the local memory, including:
s701: adopting a local rule engine to perform rule matching according to the first equipment identifier, and confirming the first equipment rule;
s702: identifying the second data according to the first equipment rule, and obtaining an engine identification result;
s703: and if the engine identification result is that the local rule engine is satisfied, generating a command issuing task and command operation content.
If the task to be processed does not include the second equipment identifier, the task type is usually a data uploading task, and the second data corresponding to the first equipment after data conversion, namely the acquired data corresponding to the Internet of things equipment, are identified and judged by using a local rule engine through an edge gateway, so that the processing efficiency of events corresponding to the Internet of things equipment is improved, and the operation burden of an Internet of things cloud platform is reduced.
In step S701, when the task type is a data upload task, the edge gateway obtains corresponding second data, performs an identification operation on the second data by using a local rule engine, and performs rule matching through a first device identifier to obtain a first device rule corresponding to the first device, so as to perform rule judgment on second data corresponding to different first devices.
In this example, if the internet of things device a needs to determine according to the data collected by the temperature sensor of the device, after confirming that the first device is the internet of things device a, confirming the device rule of the corresponding internet of things device a.
As an example, in step S702, after confirming the first device rule, the edge gateway identifies the second data according to the first device rule, and obtains an engine identification result, where the engine identification result includes satisfaction of the local rule engine and non-satisfaction of the local rule engine. In this example, if the temperature value of the data collected by the temperature sensor of the internet of things device a is greater than 50 degrees, and the first device rule requires that the temperature cannot exceed 40 degrees, the condition of triggering the local rule engine is reached, the local rule engine is satisfied, and the corresponding engine identification result is output.
As an example, in step S703, after obtaining the engine identification result, if the engine identification result is that the local rule engine is satisfied, the edge gateway generates a command issuing task and command operation content, and generates a corresponding command issuing task.
In this example, if the temperature value corresponding to the internet of things device a meets the local rule engine, a command operation content for cooling the internet of things device B is generated, the internet of things device B is used as a second device, and a command issuing task is sent to the internet of things device B for cooperative linkage.
In another example, under the condition that the internet of things cloud platform is disconnected, the edge gateway is utilized to perform cooperative linkage, and the fan of the internet of things device B is triggered to start through the association triggering among different devices, for example, the temperature value of the internet of things device A is 50 degrees, and after the local rule engine judges that the temperature value exceeds the rule corresponding to the temperature value of the internet of things device A. The specific logic does not need to send to the disconnected internet of things cloud platform through a bus, scene linkage micro-service in the edge gateway can be adopted, sampling data of the internet of things equipment A (the bus of the edge gateway is read from the bus, the protocol access micro-service receives the acquisition data and then writes the acquisition data into the bus for reading by other micro-service) and then judges whether a rule is triggered or not, if the rule is triggered, the micro-service is issued through a calling command corresponding to the edge gateway, a command issuing task is issued to the internet of things equipment B, control of the edge gateway on the internet of things equipment is achieved, and the effect of cooperative linkage is achieved.
In this example, a local rule engine is adopted to perform rule matching according to a first device identifier, so as to confirm a first device rule and identify a second data, so as to obtain a second data corresponding engine identification result uploaded by the first device, so as to perform corresponding collaborative linkage operation, and if the engine identification result meets the local rule engine, a command issuing task and command operation content are generated, so that the command issuing task is instructed to be executed corresponding to the second device, the collaborative linkage effect is achieved, the processing efficiency of events corresponding to the internet of things device is improved, and the operation burden of the internet of things cloud platform is reduced.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present invention.
In an embodiment, a device cooperation apparatus is provided, where the device cooperation apparatus corresponds to the device cooperation processing method in the above embodiment one by one. As shown in fig. 8, the device cooperation apparatus includes a task reception module 801 to be processed, a second data acquisition module 802, a second data transmission module 803, and a second data storage module 804. The functional modules are described in detail as follows:
A task to be processed receiving module 801, configured to receive a task to be processed sent by a first device, where the task to be processed includes a task type and first data;
the second data obtaining module 802 is configured to perform cooperative processing on the first data by using a target cooperative microservice corresponding to the task type, to obtain second data;
a second data sending module 803, configured to send second data to a second device corresponding to the second device identifier if the task to be processed includes the second device identifier;
the second data storage module 804 is configured to store the second data in the local memory if the task to be processed does not include the second device identifier.
In one embodiment, the second data acquisition module 802 includes:
the first equipment protocol confirming unit is used for determining a first equipment protocol corresponding to the first equipment identifier according to the first equipment identifier if the task type is a protocol access task;
and the second data acquisition unit is used for adopting a protocol access micro service corresponding to the protocol access task to perform protocol access cooperative processing on the first equipment protocol and the first equipment attribute so as to acquire second data.
In one embodiment, the second data acquisition module 802 includes:
The second equipment protocol determining unit is used for determining a second equipment protocol corresponding to the second equipment identifier according to the second equipment identifier if the task type comprises a command issuing task;
and the second data acquisition unit is used for adopting a command issuing micro service corresponding to the command issuing task to perform data conversion cooperative processing on the second equipment protocol and the command operation content so as to acquire second data.
In one embodiment, the second data acquisition module 802 includes:
the local rule engine detection unit is used for judging whether a local rule engine corresponding to the engine version identifier exists in the local memory according to the engine version identifier if the task type comprises the engine synchronization task;
the second data acquisition unit is used for checking the local rule engine by adopting a first engine synchronization micro-service corresponding to the engine synchronization task if the local rule engine exists, so as to acquire second data; and if the local rule engine does not exist, performing engine synchronization collaborative processing on the version rule engine corresponding to the engine version identifier by adopting a second engine synchronization micro-service corresponding to the engine synchronization task to acquire second data.
In one embodiment, the second data acquisition module 802 includes:
The first equipment protocol confirming unit is used for determining a first equipment protocol corresponding to the first equipment identifier according to the first equipment identifier if the task type comprises a data uploading task;
the second data acquisition unit is used for adopting a data uploading micro-service corresponding to the data uploading task to perform data conversion on the first equipment protocol and the first data so as to acquire second data.
In one embodiment, second data storage module 804 includes:
the first equipment rule confirming unit is used for adopting a local rule engine to carry out rule matching according to the first equipment identifier so as to confirm the first equipment rule;
the engine identification result acquisition unit is used for identifying the second data according to the first equipment rule and acquiring an engine identification result;
and the command issuing task generating unit is used for generating a command issuing task and command operation content if the engine identification result is that the local rule engine is satisfied.
For specific limitations of the device cooperation means, reference may be made to the above limitation of the device cooperation process method, and no further description is given here. The respective modules in the above-described apparatus cooperation device may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or independent of a processor in the edge gateway, or may be stored in software in a memory in the edge gateway, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, an edge gateway is provided, which may be a server, the internal structure of which may be as shown in fig. 8. The edge gateway includes a processor, memory, network interface, and database connected by a system bus. Wherein the processor of the edge gateway is configured to provide computing and control capabilities. The memory of the edge gateway comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the edge gateway is used for executing data adopted or generated in the process of the device collaborative processing method. The network interface of the edge gateway is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a device co-processing method.
In an embodiment, an internet of things system is provided, including an edge gateway, and further including an internet of things cloud platform and internet of things equipment in communication with the edge gateway; when the Internet of things cloud platform is the first equipment, the Internet of things equipment is the second equipment; or the internet of things device or the edge gateway is the first device, and the internet of things cloud platform is the second device.
In an embodiment, an edge gateway is provided, which includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor executes the computer program to implement the device co-processing method in the foregoing embodiment, for example, S201-S204 shown in fig. 2, or S201-S204 shown in fig. 7, and is not repeated here. Alternatively, the processor may implement the functions of the modules/units in this embodiment of the device cooperation apparatus when executing the computer program, for example, the functions of the task to be processed receiving module 801, the second data obtaining module 802, the second data sending module 803 and the second data storage module 804 shown in fig. 8, which are not described herein again for avoiding repetition.
In an embodiment, a computer readable storage medium is provided, and a computer program is stored on the computer readable storage medium, where the computer program is executed by a processor to implement the device co-processing method in the foregoing embodiment, for example, S201-S204 shown in fig. 2, or S201-S204 shown in fig. 3-7, which are not repeated herein. Alternatively, the computer program when executed by the processor implements the functions of the modules/units in this embodiment of the device cooperation apparatus, for example, the functions of the task receiving module 801 to be processed, the second data obtaining module 802, the second data sending module 803 and the second data storage module 804 shown in fig. 8, which are not described herein again for avoiding repetition.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions.
The above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention.

Claims (10)

1. A device co-processing method, comprising:
receiving a task to be processed sent by first equipment, wherein the task to be processed comprises a task type and first data;
Performing cooperative processing on the first data by adopting a target cooperative microservice corresponding to the task type to obtain second data;
if the task to be processed comprises a second equipment identifier, the second data is sent to second equipment corresponding to the second equipment identifier;
and if the task to be processed does not comprise the second equipment identifier, storing the second data in a local memory.
2. The device co-processing method of claim 1, wherein if the task type comprises a protocol access task, the task to be processed further comprises a first device identifier and a second device identifier, and the first data comprises a first device attribute;
the collaborative processing is performed on the first data by adopting the target collaborative micro-service corresponding to the task type, and the second data is obtained, including:
if the task type is a protocol access task, determining a first equipment protocol corresponding to the first equipment identifier according to the first equipment identifier;
and adopting the protocol access micro service corresponding to the protocol access task to perform protocol access cooperative processing on the first equipment protocol and the first equipment attribute to acquire second data.
3. The device co-processing method of claim 1, wherein if the task type includes a command issuing task, the task to be processed includes a second device identifier, and the first data includes command operation content;
the collaborative processing is performed on the first data by adopting the target collaborative micro-service corresponding to the task type, and the second data is obtained, including:
if the task type comprises a command issuing task, determining a second equipment protocol corresponding to the second equipment identifier according to the second equipment identifier;
and adopting a command issuing micro-service corresponding to the command issuing task to perform data conversion cooperative processing on the second equipment protocol and the command operation content, and obtaining second data.
4. The device co-processing method of claim 1, wherein if the task type comprises an engine synchronization task, the task to be processed comprises a second device identifier, and the first data comprises an engine version identifier;
the collaborative processing is performed on the first data by adopting the target collaborative micro-service corresponding to the task type, and the second data is obtained, including:
if the task type comprises an engine synchronous task, judging whether a local rule engine corresponding to the engine version identifier exists in a local memory according to the engine version identifier;
If the local rule engine exists, checking the local rule engine by adopting a first engine synchronization micro-service corresponding to the engine synchronization task to acquire second data;
and if the local rule engine does not exist, adopting a second engine synchronization micro-service corresponding to the engine synchronization task to perform engine synchronization collaborative processing on the version rule engine corresponding to the engine version identifier to acquire second data.
5. The device co-processing method of claim 1, wherein if the task type includes a data upload task, the task to be processed includes a first device identification but does not include a second device identification, the first data including a first device protocol;
the collaborative processing is performed on the first data by adopting the target collaborative micro-service corresponding to the task type, and the second data is obtained, including:
if the task type comprises a data uploading task, determining a first equipment protocol corresponding to the first equipment identifier according to the first equipment identifier;
and adopting the data uploading micro-service corresponding to the data uploading task to perform data conversion on the first equipment protocol and the first data, and obtaining second data.
6. The device cooperation processing method according to claim 1, wherein if the task to be processed does not include a second device identifier, after storing the second data in the local memory, the device cooperation processing method further includes:
adopting a local rule engine to perform rule matching according to the first equipment identifier, and confirming a first equipment rule;
identifying the second data according to the first equipment rule, and obtaining an engine identification result;
and if the engine identification result is that the local rule engine is satisfied, generating a command issuing task and command operation content.
7. A device cooperation apparatus, comprising:
the device comprises a task receiving module for receiving a task to be processed, which is sent by a first device, wherein the task to be processed comprises a task type and first data;
the second data acquisition module is used for carrying out cooperative processing on the first data by adopting a target cooperative micro service corresponding to the task type to acquire second data;
the second data sending module is used for sending the second data to second equipment corresponding to the second equipment identifier if the task to be processed comprises the second equipment identifier;
And the second data storage module is used for storing the second data in the local memory if the task to be processed does not comprise the second equipment identifier.
8. An edge gateway comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the device co-processing method of any of claims 1 to 6 when the computer program is executed.
9. An internet of things system comprising the edge gateway of claim 8, further comprising an internet of things cloud platform and internet of things device in communication with the edge gateway;
the internet of things cloud platform is the first device, and the internet of things device is the second device;
or the internet of things device or the edge gateway is the first device, and the internet of things cloud platform is the second device.
10. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the device co-processing method according to any one of claims 1 to 6.
CN202211531633.6A 2022-12-01 2022-12-01 Equipment cooperative processing method, device, edge gateway, system and storage medium Pending CN116319775A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211531633.6A CN116319775A (en) 2022-12-01 2022-12-01 Equipment cooperative processing method, device, edge gateway, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211531633.6A CN116319775A (en) 2022-12-01 2022-12-01 Equipment cooperative processing method, device, edge gateway, system and storage medium

Publications (1)

Publication Number Publication Date
CN116319775A true CN116319775A (en) 2023-06-23

Family

ID=86793009

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211531633.6A Pending CN116319775A (en) 2022-12-01 2022-12-01 Equipment cooperative processing method, device, edge gateway, system and storage medium

Country Status (1)

Country Link
CN (1) CN116319775A (en)

Similar Documents

Publication Publication Date Title
CN111401903B (en) Block chain message processing method, device, computer and readable storage medium
Zhang et al. An IoT-based online monitoring system for continuous steel casting
CN112714193A (en) Community data processing system, method, device and equipment based on Internet of things platform
CN111031034A (en) Multi-protocol convergence edge computing gateway
US10878323B2 (en) Rules engine combined with message routing
CN110602445B (en) Video monitoring data acquisition method and device, computer equipment and storage medium
CN115086379B (en) Numerical control machine tool data acquisition method based on edge calculation and virtualization technology
US20180324063A1 (en) Cloud-based system for device monitoring and control
CN112202795A (en) Data processing method, gateway equipment and medium
Azzara et al. The icsi m2m middleware for iot-based intelligent transportation systems
CN104618320A (en) Systems and methods for secure file transfers
CN111988397B (en) Earthquake-proof disaster-reduction disaster-relief method and system based on edge calculation
WO2022056927A1 (en) Gateway, data collection method, electronic device, storage medium, and program
CN101022364A (en) Trap message reporting method and system warning information resource/warning agent service device
CN116319775A (en) Equipment cooperative processing method, device, edge gateway, system and storage medium
CN108924773B (en) Message processing method and device
CN113794646B (en) Monitoring data transmission system and method for energy industry
CN113873033B (en) Intelligent edge computing gateway platform with fault-tolerant function
CN113452582A (en) Data transmission method, equipment, system and medium based on automatic analysis
CN109067861A (en) Communication means, device, equipment and medium based on Internet of Things
CN114745616A (en) Underground heat information remote monitoring and early warning system and method
CN113848834A (en) Workshop equipment access system and method based on edge cloud cooperation
CN113055201B (en) Electronic equipment control method and device, computer equipment and storage medium
CN114679472A (en) Communication system, method, apparatus, storage medium, and electronic device
CN111212120A (en) Thing allies oneself with middleware based on fire control thing networking data acquisition and transmission

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