CN110399612A - The semantic conversion method and middleware of marginal layer in industry internet - Google Patents
The semantic conversion method and middleware of marginal layer in industry internet Download PDFInfo
- Publication number
- CN110399612A CN110399612A CN201910639942.7A CN201910639942A CN110399612A CN 110399612 A CN110399612 A CN 110399612A CN 201910639942 A CN201910639942 A CN 201910639942A CN 110399612 A CN110399612 A CN 110399612A
- Authority
- CN
- China
- Prior art keywords
- semantic conversion
- rule
- source
- attribute
- semantic
- 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
Links
- 238000006243 chemical reaction Methods 0.000 title claims abstract description 236
- 238000000034 method Methods 0.000 title claims abstract description 51
- 230000009466 transformation Effects 0.000 claims abstract description 73
- 230000006399 behavior Effects 0.000 claims description 49
- 230000008569 process Effects 0.000 claims description 15
- 230000003542 behavioural effect Effects 0.000 claims description 13
- 230000008859 change Effects 0.000 claims description 7
- 238000004364 calculation method Methods 0.000 claims description 6
- 230000001052 transient effect Effects 0.000 claims description 4
- 230000006855 networking Effects 0.000 claims 1
- 238000004458 analytical method Methods 0.000 abstract description 10
- 238000011161 development Methods 0.000 abstract description 6
- 238000004891 communication Methods 0.000 description 11
- 238000013507 mapping Methods 0.000 description 9
- 238000010586 diagram Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 6
- 238000004519 manufacturing process Methods 0.000 description 6
- 241000208340 Araliaceae Species 0.000 description 5
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 description 5
- 235000003140 Panax quinquefolius Nutrition 0.000 description 5
- 230000008901 benefit Effects 0.000 description 5
- 235000008434 ginseng Nutrition 0.000 description 5
- 238000004590 computer program Methods 0.000 description 4
- 238000012545 processing Methods 0.000 description 3
- 238000005259 measurement Methods 0.000 description 2
- 238000013519 translation Methods 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 238000009472 formulation Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000004886 process control Methods 0.000 description 1
- 230000001737 promoting effect Effects 0.000 description 1
- 238000013139 quantization Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 238000010561 standard procedure Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/36—Creation of semantic tools, e.g. ontology or thesauri
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/36—Creation of semantic tools, e.g. ontology or thesauri
- G06F16/367—Ontology
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/08—Protocols for interworking; Protocol conversion
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Animal Behavior & Ethology (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
Abstract
The embodiment of the present invention provides the semantic conversion method and middleware of marginal layer in a kind of industry internet, and wherein method includes: the protocol massages that parsing is issued by transmitting terminal, acquisition forward rule and source data, configures selected semantic conversion module in the forward rule;The source data is sent to the semantic conversion module, so that the semantic conversion module obtains corresponding semantic conversion rule according to the source data from preset transformation rule library, and source data is converted by target data according to the semantic conversion rule.The embodiment of the present invention can be realized orderly semantic conversion, by being pre-configured with transformation rule library, obtains source data using analysis protocol message and obtains semantic conversion rule, enhance the flexibility of semantic conversion, be convenient for secondary development.
Description
Technical field
The present invention relates to industry internet technical fields, turn more particularly, to the semanteme of marginal layer in industry internet
Change method.
Background technique
Interoperability between enterprise not only becomes a kind of generally acknowledged quality and advantage that current enterprise obtains the market competitiveness
Condition, and the final and decisive juncture increasingly concerning many enterprises especially medium-sized and small enterprises.In the entire product life cycle, enterprise
Industry needs stronger interoperability, is delayed with reducing cost and reducing.Enhancing interoperability can make enterprise in tissue network
New product is proposed for market.
However industrial automation system it is integrated in, the System Programming tool of business equipment, data communication protocol are usually by group
It is provided at PLC the or DCS supplier of the system, generally there are the data communication standards and agreement of oneself in different vendor.Work at present
Industry field of data communication is dominated by all kinds of field bus systems based on Ethernet, although they have similar requirement and subdivision city
, but their implementation and ecosystem difference are but very big.Therefore, how to realize the intercommunication of operation information between different enterprises is
A major issue urgently to be solved in industry Internet of Things at present.
Summary of the invention
The embodiment of the present invention provides a kind of industry interconnection for overcoming the above problem or at least being partially solved the above problem
The semantic conversion method and device of marginal layer in net.
First aspect, the embodiment of the present invention provide a kind of semantic conversion method of marginal layer in industry internet, comprising:
The protocol massages issued by transmitting terminal are parsed, forward rule and source data is obtained, configures choosing in the forward rule
Fixed semantic conversion module;
The source data is sent to the semantic conversion module, so that the semantic conversion module is according to the source number
It is regular according to corresponding semantic conversion is obtained from preset transformation rule library, and turned source data according to the semantic conversion rule
Change target data into.
The second aspect, the embodiment of the present invention provide a kind of middleware of marginal layer in industry internet, comprising:
Parsing module obtains forward rule and source data, the forwarding for parsing the protocol massages issued by transmitting terminal
Selected semantic conversion module is configured in rule;
Sending module, for the source data to be sent to the semantic conversion module, so that the semantic conversion mould
Root tuber obtains corresponding semantic conversion rule according to the source data from preset transformation rule library, and according to the semantic conversion
Source data is converted into target data by rule.
The third aspect, the embodiment of the present invention provides a kind of electronic equipment, including memory, processor and is stored in memory
Computer program that is upper and can running on a processor, is realized when the processor executes described program as first aspect provides
Method the step of.
Fourth aspect, the embodiment of the present invention provide a kind of non-transient computer readable storage medium, are stored thereon with calculating
Machine program is realized as provided by first aspect when the computer program is executed by processor the step of method.
The semantic conversion method and middleware of marginal layer in industry internet provided in an embodiment of the present invention, to receive agreement
The form of message triggers semantic conversion, and the embodiment of the present invention is configured previously according to the interoperability logic of transmitting terminal and destination
Forward rule configures corresponding semantic conversion module in forward rule, to realize according to different semantic conversion objects, choosing
Different semantic conversion modules is selected, by analysis protocol message, obtains selected semantic conversion module and source data, is turned by semanteme
Mold changing root tuber obtains corresponding semantic conversion rule according to source data from preset transformation rule library, completes semantic conversion.This hair
Bright embodiment is pre-configured with multiple semantic conversion modules, and according to protocol massages semantic conversion module selected to use, Neng Goushi
The semantic conversion of existing sequence obtains source data using analysis protocol message and obtains semantic turn by being pre-configured with transformation rule library
Rule is changed, the flexibility of semantic conversion is enhanced, is convenient for secondary development.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is this hair
Bright some embodiments for those of ordinary skill in the art without creative efforts, can be with root
Other attached drawings are obtained according to these attached drawings.
Fig. 1 is enterprise hierarchies illustraton of model in the prior art;
Fig. 2 is the flow diagram of the semantic conversion method of marginal layer in the industry internet of the embodiment of the present invention;
Fig. 3 is the structural schematic diagram of middleware provided in an embodiment of the present invention;
Fig. 4 is the entity structure schematic diagram of electronic equipment provided in an embodiment of the present invention;
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art
Every other embodiment obtained without creative efforts, shall fall within the protection scope of the present invention.
The executing subject of the semantic conversion method of the embodiment of the present invention is middleware, for realizing the side in industry internet
The semantic conversion method of edge layer.Enterprise hierarchies model is defined in IEC-62264 standard, and Fig. 1 is enterprise in the prior art
Industry hierarchical model figure, as described in Figure 1, entire enterprise feature level are divided into 5 layers, wherein the 4th layer and the 3rd layer generally includes factory
Interface between production scheduling and operational administrative and workshop coordination.Layer 2,1,0 indicate production unit or production line monitoring, operation,
The functions such as process control.0th layer of expression process is often referred to manufacture or production process.1st layer is used to monitor and operate the process
Artificial sensing, sensor and executing agency.The 2nd layer of control activity indicated manually or automatically makes process keep stablizing or locate
Under control.Between layers, it does not require to interoperate between homologous ray inside layer.The interoperability of this embodiment of the present invention
Method is primarily implemented in the interoperability of layers 1 and 2.
The inventive concept of the embodiment of the present invention are as follows: semantic conversion is triggered in the form of receiving protocol massages, the present invention is implemented
Example has configured forward rule, corresponding language is configured in forward rule previously according to the interoperability logic of transmitting terminal and destination
Adopted conversion module selects different semantic conversion modules, passes through analysis protocol to realize according to different semantic conversion objects
Message obtains selected semantic conversion module and source data, by semantic conversion module according to source data from preset transformation rule
Corresponding semantic conversion rule is obtained in library, completes semantic conversion.The embodiment of the present invention is pre-configured with multiple semantic conversion modules,
And according to protocol massages semantic conversion module selected to use, orderly semantic conversion can be realized, by being pre-configured with conversion
Rule base obtains source data using analysis protocol message and obtains semantic conversion rule, enhances the flexibility of semantic conversion, be convenient for
Secondary development.
In order to make those skilled in the art be easier to understand the technical solution of the embodiment of the present invention, first to of the present invention
Technical term and the techniqueflow of early period are explained.
Ontology (ontology) is the attribute and behavior that same class object shares in certain interoperability service environment
Set is a kind of special classification.Attribute information is the description of the quantization to object property, and behavioural information is object and extraneous friendship
Mutual or action description.
In order to realize semantic conversion, it is necessary first to standard body is defined, the customized ontology of producer is then defined, it is finally fixed again
Semantic conversion scheme (rule) between the two adopted ontologies.Standard body is a kind of industry universal, reaches in the industry extensively altogether
Know, generally by the ontology of industry standard formulation staff development.The customized ontology of enterprise is then with standard body on the contrary, be in enterprise
Portion is general, generally with the ontology of other enterprise definings it is incompatible, by enterprise technology personnel according to the customized standard of enterprise
The ontology of exploitation.
In embodiments of the present invention, needing to first pass through semantic conversion is that standard body can be by its in inter-operation system
He understands and uses the equipment of enterprise's production, therefore defining standard body is the basis for realizing interoperability.
Definition to standard body including the following steps:
S1, the classification that standard body indicates is determined
Specify standard body expression is any classification, that is, determines which class object standard body describes, especially
Ground, standard body is using classification system with reference to universal standards such as national standard, rowers.
S2, standard attribute is defined
Standard body includes one or more standard attribute information, this step will define all standard attribute information.In
In the embodiment of the present invention, attribute can wrap to be described containing attribute codes, Value Types, unit, relating value (value range) and value etc.
Information, when defined attribute, will determine these description informations of attribute.It is understood that for defining standard attribute, this
A little description informations require to determine with reference to universal standards such as national standard, rowers.
S3, criterion behavior is defined.
Standard body includes one or more criterion behavior, this step will define all criterion behaviors.Behavior includes
There are the description informations such as service code, operation coding and value, defines these description informations that determine behavior when behavior.It is understood that
, for defining standard attribute, these description informations require to determine with reference to universal standards such as national standard, rowers.
The customized ontology of enterprise needs after semantic conversion, and the equipment that could be produced by other enterprises understands.With it is fixed
The process of adopted standard body is similar, and enterprise report form definition is divided into for following steps:
S1, the customized ontology representation of clear enterprise are any classification, that is, determine enterprise customized ontology describing is
Which class object.
S2, enterprise's Custom Attributes is defined
The customized ontology of enterprise includes one or more attribute, this step will define all attributes.Here attribute can
With by the method for meeting professional standard define Lai, can also by enterprise with the method for meeting oneself standard define come.
S3, the customized behavior of enterprise is defined
The customized ontology of enterprise includes the customized behavior of one or more enterprise, this step will define all behavior letters
Breath.Here behavior can be defined that the side for meeting oneself standard can also be used by enterprise by the method for meeting professional standard
Method defines out.
After defining the customized ontology of standard body and enterprise, need to continue to define semantic conversion rule, thus semantic
Conversion plan by by ontology source attribute and source behavior be converted into objective attribute target attribute and the goal behavior of ontology and realize semanteme
Conversion.The customized ontology of standard body and enterprise that semantic conversion rule uses above-mentioned steps to create is formulated as conversion foundation
The conversion method of attribute and behavior between two ontologies.
The generation of semantic conversion scheme can be divided into following three step:
1, source ontology is determined
Semantic conversion scheme supports unidirectional conversion, thus need first to determine need to convert which ontology (standard body or
The customized ontology of enterprise).
2, target ontology is determined
Determination needs to be converted into which ontology (the customized ontology of enterprise or standard body) again.
3, Mapping and Converting rule is formulated
Semantic conversion scheme includes one or more Mapping and Converting rule, this step will define all Mapping and Converting rule
Then.Every corresponding one, transformation rule is converted to several objective attribute target attributes (or goal behavior) by several source attributes (or source behavior)
Conversion process.
Fig. 2 is the flow diagram of the semantic conversion method of marginal layer in the industry internet of the embodiment of the present invention, such as Fig. 2
It is shown, including S101 and S102, specifically,
The protocol massages that S101, parsing are issued by transmitting terminal obtain forward rule and source data, match in the forward rule
Set selected semantic conversion module.
It should be noted that the embodiment of the present invention triggers interoperability by way of receiving protocol massages, processing fortune is embodied
Row engine uses event-driven technology, by event and data separating, event-driven technology can significant increase system performance, make
Between number of packages can control according to response in Millisecond.
Transmitting terminal and target side are predetermined using communication protocol in the embodiment of the present invention, similarly also true in advance
Forward rule is determined, selected semantic conversion module is configured in forward rule.In embodiments of the present invention, a semantic conversion
Module for realizing a kind of transmitting terminal and target side semantic conversion, for example, a certain semantic conversion module for realizing send A association
Semantic conversion between the transmitting terminal of view and the target side for sending B agreement, another semantic conversion module is for realizing transmission C agreement
Transmitting terminal and send D agreement target side between semantic conversion, it will be understood that, above-mentioned A, B, C, D all refer to different
Industry internet communication protocol.For the embodiment of the present invention by the way that multiple semantic conversion modules are arranged in middleware, each is semantic
Conversion module is related to the protocol massages of transmitting terminal, sends so that a middleware can handle multiple transmitting terminals simultaneously
Or same transmitting terminal be sent to the protocol massages of multiple target sides, improve the treatment effeciency of data.
The source data of the embodiment of the present invention refers to protocol massages are parsed after obtain the data containing key message, one
As be structural data.Such as:
The protocol massages that transmitting terminal is sent are as follows:
Nodeid=2s;speed
Displayname=speed
Value=2
Nodeid=2s;address
Displayname=address
Value=1
For above-mentioned protocol massages tool there are two identification information, one of identification information is 2s;Speed, another mark letter
Breath is 2s;Address, 2s are NameSpace, 2s;Speed one field of unique identification inside message: speed, in the field
Value (value) be 2;2s;Address one field address of unique identification inside message, the value in the field
It (value) is 2 that is, it is 2, address 1 that the information that above-mentioned protocol massages are wanted to transmit, which is speed,.It can by parsing
Obtain source data are as follows: speed=2;Address=1, in this source data, the source that speed and address belong to ontology belongs to
Property.
S102, the source data is sent to the semantic conversion module, so that the semantic conversion module is according to institute
It states source data and obtains corresponding semantic conversion rule from preset transformation rule library, and according to the semantic conversion rule by source
Data conversion is at target data.
The embodiment of the present invention has been pre-configured with transformation rule library, and as its name suggests, transformation rule library is for storing respective semanteme
Transformation rule.Semantic conversion rule in transformation rule library by the source data of ontology is converted into the target data of ontology come
Realize semantic conversion.Conversion method between two ontologies of semantic conversion Rulemaking.Therefore, by transformation rule library with
Source data can be obtained relevant semantic conversion rule as search terms, and then realize that source data turns by semantic conversion rule
Change target data into.
It should be noted that the embodiment of the present invention triggers semantic conversion in the form of receiving protocol massages, the present invention is implemented
Example has configured forward rule, corresponding language is configured in forward rule previously according to the interoperability logic of transmitting terminal and destination
Adopted conversion module selects different semantic conversion modules, passes through analysis protocol to realize according to different semantic conversion objects
Message obtains selected semantic conversion module and source data, by semantic conversion module according to source data from preset transformation rule
Corresponding semantic conversion rule is obtained in library, completes semantic conversion.The embodiment of the present invention is pre-configured with multiple semantic conversion modules,
And according to protocol massages semantic conversion module selected to use, orderly semantic conversion can be realized, by being pre-configured with conversion
Rule base obtains source data using analysis protocol message and obtains semantic conversion rule, enhances the flexibility of semantic conversion, be convenient for
Secondary development.
The embodiment of the present invention is combined to realize the quick calling of semantic conversion rule with local memory and memory database
Mode stored, what local memory occupied is the local memory of middleware, has memory space few, but access speed pole
Fast advantage, and what memory database occupied is server memory, can store the resource of angle, access speed is compared in local
It deposits slightly slow, but still fast to cross database, and since database is the resource occupied in server disk, although can be with
The very more resource of storage, but access speed is slower, therefore the embodiment of the present invention it is not intended that store conversion rule in the database
Then.On the basis of the various embodiments described above, as a kind of alternative embodiment, according to the source data from preset transformation rule library
It is middle to obtain corresponding semantic conversion rule, specifically:
S201, the transformation rule library read in local memory are advised with the presence or absence of semantic conversion corresponding with the source data
Then.
As the above analysis, the advantage that there are access data to be exceedingly fast in local memory library, therefore the embodiment of the present invention is first
It reads in local memory and converts rule base, if there is semantic conversion rule corresponding with source data, then directly utilize the semanteme
Transformation rule carries out semantic conversion, to further increase semantic conversion efficiency.
S202, if it does not exist then continues to read the transformation rule library in memory database, if in the memory database
There are the semantic conversion rule in transformation rule library, then the semantic conversion rule is obtained, and the semantic conversion is regular
It is written in the transformation rule library into local memory.
It should be noted that if there is no semantic conversion regular in local memory, then continue to read turn in memory database
Rule base is changed, semantic conversion rule corresponding with secretary Yuan, then the semantic conversion rule is written to local memory if it exists
In transformation rule library, directly obtained from local memory next time with facilitating.The embodiment of the present invention by analysis local memory,
Memory database and the respective advantage and disadvantage of database three, final determination are stored in a manner of local memory and memory database
Transformation rule library, and while reading preferentially reads local memory, if local memory without as a result, if continue to read memory database.
On the basis of the various embodiments described above, as a kind of alternative embodiment, it is contemplated that the memory space of local memory is simultaneously
Less, therefore the embodiment of the present invention considers to the semantic conversion rule setting temperature label in local memory, thus according to temperature
Label optimizes the semantic conversion rule in local memory.Specifically, the semantic conversion rule is written into local memory
In transformation rule library, later further include:
S301, the temperature that the semantic conversion rule is updated in the transformation rule library in the local memory.
What it is due to temperature embodiment is the called active degree of semantic conversion rule, as long as this can be embodied
The mode of one design belongs to the optinal plan of the embodiment of the present invention.For example, after each semantic conversion rule is called, to adjust
It uses constantly as temperature, by the calling moment of semantic conversion rule in poll local memory at regular intervals, if a certain language
Adopted transformation rule calls time difference at the time of moment and current poll to be greater than preset threshold, then just illustrating that the semantic conversion is advised
Then the long period is not invoked, so as to judge that temperature is lower.Also for example, tune to each semantic conversion rule
It is recorded with number, and inquires the call number of each semantic conversion rule at regular intervals, if call number is relatively low,
Judge that the semantic conversion rule temperature is lower, call number is zeroed out later, is counted again.
Whether remaining memory space is less than preset threshold in S302, the inquiry local memory.
The time that whether inquiry memory space is less than preset threshold in the embodiment of the present invention does not do special restriction, for example,
It can be inquired after the temperature of each update semantics rule, primary, present invention implementation can also be inquired every the set time
Example is not further to be limited.
If S303, being less than preset threshold, according to the temperature of semantic conversion rules all in the local memory library, delete
The semantic conversion rule of at least one temperature rearward.
The quantity of the semantic conversion rule of the temperature that the embodiment of the present invention is deleted rearward is not further to be limited, Ke Yili
Solution not will be deleted semantic conversion rule of the just write-in into local memory generally.
The embodiment of the present invention passes through storage sky remaining in inquiry local memory by the temperature of setting semantic conversion rule
Between whether be less than preset threshold, if be less than preset threshold if delete at least one temperature rearward semantic conversion rule, Neng Goushi
Now dynamic adjusts the purpose of local memory, is conducive to the speed for promoting semantic conversion.
On the basis of the various embodiments described above, as a kind of alternative embodiment, source attribute information is recorded in the source data
At least one of with source behavioural information, wherein record source attribute codes in the attribute information of source, recorded in the source behavioural information
Source behavior code.
It is correspondingly, described to obtain corresponding semantic conversion rule from preset transformation rule library according to the source data,
And source data is converted by target data according to the semantic conversion rule, specifically:
According to the source attribute codes recorded in the attribute information of source, attribute transformation rule is determined from the transformation rule library,
And/or according to the source behavior code recorded in the behavioural information of source, behavior transformation rule is determined from the transformation rule library;
According to the attribute transformation rule, the source attribute information is converted into target property information, and/or according to described
The source behavioural information is converted to goal behavior information by behavior transformation rule;Using the information after conversion as the number of targets
According to.
It should be noted that the embodiment of the present invention is respectively provided with service code, i.e. source to source attribute information and source behavioural information
Attribute codes and source behavior code can more rapidly, easily be found using service code as the unique identification of transformation rule
Transformation rule carries out semantic conversion.
It further include that source belongs to as a kind of alternative embodiment, in the source attribute information on the basis of the various embodiments described above
The value information of property;
Correspondingly, described according to the attribute transformation rule, the source attribute information is converted into target property information, is had
Body are as follows:
The source attribute codes are converted into objective attribute target attribute code;
The value information that preset number is selected according to the attribute transformation rule, counts the value information of the preset number
It is worth one of conversion, calculation process, character string conversion and time conversion or a variety of.
The transformation rule of the embodiment of the present invention can be divided into following a few classes:
Numerical value conversion --- including fixing digit after interception decimal point, numerical value retains fixed digit, numerical value is counted with scientific
Method is converted mutually, converts mutually, rounds up between different systems;
Simple data processing --- including to preset value arithmetic, seek fixed power, seek logarithm etc.;
Character string conversion --- conversion mutually, character string interception and splicing etc. are write including all alphabet sizes of character string;
Time conversion --- date format is converted to including standard time (ISO) format;Greenwich Mean Time (GMT) and north
The capital time converts mutually.
Attribute transformation rule:
1, attribute codes map: according to source attribute codes querying attributes code mapping table, obtaining the target category for needing to convert
Property code.
Such as: source attribute codes=Code1 are worth for 12.1cm/s, object code speed.Also for example, source attribute codes
=Code2 is worth for a, inquires the object code converted as priority.
2, attribute value maps: according to the mapping relations of attribute codes querying attributes unit, obtaining reflecting for source value and target value
Relationship is penetrated, specific transformational relation is then matched according to attribute value.Value translation type mainly includes simple types to simple types
Conversion and enumeration type are converted to enumeration type:
1) simple types is converted: such as naturally semantic conversion, the simple process of value.Conversion process: by regulation engine plus
Predefined transformation rule is carried, then using attribute value as the ginseng that enters for executing transformation rule, mesh of the result of output as conversion
Scale value.
Such as: the attribute that code is code1 needs to carry out simple types to be converted to simple types, and the value 12.1 of code1 is made
Enter ginseng for what rule executed, rounds up to obtain 12 by running transformation rule value=round (value);
2) enumeration type is converted: the source value and target value of attribute are all enumeration types, and are corresponded, and basis is needed to turn
The relationship unique identification of changing inquires the corresponding relationship between the amount of enumerating, and then matches specific target value according to source value.
Such as: code is that the attribute of code2 obtains the transformational relation of a- > hign, b- > low, then according to attribute value a
It is fitted on hign.
The mapping of attribute unit:
1) attribute Unit code maps: according to attribute codes, query unit transformational relation table obtains target unit code;
2) attribute unit conversion: according to Code obtaining Conversion of measurement unit rule, and transformation rule is executed: Conversion of measurement unit rule point
The customized complicated conversion of conversion and enterprise between known standard unit.Standard unit's conversion is directly changed according to known to
It calculates formula and carries out operation;Complex calculation needs to configure conversion formula, and using attribute value as ginseng is entered, by regulation engine load, holds
Row, target value of the result of output as conversion.
Such as: inquiry learns that unit cm/s is converted to target unit m/s, needs to be implemented preset conversion formula: value=
Value/100 is calculated 12 as ginseng is entered: 0.12m/s.
It further include source row in the source behavioural information as a kind of alternative embodiment on the basis of the various embodiments described above
For value information;
Correspondingly, described according to the behavior transformation rule, the source behavioural information is converted into goal behavior information, is had
Body are as follows:
The source behavior code is converted into goal behavior code;
The value information that preset number is selected according to the behavior transformation rule, counts the value information of the preset number
It is worth one of conversion, calculation process, character string conversion and time conversion or a variety of.
It is first the code of purpose behavior by the code conversion of source behavior, then by source row when being converted to behavior
For operation code conversion be purpose behavior operation coding, the value of source behavior is finally converted to the value for purpose behavior.
1, according to source behavior code querying attributes code mapping table, the goal behavior code for needing to convert is obtained.
2, according to symbol lookup behavior unit mapping relations, source value and target value mapping relations are obtained, then according to behavior
Value matching transformational relation.Value translation type mainly includes that simple types is converted to simple types, and enumeration type to enumeration type turns
It changes.Wherein simple types conversion needs to load predefined transformation rule by regulation engine, then using the value of data as entering
Ginseng executes transformation rule, target value of the result of output as conversion.
Such as: code be code3 attribute obtain: be -> true, no -> false transformational relation, then according to behavior
Value arrival is matched to true.
It is first mesh by the code conversion of source attribute when being converted to attribute on the basis of the various embodiments described above
Mark the code of attribute.Then the Value Types of inspection source attribute, when the Value Types of source attribute are plian value (such as integer, real number, word
Symbol string) and conversion process not complicated data when calculating with processing, use the transformation rule built in system to realize conversion.
When the data that the Value Types of source attribute are complicated type (such as array) or conversion process has complexity calculate and locate
When managing process, allows semantic conversion authorized personnel to write custom script, realize the logic of semantic conversion;When the value class of source attribute
Type be enumeration type when, then according to the value of source attribute enumerate set in number from objective attribute target attribute enumerate set in obtain mesh
Mark the value of attribute.Finally the unit of the unit of source attribute and objective attribute target attribute is converted, obtains target category according to conversion scale
The final value of property.
Fig. 3 is the structural schematic diagram of middleware provided in an embodiment of the present invention, as shown in figure 3, the middleware includes: parsing
Module 201 and sending module 202, in which:
Parsing module 201, it is described for parsing the protocol massages issued by transmitting terminal, acquisition forward rule and source data
Selected semantic conversion module is configured in forward rule;
Sending module 202, for the source data to be sent to the semantic conversion module, so that the semantic conversion
Module obtains corresponding semantic conversion rule according to the source data from preset transformation rule library, and according to described semantic turn
It changes rule and source data is converted into target data.
Middleware provided in an embodiment of the present invention specifically executes the semantic conversion side of marginal layer in above-mentioned industry internet
Method embodiment process please specifically be detailed in the content of the semantic conversion embodiment of the method for marginal layer in above-mentioned each industry internet,
Details are not described herein.Middleware provided in an embodiment of the present invention triggers semantic conversion, the present invention in the form of receiving protocol massages
Embodiment has configured forward rule previously according to the interoperability logic of transmitting terminal and destination, configures in forward rule corresponding
Semantic conversion module, thus realize according to different semantic conversion objects, select different semantic conversion modules, pass through parsing
Protocol massages obtain selected semantic conversion module and source data, by semantic conversion module according to source data from preset conversion
Corresponding semantic conversion rule is obtained in rule base, completes semantic conversion.The embodiment of the present invention is pre-configured with multiple semantic conversions
Module, and according to protocol massages semantic conversion module selected to use, it can be realized orderly semantic conversion, by being pre-configured with
Transformation rule library obtains source data using analysis protocol message and obtains semantic conversion rule, enhances the flexibility of semantic conversion,
Convenient for secondary development.
Fig. 4 is the entity structure schematic diagram of electronic equipment provided in an embodiment of the present invention, as shown in figure 4, the electronic equipment
It may include: processor (processor) 410,420, memory communication interface (Communications Interface)
(memory) 430 and communication bus 440, wherein processor 410, communication interface 420, memory 430 pass through communication bus 440
Complete mutual communication.Processor 410 can call the meter that is stored on memory 430 and can run on the processor 410
Calculation machine program, to execute the semantic conversion method of marginal layer in the industry internet that the various embodiments described above provide, for example, solution
The protocol massages issued by transmitting terminal are analysed, forward rule and source data are obtained, selected semanteme is configured in the forward rule and is turned
Change the mold block;The source data is sent to the semantic conversion module, so that the semantic conversion module is according to the source number
It is regular according to corresponding semantic conversion is obtained from preset transformation rule library, and turned source data according to the semantic conversion rule
Change target data into.
In addition, the logical order in above-mentioned memory 430 can be realized by way of SFU software functional unit and conduct
Independent product when selling or using, can store in a computer readable storage medium.Based on this understanding, originally
The technical solution of the inventive embodiments substantially part of the part that contributes to existing technology or the technical solution in other words
It can be embodied in the form of software products, which is stored in a storage medium, including several fingers
It enables and using so that a computer equipment (can be personal computer, server or the network equipment etc.) executes the present invention respectively
The all or part of the steps of a embodiment the method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory
(ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk
Etc. the various media that can store program code.
The embodiment of the present invention also provides a kind of non-transient computer readable storage medium, is stored thereon with computer program,
The computer program is implemented to carry out the language of marginal layer in the industry internet of the various embodiments described above offer when being executed by processor
Adopted conversion method, for example, the protocol massages that parsing is issued by transmitting terminal obtain forward rule and source data, the forwarding
Selected semantic conversion module is configured in rule;The source data is sent to the semantic conversion module, so that institute's predicate
Adopted conversion module obtains corresponding semantic conversion rule according to the source data from preset transformation rule library, and according to described
Source data is converted into target data by semantic conversion rule.
The apparatus embodiments described above are merely exemplary, wherein described, unit can as illustrated by the separation member
It is physically separated with being or may not be, component shown as a unit may or may not be physics list
Member, it can it is in one place, or may be distributed over multiple network units.It can be selected according to the actual needs
In some or all of the modules achieve the purpose of the solution of this embodiment.Those of ordinary skill in the art are not paying creativeness
Labour in the case where, it can understand and implement.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can
It realizes by means of software and necessary general hardware platform, naturally it is also possible to pass through hardware.Based on this understanding, on
Stating technical solution, substantially the part that contributes to existing technology can be embodied in the form of software products in other words, should
Computer software product may be stored in a computer readable storage medium, such as ROM/RAM, magnetic disk, CD, including several fingers
It enables and using so that a computer equipment (can be personal computer, server or the network equipment etc.) executes each implementation
Method described in certain parts of example or embodiment.
Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although
Present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: it still may be used
To modify the technical solutions described in the foregoing embodiments or equivalent replacement of some of the technical features;
And these are modified or replaceed, technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution spirit and
Range.
Claims (9)
1. a kind of semantic conversion method of marginal layer in industry internet characterized by comprising
The protocol massages issued by transmitting terminal are parsed, obtain forward rule and source data, configuration is selected in the forward rule
Semantic conversion module;
The source data is sent to the semantic conversion module so that the semantic conversion module according to the source data from
Corresponding semantic conversion rule is obtained in preset transformation rule library, and is converted into source data according to the semantic conversion rule
Target data.
2. the semantic conversion method of marginal layer in industry internet according to claim 1, which is characterized in that the basis
The source data obtains corresponding semantic conversion rule from preset transformation rule library, specifically:
The transformation rule library in local memory is read with the presence or absence of semantic conversion rule corresponding with the source data;
If it does not exist, then continue to read the transformation rule library in memory database, if the transformation rule in the memory database
There are the semantic conversion rule in library, then the semantic conversion rule is obtained, and the semantic conversion rule is written to this
In transformation rule library in ground memory.
3. the semantic conversion method of marginal layer in industry internet according to claim 2, which is characterized in that described by institute
Predicate justice transformation rule is written in the transformation rule library into local memory, later further include:
The temperature of the semantic conversion rule is updated in the transformation rule library in the local memory;
Inquire whether remaining memory space in the local memory is less than preset threshold;
At least one is deleted according to the temperature of semantic conversion rules all in the local memory library if being less than preset threshold
The semantic conversion rule of temperature rearward.
4. the semantic conversion method of marginal layer in industry internet according to claim 1, which is characterized in that the source number
According at least one of middle record source attribute information and source behavioural information, wherein record source attribute codes, institute in the attribute information of source
State record source behavior code in the behavioural information of source;
Correspondingly, described to obtain corresponding semantic conversion rule, and root from preset transformation rule library according to the source data
Source data is converted into target data according to the semantic conversion rule, specifically:
According to the source attribute codes recorded in the attribute information of source, attribute transformation rule is determined from the transformation rule library, and/or
According to the source behavior code recorded in the behavioural information of source, behavior transformation rule is determined from the transformation rule library;
According to the attribute transformation rule, the source attribute information is converted into target property information, and/or according to the behavior
The source behavioural information is converted to goal behavior information by transformation rule;Using the information after conversion as the target data.
5. the semantic conversion method of marginal layer in industry internet according to claim 4, which is characterized in that the source belongs to
It further include the value information of source attribute in property information;
Correspondingly, described according to the attribute transformation rule, the source attribute information is converted into target property information, specifically
Are as follows:
The source attribute codes are converted into objective attribute target attribute code;
The value information that preset number is selected according to the attribute transformation rule carries out numerical value to the value information of the preset number and turns
Change, calculation process, character string conversion and the time conversion one of or it is a variety of.
6. the semantic conversion method of marginal layer in industry internet according to claim 4, which is characterized in that the source row
For the value information in information further including source behavior;
Correspondingly, described according to the behavior transformation rule, the source behavioural information is converted into goal behavior information, specifically
Are as follows:
The source behavior code is converted into goal behavior code;
The value information that preset number is selected according to the behavior transformation rule carries out numerical value to the value information of the preset number and turns
Change, calculation process, character string conversion and the time conversion one of or it is a variety of.
7. the middleware of marginal layer in a kind of industry internet characterized by comprising
Parsing module obtains forward rule and source data, the forward rule for parsing the protocol massages issued by transmitting terminal
The selected semantic conversion module of middle configuration;
Sending module, for the source data to be sent to the semantic conversion module, so that the semantic conversion module root
Corresponding semantic conversion rule is obtained from preset transformation rule library according to the source data, and according to the semantic conversion rule
Source data is converted into target data.
8. a kind of electronic equipment including memory, processor and stores the calculating that can be run on a memory and on a processor
Machine program, which is characterized in that the processor realizes that industry is mutually as described in any one of claim 1 to 6 when executing described program
In networking the step of the semantic conversion method of marginal layer.
9. a kind of non-transient computer readable storage medium, which is characterized in that the non-transient computer readable storage medium is deposited
Computer instruction is stored up, the computer instruction makes the computer execute the industry as described in any one of claim 1 to 6
The semantic conversion method of marginal layer in internet.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910639942.7A CN110399612A (en) | 2019-07-16 | 2019-07-16 | The semantic conversion method and middleware of marginal layer in industry internet |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910639942.7A CN110399612A (en) | 2019-07-16 | 2019-07-16 | The semantic conversion method and middleware of marginal layer in industry internet |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110399612A true CN110399612A (en) | 2019-11-01 |
Family
ID=68325570
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910639942.7A Pending CN110399612A (en) | 2019-07-16 | 2019-07-16 | The semantic conversion method and middleware of marginal layer in industry internet |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110399612A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112333193A (en) * | 2020-11-06 | 2021-02-05 | 珠海格力电器股份有限公司 | Automatic protocol updating method and system |
CN112416365A (en) * | 2020-11-18 | 2021-02-26 | 中信银行股份有限公司 | File conversion method, device and storage medium |
CN114285877A (en) * | 2021-12-22 | 2022-04-05 | 海南同享数字科技有限公司 | Universal industrial equipment communication system and method |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101188561A (en) * | 2007-12-20 | 2008-05-28 | 北京大学 | Communication method and system for universal service data based on self-defined template |
US20080306984A1 (en) * | 2007-06-08 | 2008-12-11 | Friedlander Robert R | System and method for semantic normalization of source for metadata integration with etl processing layer of complex data across multiple data sources particularly for clinical research and applicable to other domains |
CN101577718A (en) * | 2009-06-23 | 2009-11-11 | 用友软件股份有限公司 | Multi-ebanking adaptive system |
CN101582894A (en) * | 2009-06-10 | 2009-11-18 | 重庆大学 | Semantic gateway used for integration of enterprise informatization heterogeneous system |
CN102938731A (en) * | 2012-11-22 | 2013-02-20 | 北京锐易特软件技术有限公司 | Exchange and integration device and method based on proxy cache adaptation model |
CN103957173A (en) * | 2014-05-16 | 2014-07-30 | 北京信诺瑞得软件系统有限公司 | Semantic switch |
CN105069142A (en) * | 2015-08-18 | 2015-11-18 | 山大地纬软件股份有限公司 | System and method for extraction, transformation and distribution of data increments |
CN108521378A (en) * | 2018-04-23 | 2018-09-11 | 天津芯海创科技有限公司 | Retransmission method, device and the network switching equipment of heterogeneous protocol message |
-
2019
- 2019-07-16 CN CN201910639942.7A patent/CN110399612A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080306984A1 (en) * | 2007-06-08 | 2008-12-11 | Friedlander Robert R | System and method for semantic normalization of source for metadata integration with etl processing layer of complex data across multiple data sources particularly for clinical research and applicable to other domains |
CN101188561A (en) * | 2007-12-20 | 2008-05-28 | 北京大学 | Communication method and system for universal service data based on self-defined template |
CN101582894A (en) * | 2009-06-10 | 2009-11-18 | 重庆大学 | Semantic gateway used for integration of enterprise informatization heterogeneous system |
CN101577718A (en) * | 2009-06-23 | 2009-11-11 | 用友软件股份有限公司 | Multi-ebanking adaptive system |
CN102938731A (en) * | 2012-11-22 | 2013-02-20 | 北京锐易特软件技术有限公司 | Exchange and integration device and method based on proxy cache adaptation model |
CN103957173A (en) * | 2014-05-16 | 2014-07-30 | 北京信诺瑞得软件系统有限公司 | Semantic switch |
CN105069142A (en) * | 2015-08-18 | 2015-11-18 | 山大地纬软件股份有限公司 | System and method for extraction, transformation and distribution of data increments |
CN108521378A (en) * | 2018-04-23 | 2018-09-11 | 天津芯海创科技有限公司 | Retransmission method, device and the network switching equipment of heterogeneous protocol message |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112333193A (en) * | 2020-11-06 | 2021-02-05 | 珠海格力电器股份有限公司 | Automatic protocol updating method and system |
CN112416365A (en) * | 2020-11-18 | 2021-02-26 | 中信银行股份有限公司 | File conversion method, device and storage medium |
CN112416365B (en) * | 2020-11-18 | 2024-05-24 | 中信银行股份有限公司 | File conversion method, device and storage medium |
CN114285877A (en) * | 2021-12-22 | 2022-04-05 | 海南同享数字科技有限公司 | Universal industrial equipment communication system and method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Leusin et al. | Solving the job-shop scheduling problem in the industry 4.0 era | |
US9953296B2 (en) | System, method, and computer-readable medium for managing edge devices | |
Khan et al. | Information sharing in supply chains–Interoperability in an era of circular economy | |
CN110399612A (en) | The semantic conversion method and middleware of marginal layer in industry internet | |
US20080208661A1 (en) | Method and system of using anrtifacts to identify elements of a component business model | |
US11256755B2 (en) | Tag mapping process and pluggable framework for generating algorithm ensemble | |
CN111177541B (en) | Data analysis method and device based on user tag generation time | |
Abdi et al. | Integrated reconfigurable manufacturing systems and smart value chain | |
US20190005005A1 (en) | Tag mapping process and pluggable framework for generating algorithm ensemble | |
CN110995639A (en) | Data transmission method | |
AU2018267280B2 (en) | A system for improved data storage and retrieval | |
AU2018267279B2 (en) | A system for improved data storage and retrieval | |
Schlemitz et al. | Approaches for data collection and process standardization in smart manufacturing: Systematic literature review | |
CN111522840A (en) | Label configuration method, device, equipment and computer readable storage medium | |
Pekša et al. | Integration of decision-making components in ERP systems | |
Cyplik et al. | Industry 4.0 and 3D print: A new heuristic approach for decoupling point in future supply chain management | |
CN101635711B (en) | Programmable character communication method | |
CN110674130A (en) | Data transmission method | |
Jianjun et al. | Research on evaluation methodologies of product life cycle engineering design (LCED) and development of its tools | |
KR20200081657A (en) | Platform of Smart Factory | |
US11100454B1 (en) | CDD with heuristics for automated variable use-case based constrained logistics route optimization | |
Maeda et al. | Establishing international standards for information exchange between platforms to realize connected monozukuri | |
CN110708351A (en) | Data transmission method | |
Santos et al. | Systems Development for the Industrial IoT: Challenges from Industry R&D Projects | |
CN117473199B (en) | Information pushing method and system applied to supply chain logistics system |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20191101 |
|
RJ01 | Rejection of invention patent application after publication |