The information processing method of configurable protocol data gateway and gateway based on modelTechnical field
The present invention relates to the communications field, more particularly, to a kind of configurable protocol data gateway and net based on modelThe information processing method of pass.
Background technology
With the development of technology of Internet of things, the demand to communicate between equipment is more and more stronger.And current equipment roomCommunication is mostly in physical layer, therefore produce many general physical layer interfaces, such as RS485, RJ45, CAN etc..ButThe realization in the agreement of physical layer of each producer and industry-by-industry simultaneously differs, this communication between devices from different manufacturers causesInconvenience, forms information island phenomenon.
In order to solve the problems, such as between devices from different manufacturers can not normal communication, people employ the mode of data gateway, i.e.,The agreement of all producers is formed software code to be written in data gateway, since agreement is numerous, the development cycle of gateway protocolAlso long, so this requirement for the processing capacity and memory capacity of data gateway is very high, this results in costIt is very high.On the other hand, for the agreement directly realized with software, direct compilation, when increasing agreement, is gone back into executable codeIt needs that original gateway source code is rewritten and is compiled, this brings great inconvenience to the maintenance of data gateway.CauseHow this, effectively reduce the operating cost of data gateway, and ensure more convenient maintenance, and become needs what is urgently solved at presentProblem.
Invention content
The purpose of the present invention is to provide a kind of information processings of configurable protocol data gateway and gateway based on modelMethod, solve the problems, such as current data gateway operating cost it is high and safeguard it is inconvenient, realize to different manufacturers agreement according toCertain feature carries out model partition, by the database on the agreement deposit server cluster after division, reduces data networkClose the complexity of processing access request.
To achieve the above object, the present invention provides a kind of configurable protocol data gateway based on model, including:
Model database, for extracting the feature of all known protocols, and by the characteristic storage in the model dataIn library;
Standardize protocol database, for carrying out standardization processing to the content of all known protocols, and is stored inIn the standardization protocol database;
Communication interface, for obtaining the particular content of live interaction protocol from the standardization protocol database;
Memory, for storing the particular content of the live interaction protocol obtained;
Model solution parser, for reading the particular content of the live interaction protocol from the memory, described in acquisitionThe corresponding aspect of model of live interaction protocol, and the live interaction protocol is parsed according to the aspect of model;
Actuator, for performing the live interaction protocol after parsing.
Preferably, the model database and the standardization protocol database are run in server cluster.
Preferably, the configurable protocol data gateway based on model further includes interface server, for being described logicalBelieve that interface accesses the standardization protocol database in the server cluster and provides interface.
Preferably, the particular content that live interaction protocol is obtained from the standardization protocol database, including instituteState the corresponding pattern number of live interaction protocol.
The present invention also provides a kind of information processing method of the configurable protocol data gateway based on model, including followingStep:
The feature of all known protocols is extracted, and by the characteristic storage in model database;
Standardization processing is carried out to the content of all known protocols, and is stored in standardization protocol database;
The particular content of live interaction protocol is obtained from the standardization protocol database using communication interface;
The particular content of the live interaction protocol obtained using memory storage;
Controlling model resolver reads the particular content of the live interaction protocol from the memory, obtains described existingThe corresponding aspect of model of field interaction protocol, and the live interaction protocol is parsed according to the aspect of model;
Actuator is controlled to perform the live interaction protocol after parsing.
Preferably, the model database and the standardization protocol database are run in server cluster.
Preferably, described information processing method further includes step:Using interface server institute is accessed for the communication interfaceThe standardization protocol database stated in server cluster provides interface.
Preferably, it is described to obtain the specific of live interaction protocol from the standardization protocol database using communication interfaceContent, including the corresponding pattern number of the scene interaction protocol.
Compared with prior art, the present invention haing the following advantages and high-lighting effect:
Using a kind of information processing method of configurable protocol data gateway and gateway based on model provided by the invention,By the way that the big protocol database of storage capacity requirement is placed in server cluster, only retain scene interaction association in gatewayView significantly reduces the performance requirement of gateway storage, retrieval, so as to reduce operating cost.On the other hand, to all producersAgreement carries out standardization processing according to certain feature, and the realization of such data gateway is just transformed to by the realization of protocol contentsThe realization of model solution parser effectively reduces the workload of data gateway maintenance, improves the autgmentability of data gateway.
Description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, to embodiment or will show belowThere is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only thisSome embodiments of invention, for those of ordinary skill in the art, without creative efforts, can be withOther attached drawings are obtained according to these attached drawings.
Fig. 1 is a kind of structure diagram of the configurable protocol data gateway based on model disclosed by the embodiments of the present invention;
Fig. 2 is a kind of information processing method of the configurable protocol data gateway based on model disclosed by the embodiments of the present inventionFlow chart.
Specific embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, with reference to the accompanying drawings and embodiments, it is rightThe present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, andIt is not used in the restriction present invention.
As shown in Figure 1, the embodiment of the invention discloses a kind of configurable protocol data gateway based on model, including:
Model database 101 for carrying out structured analysis to the agreement of all producers, extracts their feature, wrapsIt includes:Model generates parameter (such as address etc.), set form parameter (such as instruction, register etc.), outside get parms (such asThe data of acquisition), procedure parameter (such as the circulation logic respectively instructed), standardize to these features, by similar agreementComposition is a kind of, forms a protocol model, and a model is made of pattern number, model name and one group of protocol characteristic, ownsProtocol model be stored in model database 101.
Standardize protocol database 102, for carrying out above-mentioned standardization processing to the content of all known protocols, and storesIn the standardization protocol database 102, the agreement after standardization corresponds to the agreement of a physical device, while also includesThe corresponding pattern number of physical device agreement.Wherein, model database 101 and standardization protocol database 102 run on clothesIt is engaged in device cluster.
Communication interface 103, for obtaining the particular content of the agreement of field device from standardization protocol database 102.
Interface server 104, for accessing the standardization protocol database 102 in server cluster for communication interface 103Interface is provided, way of realization is WEB SEVICE interfaces or SOCKET interfaces.
Memory 105, for storing the particular content of the agreement of the field device obtained, memory 105 is built-in NORFLASH or NAND FLASH.
Model solution parser 106, for reading the particular content of the agreement of field device, then basis from memory 105Pattern number in the particular content, obtains the corresponding aspect of model of agreement of field device, and the agreement of field device is pressedIt is parsed according to the aspect of model.
Actuator 107 performs the relevant action of data using bifurcation approach, i.e., first by model solution parser 106 fromAcquisition information is got at field device one, is then judged whether there is by actuator 107 and operated in next step.If meet agreement regulationCondition, then by model solution parser 106 obtain in next step operate corresponding agreement, and parse, be then sent to actuator 107,Dependent instruction is sent to relevant device by actuator 107.
The configurable protocol data gateway based on model described in the present embodiment, standardize protocol database and pattern numberStandardization processing is carried out to the feature of all producer's agreements according to library and is classified according to certain feature, gateway is only depositedThe agreement of field device is stored up, such gateway only needs implementation model resolver, significantly reduces the performance requirement of gateway retrieval,Reduce cost.Meanwhile in the maintenance for carrying out agreement, modification source code is not needed to, it is only necessary to which the agreement after specification is carried outModification, and re-download in gateway, improve the convenience of maintenance and the scalability of gateway.
As shown in Fig. 2, at the embodiment of the invention discloses a kind of information of the configurable protocol data gateway based on modelReason method, includes the following steps:
S201 carries out structured analysis to the agreement of all producers, extracts their feature, including:Model generates ginsengNumber (such as address etc.), set form parameter (such as instruction, register etc.), outside get parms (such as data of acquisition),Procedure parameter (such as the circulation logic respectively instructed), standardizes to these features, and similar agreement is formed to a kind of, formationOne protocol model, a model are made of pattern number, model name and one group of protocol characteristic, the storage of all protocol modelsIn model database.
S202 carries out above-mentioned standardization processing, and be stored in standardization protocol database to the content of all known protocolsIn, the agreement after standardization corresponds to the agreement of a physical device, while also includes the corresponding model of physical device agreementNumber.Wherein, model database and standardization protocol database are run in server cluster.
S203 obtains the particular content of the agreement of field device using communication interface from standardization protocol database.
S204 is the standardization protocol data in the communication interface access server cluster using interface serverLibrary provides interface.
S205, the particular content of the agreement of field device obtained using memory storage.
S206, Controlling model resolver read the particular content of live interaction protocol from memory, obtain the sceneThe corresponding aspect of model of interaction protocol, and live interaction protocol is parsed according to the aspect of model.
S207 performs the relevant action of data using bifurcation approach, i.e., first by model solution parser from field deviceAcquisition information is got at one, is then judged whether there is by actuator and operated in next step.If meeting condition as defined in agreement, byModel solution parser obtains operates corresponding agreement, and parse in next step, actuator is then sent to, by actuator by dependent instructionIt is sent to relevant device.
The information processing method of the configurable protocol data gateway based on model described in the present embodiment, by all factoriesThe feature of family's agreement carries out standardization processing, then classifies, and sorted protocol database and model database are storedIn server cluster, gateway only stores the agreement of field device, and such gateway only needs implementation model resolver, effectivelyThe performance requirement of gateway retrieval is reduced, reduces cost.Meanwhile in the maintenance for carrying out agreement, modification source code is not needed to,It only needs to modify to the agreement after specification, and re-download in gateway, improves the convenience and net of maintenanceThe scalability of pass.
Particular embodiments described above has carried out the purpose of the present invention, technical solution and advantageous effect further in detailIt describes in detail bright, it should be understood that the above is only a specific embodiment of the present invention, is not intended to restrict the invention, it is allWithin the principle of the present invention, any modification, equivalent substitution, improvement and etc. done should be included in protection scope of the present inventionWithin.