CN115842861A - Edge connection device adaptation method, device and computer readable storage medium - Google Patents

Edge connection device adaptation method, device and computer readable storage medium Download PDF

Info

Publication number
CN115842861A
CN115842861A CN202211482755.0A CN202211482755A CN115842861A CN 115842861 A CN115842861 A CN 115842861A CN 202211482755 A CN202211482755 A CN 202211482755A CN 115842861 A CN115842861 A CN 115842861A
Authority
CN
China
Prior art keywords
format
format conversion
information
communication information
internet
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
CN202211482755.0A
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.)
Guangdong Industrial Edge Intelligent Innovation Center Co ltd
Original Assignee
Guangdong Industrial Edge Intelligent Innovation Center 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 Guangdong Industrial Edge Intelligent Innovation Center Co ltd filed Critical Guangdong Industrial Edge Intelligent Innovation Center Co ltd
Priority to CN202211482755.0A priority Critical patent/CN115842861A/en
Publication of CN115842861A publication Critical patent/CN115842861A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The embodiment of the application relates to the technical field of industrial internet, and discloses a method and a device for adapting edge connection equipment and a computer readable storage medium.

Description

Edge connection device adaptation method, device and computer readable storage medium
Technical Field
The embodiment of the invention relates to the technical field of industrial internet, in particular to an edge connection device adaptation method, an edge connection device adaptation device and a computer readable storage medium.
Background
The industrial internet is a novel infrastructure, an application mode and an industrial ecology deeply integrated by a new generation of information communication technology and industrial economy, and a brand new manufacturing and service system covering a whole industrial chain and a whole value chain is constructed by comprehensively connecting people, machines, objects, systems and the like, so that a realization way is provided for the industrial and even industrial digital, networked and intelligent development. Industrial internet is widely used in various industries at present, data acquisition of industrial equipment is one of important contents, acquired data is an important support for application on various industrial internet platforms, and data acquisition is mainly performed through an edge gateway at present, so that connection and adaptation between the edge gateway and the platforms are particularly important.
The existing connection scheme of the edge gateway and the platform is that the gateway and the platform are often directly connected and communicated, but due to the difference of manufacturers, types, protocols, data and the like of the gateway, the formats of communication messages sent when the gateway is connected with the platform are often different, the gateway cannot quickly access the platform, and the same gateway is often required to be secondarily developed when the same gateway is accessed to different industrial internet platforms, so that the time cost for connecting and deploying the edge gateway and the platform is higher.
Disclosure of Invention
In view of the foregoing problems, embodiments of the present invention provide an edge connection device adapting method, which is used to solve the problems in the prior art.
According to an aspect of the embodiments of the present invention, there is provided an edge connection device adapting method, including: acquiring a format conversion list, wherein the format conversion list comprises a plurality of format conversion templates;
acquiring first communication information of a first Internet of things platform and second communication information of a second Internet of things platform;
determining information characteristics of the first communication information and a second format of the second communication information according to the first communication information and the second communication information, wherein the information characteristics comprise the first format of the first communication information;
determining a target format conversion template from a plurality of format conversion templates in the format conversion list according to the information characteristics and the second format;
converting the first format of the first communication information into a second format according to the target format conversion template;
and sending the first communication information in the second format to the second networking platform.
In an optional manner, the determining, according to the first communication information and the second communication information, an information characteristic of the first communication information and a second format of the second communication information, where the information characteristic includes the first format of the first communication information, includes:
identifying the first communication information, determining the number of subdata contained in the first communication information, and using the number and the first format as information characteristics;
before determining the target format conversion template from the plurality of format conversion templates in the format conversion list according to the information characteristics and the second format, the edge connection device adaptation method further includes:
determining a format conversion template group from the format conversion list according to the number, wherein the format conversion template group comprises at least one format conversion template used for converting the number of the subdata;
determining a target format conversion template from a plurality of format conversion templates in the format conversion list according to the information characteristics and the second format, wherein the method comprises the following steps:
a target format conversion template is determined from the set of format conversion templates based on the information characteristic and the second format.
In an optional manner, the determining, according to the first communication information and the second communication information, an information characteristic of the first communication information and a second format of the second communication information, where the information characteristic includes the first format of the first communication information, includes:
identifying the first communication information, determining the type of subdata contained in the first communication information, and using the type and the first format as information characteristics;
before determining the target format conversion template from the plurality of format conversion templates in the format conversion list according to the information characteristics and the second format, the edge connection device adaptation method further includes:
determining a format conversion template group from the format conversion list according to the category, wherein the format conversion template group comprises at least one format conversion template used for converting the sub-data of the category;
determining a target format conversion template from a plurality of format conversion templates in the format conversion list according to the information characteristics and the second format, wherein the method comprises the following steps:
and determining the target format conversion template from the format conversion template group according to the information characteristic and the second format.
In an alternative mode, the determining a target format conversion template from a plurality of format conversion templates in the format conversion list according to the information feature and the second format includes:
determining a preliminary format conversion template from the format conversion list according to the first format, wherein the preliminary format conversion template comprises a plurality of format conversion templates for converting the first format into other formats;
and determining a target format conversion template from the preliminary format conversion templates according to the second format.
In an optional manner, before the obtaining the first communication information of the first internet of things platform and the second communication information of the second internet of things platform, the method for adapting an edge connection device further includes:
acquiring first registration information of a first Internet of things platform and second registration information of a second Internet of things platform;
judging whether first registration information of a first Internet of things platform meets a first condition or not, and simultaneously judging whether second registration information of a second Internet of things platform meets a second condition or not;
and if so, executing the step of acquiring the first communication information of the first Internet of things platform and the second communication information of the second Internet of things platform.
In an optional manner, the obtaining first registration information of a first internet of things platform and second registration information of a second internet of things platform includes:
acquiring a first ID, a first manufacturer, a first main parameter and first communication channel information of a first Internet of things platform;
and acquiring a second ID, a second manufacturer, a second main parameter and second communication channel information of the second networking platform.
In an optional manner, before the obtaining the first communication information of the first internet of things platform and the second communication information of the second internet of things platform, the method for adapting an edge connection device further includes:
acquiring first historical registration information of a first Internet of things platform and second historical registration information of a second Internet of things platform in the last operation;
judging whether the first historical registration information is the same as the first registration information or not and whether the second historical registration information is the same as the second registration information or not;
if yes, determining the historical format conversion template in the last operation as a target format conversion template, executing the step of acquiring the first communication information of the first Internet of things platform and the second communication information of the second Internet of things platform, and then jumping to the step of converting the first format of the first communication information into the second format according to the target format conversion template.
According to another aspect of the embodiments of the present invention, there is provided an edge connecting device adapting apparatus, including:
the first acquisition module is used for acquiring a format conversion list, and the format conversion list comprises a plurality of format conversion templates;
the second acquisition module is used for acquiring first communication information of the first Internet of things platform and second communication information of the second Internet of things platform;
the first determining module is used for determining the information characteristics of the first communication information and the second format of the second communication information according to the first communication information and the second communication information, wherein the information characteristics comprise the first format of the first communication information;
the second determining module is used for determining a target format conversion template from a plurality of format conversion templates in the format conversion list according to the information characteristics and the second format;
the format conversion module is used for converting the first format of the first communication information into the second format according to the target format conversion template;
and the sending module is used for sending the first communication information in the second format to the second networking platform.
According to another aspect of the embodiments of the present invention, there is provided an edge connection device adapting device including:
the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one program, and the program enables the processor to execute the operation of the edge connecting device adapting method.
According to still another aspect of the embodiments of the present invention, there is provided a computer-readable storage medium having at least one program stored therein, the program causing an edge connection device adaptation apparatus to perform operations corresponding to the method described above.
According to the edge connection equipment adapting method, the edge connection equipment adapting device and the computer readable storage medium, a format conversion list comprising a plurality of format conversion templates is obtained in advance, a target format conversion template needed to be used is determined from the format conversion list according to the formats of first communication information and second communication information of a first Internet of things platform and a second Internet of things platform, the information format of the first Internet of things platform is converted into the information format of the second Internet of things platform through the target format conversion template and is sent, and therefore quick and convenient connection and adaptation between the first Internet of things platform and the second Internet of things platform are achieved.
The foregoing description is only an overview of the technical solutions of the embodiments of the present invention, and the embodiments of the present invention can be implemented according to the content of the description in order to make the technical means of the embodiments of the present invention more clearly understood, and the detailed description of the present invention is provided below in order to make the foregoing and other objects, features, and advantages of the embodiments of the present invention more clearly understandable.
Drawings
The drawings are only for purposes of illustrating embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a schematic flowchart illustrating an edge connection device adapting method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart illustrating a first embodiment of an edge connection device adapting method according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a second embodiment of an edge connection device adapting method according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating a third embodiment of an edge connection device adapting method according to an embodiment of the present invention;
fig. 5 is a schematic flowchart illustrating a fourth embodiment of an edge connection device adapting method according to an embodiment of the present invention;
fig. 6 is a flowchart illustrating a fifth embodiment of an edge connection device adapting method according to an embodiment of the present invention;
fig. 7 is a flowchart illustrating a sixth embodiment of an edge connection device adapting method according to an embodiment of the present invention;
fig. 8 shows a functional block diagram of an edge connecting device adapting apparatus provided by an embodiment of the present invention;
fig. 9 is a schematic structural diagram of an edge connecting device adapting device according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein.
Aiming at the connection and adaptation mode of the edge gateway and the platform which is common at present, the inventor notices that the existing connection scheme of the edge gateway and the platform is usually to directly connect and communicate the gateway and the platform, but because the manufacturers, types, protocols, data and the like of the gateway are different, the formats of communication messages sent when the gateway is connected with the platform are also different, the gateway cannot realize quick access to the platform, and the same gateway is usually required to be developed secondarily when the same gateway is accessed into different industrial internet platforms, so that the time cost for connection and deployment of the edge gateway and the platform is higher, and therefore, it is particularly important to research a high-efficiency method for connection and adaptation of the gateway and the platform.
In order to solve the above problems, the inventor of the present application has designed an edge connection device adaptation method through research, and by obtaining a format conversion list including multiple format conversion templates in advance, determining a target format conversion template to be used from the format conversion list according to formats of first communication information and second communication information of a first internet of things platform and a second internet of things platform, and converting an information format of the first internet of things platform into an information format of the second internet of things platform through the target format conversion template and sending the information format, a quick and convenient connection and adaptation between the first internet of things platform and the second internet of things platform are realized.
Fig. 1 shows a flowchart of an edge connection device adaptation method provided in an embodiment of the present invention, where the method is executed by an edge connection device adaptation device, and the edge connection device adaptation device may specifically be a connection management device that is separately arranged and connected between a first internet of things platform and a second internet of things platform, or may be the first internet of things platform or the second internet of things platform, so that in a process of interactive communication between the first internet of things platform and the second internet of things platform, a format of communication information is converted by the first internet of things platform or the second internet of things platform. As shown in fig. 1, the method comprises the steps of:
step 110: a format conversion list is obtained, and the format conversion list comprises a plurality of format conversion templates.
In this step, the format conversion list is a plurality of format conversion templates generated in advance, the generation manner of the format conversion list may be manually written, and a technician writes conversion manners between a plurality of commonly used formats in the field into the templates, for example, if the commonly used formats in the field include an xml format and a json format, two format conversion templates for converting the json format and the json format may be written, where both the two format conversion templates include commonly used sub-data in the field, and the sub-data refers to a plurality of different types of information included in the same piece of communication information, for example, the communication information in the xml format may include GatewaySrv, platnforddr and PlcProtocol sub-data. The sub-data are all field-used sub-data, and a person skilled in the art can write the format conversion mode corresponding to each field-used sub-data into the format conversion template in advance according to the field-used sub-data.
Because the subdata recording the IP and the port in the xml format can represent the IP and the port simultaneously, and the two data in the json format need to be represented by the two subdata, whether the entry in the xml format contains the two data can be judged in a format conversion template in a segmentation mode, and if so, the port data is newly added into an independent entry GatewayComm. Those skilled in the art can make adaptive adjustment on the format conversion mode in the conversion template according to the characteristics of different formats according to actual situations to ensure the stability after format conversion, including but not limited to splitting, merging and changing the sub-data, which is not particularly limited in the embodiment of the present application.
In this step, acquiring the format conversion list refers to reading data in the format conversion list for standby, so as to provide a data base for the subsequent steps.
Step 120: and acquiring first communication information of the first Internet of things platform and second communication information of the second Internet of things platform.
In this step, the first internet of things platform and the second internet of things platform may be gateways or industrial software running on the industrial internet platforms, or may also be any other virtual platform or device having a software running environment, and the device running the method provided by the present application may be the first internet of things platform or the second internet of things platform itself, or may also be an additional device that bears connection transfer between the first internet of things platform and the second internet of things platform, which is not particularly limited in this embodiment of the present application.
In this step, acquiring the first communication information of the first internet of things platform means receiving the communication information of the first internet of things platform, and may be acquired by directly establishing a connection with the first internet of things platform, or by operating the method provided by the present application on the first internet of things platform or the second internet of things platform, or may be operated on an additional device and acquire the first communication information and the second communication information of the first internet of things platform and the second internet of things platform in a manner of using the additional device as a relay, where the second internet of things platform is the same as the first internet of things platform. For example, a first internet of things platform is connected with equipment for operating the method provided by the application, and a second internet of things platform is connected with equipment for operating the method provided by the application, that is, equipment for operating the method provided by the application is used as a transfer between the first internet of things platform and the second internet of things platform, and at the moment, communication information of the first internet of things platform and communication information of the second internet of things platform are both transmitted through the equipment for operating the method provided by the application, so that the first communication information of the first internet of things platform and the second communication information of the second internet of things platform can be conveniently obtained.
In this step, the first Internet of things platform, the second Internet of things platform, and the device operated by the method provided by the present application may be connected through an Internet Protocol (Internet Protocol) -based connection, such as an MQTT Protocol, an AMQP Protocol, a CoAP Protocol, and the like, or may directly obtain data through a data transmission Protocol based on a serial port, which is not particularly limited in this application.
In this step, there may be a plurality of first internet of things platforms and a plurality of second internet of things platforms, and a device operating the method provided in the present application may communicate the plurality of first internet of things platforms and the plurality of second internet of things platforms through any connection manner or protocol.
Step 130: and determining the information characteristics of the first communication information and the second format of the second communication information according to the first communication information and the second communication information, wherein the information characteristics comprise the first format of the first communication information.
In this step, according to the first communication information and the second communication information obtained in step 120, the features and the formats of the first communication information and the second communication information are analyzed, and the formats of the first communication information and the second communication information can be determined, and other information features of the first communication information can be obtained at the same time.
In this step, the information characteristic refers to a set of data that may include characteristics such as format, data type, and number of entries of the first communication information, and the data in the information characteristic may be obtained by performing data analysis or data classification on the first communication information.
The first format and the second format are text formats of the first information and the second information, for example, the first format and the second format may be json, xml or sql, and the first format and the second format may be obtained by identifying any format identification manner.
Step 140: and determining a target format conversion template from the plurality of format conversion templates in the format conversion list according to the information characteristic and the second format.
In this step, the target format conversion template may be determined in the format conversion list according to the first format included in the second format information feature, specifically, one or more format conversion templates that convert the first format into another format in the format conversion list are screened out through the first format, and then the format conversion template that converts the first format into the second format is determined from the one or more screened out format conversion templates through the second format, or a format conversion template that includes the first format converted into the second format is directly searched for in the format conversion list through the first format and the second format, specifically, a required target format conversion template may be determined from the format conversion list according to the first format and the second format in different manners according to actual needs, which is not particularly limited in the embodiment of the present application.
Step 150: the first format of the first communication information is converted to a second format according to the target format conversion template.
In this step, the manner of converting the first format of the first communication information into the second format according to the target format conversion template determined in step 140 may specifically be: inputting each piece of sub-data contained in the first communication information into a target format conversion template correspondingly, converting each piece of sub-data in the target format conversion template and outputting first information forming a new second format, for example, if the first format is xml format, the second format is json format, and the first information in xml format includes two pieces of sub-data, namely GatewaySrv and PlatformAddr, the target format conversion template for converting xml format into json format includes conversion statements for converting the sub-data GatewaySrv and PlatformAddr in xml format into sub-data GatewaySrv and PlatformAddr in json format respectively, and finally outputting the sub-data GatewaySrv and PlatformAddr in json format through the target format conversion template.
The target conversion template may also adopt other conversion manners, so as to ensure that each subdata included in the first communication information may be subjected to format conversion correspondingly, that is, any conversion means for extracting data of the first communication information and then correspondingly placing the data into a new format may be adopted, which is not particularly limited in this embodiment of the application.
Step 160: and sending the first communication information in the second format to the second networking platform.
In this step, the first communication information converted into the second format is sent to the second networking platform, and the format of the first communication information is consistent with the format which can be recognized by the second networking platform.
The sending of the first communication information in the second format of the first internet of things platform to the second internet of things platform can be one-to-one, that is, one first internet of things platform corresponds to one second internet of things platform to send, and can also be one-to-many, many-to-one or many-to-many.
The method comprises the steps of obtaining a preset format conversion list comprising a plurality of format conversion templates, obtaining first communication information of a first Internet of things platform and second communication information of a second Internet of things platform, obtaining a first format of the first communication information and a second format of the second communication information, determining a target format conversion template in the format conversion list according to the first format and the second format, converting the first format of the first information into the second format which can be identified by the second Internet of things platform according to the target format conversion template, and sending the second format to the second Internet of things platform, so that the second Internet of things platform can directly identify the first communication information sent by the first Internet of things platform, the first Internet of things platform or the second Internet of things platform does not need to be changed, the time of connection and deployment between equipment is shortened, and the difficulty and cost of connection and deployment between the equipment are reduced.
As shown in fig. 2, in an embodiment of the present application, step 130 further includes:
step 131: the first communication information is identified, the number of the subdata contained in the first communication information is determined, and the number and the first format are jointly used as information characteristics.
The method includes the steps of identifying the number of subdata contained in first communication information according to different first formats of the first communication information, performing index query on data in a corresponding conventional manner for different information formats, identifying the number of subdata contained in the first communication information in a text keyword retrieval manner, for example, establishing a query list containing all possible fields in the field according to the conventional communication information types when industrial equipment data collection is performed in the field, sequentially querying the corresponding fields gatewaySrv, platformPaddr, cpuUser, cpuSys and MemFree in the first communication information according to the query list, and analyzing the number of subdata according to query results and the format of the first communication information. Similarly, the number of the sub data can be obtained for the first communication information in other formats by adopting the query method, as long as the format of the first communication information has readable text. The number of the sub-data of the first communication information may be identified in different manners according to actual situations, which is not particularly limited in the embodiment of the present application.
As shown in fig. 2, in an embodiment of the present application, before step 140, further includes:
step 1401: a set of format conversion templates is determined from the format conversion list based on the quantity, the set of format conversion templates including at least one format conversion template for converting the quantity of sub-data.
For example, the first format conversion template in the format conversion list includes 2 pieces of sub data, gatewaySrv and PlatformAddr, and the second format conversion template includes 6 pieces of sub data, which are GatewaySrv, platformAddr, cpuuer, cpuSys, memFree and MemUsed, respectively, and if the number of the sub data included in the identified first communication information is 6, all the format conversion templates including the 6 pieces of sub data may be determined from the format conversion list to be used together as the format conversion template group, that is, the format conversion template group includes the second format conversion template and does not include the first format conversion template.
As shown in fig. 2, in one embodiment of the present application, step 140 further comprises:
step 141: a target format conversion template is determined from the set of format conversion templates based on the information characteristic and the second format.
The format conversion template group is determined according to the number of the subdata contained in the information characteristics, namely the format conversion template group contains a plurality of format conversion templates for converting different formats, each format conversion template carries out format conversion on the subdata with the same number, and a format conversion template for converting the subdata into a second format is found in the format conversion template group, namely the format conversion template can be determined to be a target format conversion template.
Through the steps 131, 1401 and 141, the number of the sub-data in the first communication information is added in the information characteristics as the condition for determining the format conversion template, so that the number of the finally determined sub-data of the target format conversion template is consistent with the first communication information, errors caused by the fact that the number of the sub-data is not consistent when the format conversion is performed on the first communication information through the target format conversion template are not easy to occur, and the stability of the format conversion is improved.
As shown in fig. 3, in an embodiment of the present application, step 130 further includes:
step 132: the first communication information is identified, the type of the sub data contained in the first communication information is determined, and the type and the first format are used as the information characteristics together.
The identification method of the type of the sub-data included in the first communication information may be multiple types, for example, the json-format first communication information includes platformmaddr and PlcProtocol, the type of the sub-data included in the first communication information is obtained as platformmaddr and PlcProtocol after identification, the identification method of the type of the sub-data included in the first communication information may be multiple types, for example, names of sub-data types commonly used in the field are sequentially searched, if a name of a certain sub-data type exists in the first communication information, it is understood that the first communication information includes the sub-data of the type, the search is repeated until the names of the sub-data types in the field are completely searched, and the names of the sub-data types searched are stored in the information feature. In some embodiments, the type of the sub-data included in the first communication information may be identified in other manners, for example, an identification model is generated by combining machine learning with the type information of the sub-data commonly used in the art, and the type of the sub-data included in the first communication information is identified by the identification model.
As shown in fig. 3, in an embodiment of the present application, before step 140, further includes:
step 1402: a set of format conversion templates is determined from the format conversion list according to the category, the set of format conversion templates including at least one format conversion template for converting the sub data of the category.
For example, the first format conversion template in the format conversion list includes partial data PlatformAddr and PlcProtocol, the second format conversion template includes partial data MemFree and MemUsed, and if it is recognized that the data type included in the first communication information is PlatformAddr and PlcProtocol, it may be determined from the format conversion list that all format conversion templates including data of PlatformAddr and PlcProtocol are used together as a format conversion template group, that is, the format conversion template group includes the first format conversion template and does not include the second format conversion template.
As shown in fig. 3, in one embodiment of the present application, step 140 further comprises:
step 142: a target format conversion template is determined from the set of format conversion templates based on the information characteristic and the second format.
The format conversion template group is determined according to the type of the subdata contained in the information characteristics, namely the format conversion template group contains a plurality of format conversion templates for converting different formats, each format conversion template carries out format conversion on the subdata of the same type, and a format conversion template for converting the subdata into a second format is found in the format conversion template group, namely the format conversion template can be determined to be a target format conversion template.
Wherein, step 131 may be executed simultaneously with step 132 or in any order, when step 131 and step 132 are executed for the same first communication information, the number and the type are included in the information feature at the same time, the subsequent steps should make the format conversion templates included in the format conversion template group satisfy the condition that the number and the type are both consistent with the number and the type in the information feature at the same time when determining the format conversion template group, and step 141 and step 142 may execute only any one of them, and those skilled in the art may make order adjustment for determining the target format conversion template most beneficial to the above steps according to the actual situation, and the execution order of the above steps is not particularly limited by the embodiment of the present application.
Through the steps 132, 1402 and 142, the type of the sub data in the first communication information is added to the information characteristics as the condition for determining the format conversion template, so that the finally determined type of the sub data of the target format conversion template is consistent with the first communication information, errors caused by different types of the sub data are not easy to occur when the format conversion is performed on the first communication information through the target format conversion template, and the stability of the format conversion is improved.
As shown in fig. 4, in an embodiment of the present application, step 130 further includes:
step 131: identifying the first communication information, determining the number of subdata contained in the first communication information, and using the number and the first format as information characteristics;
step 132: the first communication information is identified, the type of the sub data contained in the first communication information is determined, and the type and the first format are used as the information characteristics together.
By simultaneously using the number and the type of the subdata as the information characteristics, the information characteristics comprise more information in the first communication information, so that the format conversion template can be more accurately determined in the subsequent steps.
As shown in fig. 4, in an embodiment of the present application, before step 140, further including:
step 1401: determining a format conversion template group from the format conversion list according to the number, wherein the format conversion template group comprises at least one format conversion template used for converting the number of the subdata;
step 1402: a set of format conversion templates is determined from the format conversion list according to the category, the set of format conversion templates including at least one format conversion template for converting the sub data of the category.
In step 1401 and step 1402, those skilled in the art may determine the format conversion template groups in the format conversion list according to the number and the type in different manners or sequences according to actual situations, for example, the format conversion template groups may be determined according to the number and the type at the same time, or may be determined according to the number and the type respectively, so as to obtain two format conversion template groups, in order to determine the most suitable format conversion template group by adding more parameters according to the first communication information, so as to provide a more accurate data base for the determination of the target format conversion template in the subsequent step.
By determining the set of format conversion templates in the format conversion list by quantity and type, the determination of the target format conversion template in the subsequent step can be made more accurate.
As shown in fig. 4, in one embodiment of the present application, step 140 further comprises:
step 141: a target format conversion template is determined from the set of format conversion templates based on the information characteristic and the second format.
As shown in fig. 5, in one embodiment of the present application, step 140 further comprises:
step 143: determining a preliminary format conversion template from the format conversion list according to the first format, wherein the preliminary format conversion template comprises at least one format conversion template used for converting the first format into other formats;
step 144: and determining a target format conversion template from the preliminary format conversion templates according to the second format.
In step 143, a preliminary format conversion template is determined from the format conversion list based on the first format in the following manner: the format conversion list includes: A-B, A-C, A-D, B-A, B-C, B-D, C-A, C-B, C-D, D-A, D-B, D-C, wherein A, B, C and D respectively represent ase:Sub>A plurality of different formats, A-B represents ase:Sub>A format conversion template for converting the format A into the format B, and when the first format is B, the format conversion template for converting the format B is required, so that the template for converting the format B is screened out of the format conversion list: B-A, B-C, B-D. The preliminary format conversion templates include B-ase:Sub>A, B-C, and B-D.
In step 144, ase:Sub>A format conversion template for converting the first format into the second format is found from the preliminary format conversion templates according to the second format, for example, if the second format is C and the preliminary format conversion templates include B-ase:Sub>A, B-C, and B-D, the format conversion templates B-C may be determined as the target format conversion templates.
Through steps 143 and 144, the determination of the target conversion template follows the basic rule of format conversion, i.e. the format conversion sequence of the template should be consistent with the actually required format conversion sequence, so that the problem of determining the format conversion template with the reverse format conversion sequence from the format conversion list according to the first format and the second format is avoided, and the failure rate during format conversion is reduced.
As shown in fig. 6, in an embodiment of the present application, before step 120, further includes:
step 1201: acquiring first registration information of a first Internet of things platform and second registration information of a second Internet of things platform;
step 1202: judging whether the first registration information of the first Internet of things platform meets a first condition or not, and simultaneously judging whether the second registration information of the second Internet of things platform meets a second condition or not;
if the judgment result is yes, the following steps are executed:
step 120: and acquiring first communication information of the first Internet of things platform and second communication information of the second Internet of things platform.
In step 1201, the first registration information and the second registration information may be software IDs or gateway IDs of the first internet of things platform and the second internet of things platform, manufacturers of devices or software, major parameters of the devices or software (version numbers and identification codes of software or hardware, etc.), communication channel information, and the like, so as to provide identity determination for the subsequent steps, and determine whether the first internet of things platform to which the first registration information belongs or the second internet of things platform to which the second registration information belongs is a target required by the current operation. The content included in the first registration information and the second registration information may be changed according to the actual situation as long as the device or the software can be identified, and this is not particularly limited in the embodiment of the present application.
In step 1202, a first condition and a second condition should be set according to registration information of target equipment or software currently operating, when acquired first registration information meets a first condition, a first internet of things platform to which the first registration information belongs may be considered as a correct connection target, when acquired second registration information meets a second condition, a second internet of things platform to which the second registration information belongs may be considered as a correct connection target, and a subsequent normal connection operation step may be executed.
Through the steps 1201 and 1202, before connection communication between the first internet of things platform and the second internet of things platform is performed, whether the first internet of things platform is determined as target equipment or software which needs to be connected in operation or not is verified, data security is improved, and normal operation is prevented from being influenced by the equipment or software which is connected in error.
As shown in fig. 6, in an embodiment of the present application, step 1201 further includes:
step 12011: acquiring a first ID, a first manufacturer, a first main parameter and first communication channel information of a first Internet of things platform;
step 12012: and acquiring a second ID, a second manufacturer, a second main parameter and second communication channel information of the second networking platform.
In steps 12011 and 12012, acquiring various information as the first registration information and the second registration information may improve the accuracy of the verification in steps 1201 to 1203, further avoiding performing a job on a wrong device or software.
As shown in fig. 7, in an embodiment of the present application, before step 120, further includes:
step 1203: acquiring first historical registration information of a first Internet of things platform and second historical registration information of a second Internet of things platform in the last operation;
step 1204: and judging whether the first historical registration information is the same as the first registration information or not and whether the second historical registration information is the same as the second registration information or not.
If the judgment result is yes, the following steps are executed:
step 1205: the history format conversion template in the last job is determined as the target format conversion template, and step 120 is performed, followed by jumping to step 150.
In step 1203, the first history registration information of the first internet of things platform and the second history registration information of the second internet of things platform in the last operation refer to the registration information of the first internet of things platform and the second internet of things platform that have been determined as the target device or software in the last normal operation, so as to obtain the registration information of the device or software in the last normal operation for verification in the subsequent steps.
In steps 1204 and 1205, the first registration information and the second registration information that are currently obtained are determined, and if the registration information of the previous normal job is correspondingly consistent, it can be understood that the target software or device of the job is consistent with the previous job, and therefore their target format conversion templates may also follow the target format conversion template determined when the previous job was used.
Through the steps 1203, 1204 and 1205, the registration information of the software or device of the current job and the registration information of the software or device of the last job are compared and judged, and if the registration information of the software or device of the current job is consistent with the registration information of the software or device of the last job, the soft nail or the device of the current job can be considered to be the same as the soft nail or the device of the last job, so that the target format conversion template which is determined by the last job can be directly followed without repeatedly determining the target format conversion template, the working efficiency is improved, the working process is shortened, and the time cost is saved
Fig. 8 shows a functional block diagram of an edge connecting device adapting apparatus 800 according to an embodiment of the present invention. As shown in fig. 8, the edge connecting apparatus adapting device 800 includes: a first obtaining module 810, a second obtaining module 820, a first determining module 830, a second determining module 840, a format converting module 850, and a sending module 860.
A first obtaining module 810, configured to obtain a format conversion list, where the format conversion list includes multiple format conversion templates;
a second obtaining module 820, configured to obtain first communication information of a first internet of things platform and second communication information of a second internet of things platform;
a first determining module 830, configured to determine, according to the first communication information and the second communication information, an information characteristic of the first communication information and a second format of the second communication information, where the information characteristic includes the first format of the first communication information;
a second determining module 840, configured to determine a target format conversion template from multiple format conversion templates in the format conversion list according to the information characteristic and the second format;
a format conversion module 850 for converting a first format of the first communication information into a second format according to the target format conversion template;
a sending module 860, configured to send the first communication information in the second format to the second networking platform.
In some embodiments, the first determining module 830 further comprises:
and the first identification unit is used for identifying the first communication information, determining the number of the subdata contained in the first communication information, and using the number and the first format as information characteristics.
In some embodiments, the edge connecting device adapting apparatus 800 further comprises:
and the first calculation module is used for determining a format conversion template group from the format conversion list according to the number, and the format conversion template group comprises at least one format conversion template used for converting the number of the sub data.
In some embodiments, the second determining module 840 further comprises:
and the first calculating unit is used for determining the target format conversion template from the format conversion template group according to the information characteristics and the second format.
In some embodiments, the first determining module 830 further comprises:
and a second identification unit configured to identify the first communication information, determine a type of sub-data included in the first communication information, and use the type and the first format as information characteristics.
In some embodiments, the edge connecting device adapting apparatus 800 further comprises:
and the second calculation module is used for determining a format conversion template group from the format conversion list according to the category, and the format conversion template group comprises at least one format conversion template used for converting the sub-data of the category.
In some embodiments, the second determining module 840 further comprises:
and the second calculating unit is used for determining the target format conversion template from the format conversion template group according to the information characteristics and the second format.
In some embodiments, the second determining module 840 further comprises:
the third calculation unit is used for determining a preliminary format conversion template from the format conversion list according to the first format, and the preliminary format conversion template comprises a plurality of format conversion templates used for converting the first format into other formats;
and the fourth calculating unit is used for determining the target format conversion template from the preliminary format conversion templates according to the second format.
In some embodiments, the edge connecting device adapting apparatus 800 further comprises:
the third computing module is used for acquiring first registration information of the first Internet of things platform and second registration information of the second Internet of things platform;
the fourth calculation module is used for judging whether the first registration information of the first Internet of things platform meets the first condition or not and judging whether the second registration information of the second Internet of things platform meets the second condition or not;
and the fifth calculation module is used for executing the step of determining the information characteristics of the first communication information and the second format of the second communication information according to the first communication information and the second communication information when the first registration information of the first internet of things platform meets the first condition and the second registration information of the second internet of things platform meets the second condition, wherein the information characteristics comprise the first format of the first communication information.
In some embodiments, the third calculation module further comprises:
the fifth calculation unit is used for acquiring a first ID, a first manufacturer, a first main parameter and first communication channel information of the first Internet of things platform;
and the sixth calculating unit is used for acquiring the second ID, the second manufacturer, the second main parameter and the second communication channel information of the second networking platform.
In some embodiments, the edge connecting device adapting apparatus 800 further comprises:
the sixth computing module is used for acquiring first historical registration information of the first internet of things platform and second historical registration information of the second internet of things platform in the last operation;
the seventh calculation module is used for judging whether the first historical registration information is the same as the first registration information or not and whether the second historical registration information is the same as the second registration information or not;
and the eighth calculating module is used for determining the historical format conversion template in the last operation as a target format conversion template when the first historical registration information is the same as the first registration information and the second historical registration information is the same as the second registration information, executing the step of acquiring the first communication information of the first internet of things platform and the second communication information of the second internet of things platform, and then jumping to the step of converting the first format of the first communication information into the second format according to the target format conversion template.
Fig. 9 is a schematic structural diagram illustrating an edge connecting device adapting device according to an embodiment of the present invention, where the embodiment of the present invention does not limit the specific implementation of the edge connecting device adapting device.
As shown in fig. 9, the edge connection device adapting apparatus may include: a processor 902, a memory 906, a communication interface 904, and a communication bus 908.
Processor 902, memory 906 and communication interface 904 communicate with one another via a communication bus 908.
The memory 906 is used for storing at least one program 910, and the program 910 causes the processor 902 to execute the relevant steps in the above-mentioned embodiment of the edge connect device adapting method.
An embodiment of the present invention further provides a computer-readable storage medium, where at least one program is stored in the storage medium, and when the program runs on the edge connection device adaptation apparatus, the edge connection device adaptation apparatus may execute the edge connection device adaptation method in any method embodiment described above.
The algorithms or displays presented herein are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. In addition, embodiments of the present invention are not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the embodiments of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the invention and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components in the embodiments may be combined into one module or unit or component, and may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names. The steps in the above embodiments should not be construed as limiting the order of execution unless specified otherwise.

Claims (10)

1. An edge connection device adapting method, comprising:
acquiring a format conversion list, wherein the format conversion list comprises a plurality of format conversion templates;
acquiring first communication information of a first Internet of things platform and second communication information of a second Internet of things platform;
determining information characteristics of the first communication information and a second format of the second communication information according to the first communication information and the second communication information, wherein the information characteristics comprise a first format of the first communication information;
determining a target format conversion template from a plurality of format conversion templates in the format conversion list according to the information characteristics and the second format;
converting the first format of the first communication information to the second format according to the target format conversion template;
and sending the first communication information in the second format to the second networking platform.
2. The edge connection device adapting method according to claim 1, wherein the determining, from the first communication information and the second communication information, an information characteristic of the first communication information and a second format of the second communication information, the information characteristic including the first format of the first communication information, comprises:
identifying the first communication information, determining the number of subdata contained in the first communication information, and using the number and the first format together as the information characteristic;
before determining a target format conversion template from the plurality of format conversion templates in the format conversion list according to the information characteristic and the second format, the method for adapting the edge connection device further includes:
determining a format conversion template group from the format conversion list according to the number, wherein the format conversion template group comprises at least one format conversion template used for converting the number of the subdata;
determining a target format conversion template from a plurality of format conversion templates in the format conversion list according to the information characteristic and the second format, including:
and determining the target format conversion template from the format conversion template group according to the information characteristic and the second format.
3. The edge connection device adapting method according to claim 1, wherein the determining, from the first communication information and the second communication information, an information characteristic of the first communication information and a second format of the second communication information, the information characteristic including the first format of the first communication information, comprises:
identifying the first communication information, determining the type of subdata contained in the first communication information, and using the type and the first format as the information characteristic;
before determining a target format conversion template from the plurality of format conversion templates in the format conversion list according to the information characteristic and the second format, the method for adapting the edge connection device further includes:
determining a format conversion template group from the format conversion list according to the category, wherein the format conversion template group comprises at least one format conversion template used for converting the sub-data of the category;
determining a target format conversion template from a plurality of format conversion templates in the format conversion list according to the information characteristic and the second format, including:
and determining the target format conversion template from the format conversion template group according to the information characteristic and the second format.
4. The edge attachment device adapting method according to any one of claims 1 to 3, wherein the determining a target format conversion template from a plurality of format conversion templates in the format conversion list according to the information characteristic and the second format comprises:
determining a preliminary format conversion template from the format conversion list according to the first format, wherein the preliminary format conversion template comprises at least one format conversion template used for converting the first format into other formats;
and determining the target format conversion template from the preliminary format conversion templates according to the second format.
5. The method for adapting an edge connection device according to claim 1, wherein before the obtaining the first communication information of the first internet of things platform and the second communication information of the second internet of things platform, the method further comprises:
acquiring first registration information of the first Internet of things platform and second registration information of the second Internet of things platform;
judging whether the first registration information of the first Internet of things platform meets a first condition or not, and simultaneously judging whether the second registration information of the second Internet of things platform meets a second condition or not;
and if so, executing the step of acquiring the first communication information of the first Internet of things platform and the second communication information of the second Internet of things platform.
6. The method for adapting an edge connection device according to claim 5, wherein the obtaining first registration information of the first platform of internet of things and second registration information of the second platform of internet of things comprises:
acquiring a first ID, a first manufacturer, a first main parameter and first communication channel information of the first Internet of things platform;
and acquiring a second ID, a second manufacturer, a second main parameter and second communication channel information of the second networking platform.
7. The method for adapting an edge connection device according to claim 5, wherein before the obtaining the first communication information of the first platform of internet of things and the second communication information of the second platform of internet of things, the method further comprises:
acquiring first historical registration information of the first Internet of things platform and second historical registration information of the second Internet of things platform in the last operation;
judging whether the first historical registration information is the same as the first registration information or not and whether the second historical registration information is the same as the second registration information or not;
if yes, determining a historical format conversion template in the last operation as the target format conversion template, executing the step of acquiring first communication information of a first Internet of things platform and second communication information of a second Internet of things platform, and then jumping to the step of converting the first format of the first communication information into the second format according to the target format conversion template.
8. An edge-connected device adapting apparatus, comprising:
the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a format conversion list, and the format conversion list comprises a plurality of format conversion templates;
the second acquisition module is used for acquiring first communication information of the first Internet of things platform and second communication information of the second Internet of things platform;
a first determining module, configured to determine, according to the first communication information and the second communication information, an information feature of the first communication information and a second format of the second communication information, where the information feature includes a first format of the first communication information;
a second determining module, configured to determine a target format conversion template from among the plurality of format conversion templates in the format conversion list according to the information feature and the second format;
a format conversion module for converting the first format of the first communication information into the second format according to the target format conversion template;
and the sending module is used for sending the first communication information in the second format to the second networking platform.
9. An edge connect device adapter device, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is configured to store at least one program that causes the processor to perform the operations of the edge connect device adaptation method of any of claims 1-7.
10. A computer-readable storage medium, in which at least one program is stored, which, when run on an edge connection device adaptation apparatus, causes the edge connection device adaptation apparatus to perform operations of the edge connection device adaptation method according to any one of claims 1 to 7.
CN202211482755.0A 2022-11-24 2022-11-24 Edge connection device adaptation method, device and computer readable storage medium Pending CN115842861A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211482755.0A CN115842861A (en) 2022-11-24 2022-11-24 Edge connection device adaptation method, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211482755.0A CN115842861A (en) 2022-11-24 2022-11-24 Edge connection device adaptation method, device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN115842861A true CN115842861A (en) 2023-03-24

Family

ID=85575994

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211482755.0A Pending CN115842861A (en) 2022-11-24 2022-11-24 Edge connection device adaptation method, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN115842861A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117636521A (en) * 2024-01-25 2024-03-01 苏州琨山通用锁具有限公司 AI-based intelligent lockset and data center interaction method and intelligent lockset production method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117636521A (en) * 2024-01-25 2024-03-01 苏州琨山通用锁具有限公司 AI-based intelligent lockset and data center interaction method and intelligent lockset production method
CN117636521B (en) * 2024-01-25 2024-04-05 苏州琨山通用锁具有限公司 AI-based intelligent lockset and data center interaction method and intelligent lockset production method

Similar Documents

Publication Publication Date Title
CN109582588B (en) Test case generation method and device and electronic equipment
CN110569298B (en) Data docking and visualization method and system
CN113127338A (en) Firmware testing method, server and computer readable storage medium
CN108388640B (en) Data conversion method and device and data processing system
CN111858472A (en) File format conversion method and device, computer equipment and storage medium
CN106656998B (en) server communication method and device
CN111881164B (en) Data processing method based on edge computing and path analysis and big data cloud platform
CN111708353A (en) Data display method and system for vehicle diagnosis equipment and related equipment
CN112860676B (en) Data cleaning method applied to big data mining and business analysis and cloud server
CN115842861A (en) Edge connection device adaptation method, device and computer readable storage medium
CN111752846A (en) Interface testing method and device
CN116795572A (en) Method, device, medium and equipment for rapidly processing faults of automobile diagnosis software
CN112311574A (en) Method, device and equipment for checking network topology connection
CN111506305B (en) Tool pack generation method, device, computer equipment and readable storage medium
CN103812887A (en) File opening method and system
CN116431522A (en) Automatic test method and system for low-code object storage gateway
CN107147719A (en) A kind of hardware update method, master node, slave node and server cluster
US20220283920A1 (en) Test sequencing method, configuration generating method for devices and apparatus thereof
CN115987865A (en) Routing code generation method and device, matrix detection method and storage medium
CN113645052A (en) Firmware debugging method and related equipment
CN102722592A (en) Universal digital information recording device and method
US20220415101A1 (en) Method and Device for the Computer-Supported Monitoring of the Operation of a Vehicle Service
CN111324757B (en) Map data problem processing method and device
CN115964301A (en) Application testing method and system of consumption machine
CN114116121A (en) Container project isolation platform

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