CN110209383A - Ubiquitous object interaction interface method towards general manufacture and edge calculations - Google Patents

Ubiquitous object interaction interface method towards general manufacture and edge calculations Download PDF

Info

Publication number
CN110209383A
CN110209383A CN201910495128.2A CN201910495128A CN110209383A CN 110209383 A CN110209383 A CN 110209383A CN 201910495128 A CN201910495128 A CN 201910495128A CN 110209383 A CN110209383 A CN 110209383A
Authority
CN
China
Prior art keywords
pendant
message
data
event
ubiquitous
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
CN201910495128.2A
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.)
FOSHAN HEZHICHENG ENVIRONMENTAL PROTECTION TECHNOLOGY Co Ltd
Guangzhou Shoulian Environmental Engineering Co Ltd
Guangdong Huaxi Intelligent System Co Ltd
Original Assignee
FOSHAN HEZHICHENG ENVIRONMENTAL PROTECTION TECHNOLOGY Co Ltd
Guangzhou Shoulian Environmental Engineering Co Ltd
Guangdong Huaxi Intelligent System 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 FOSHAN HEZHICHENG ENVIRONMENTAL PROTECTION TECHNOLOGY Co Ltd, Guangzhou Shoulian Environmental Engineering Co Ltd, Guangdong Huaxi Intelligent System Co Ltd filed Critical FOSHAN HEZHICHENG ENVIRONMENTAL PROTECTION TECHNOLOGY Co Ltd
Priority to CN201910495128.2A priority Critical patent/CN110209383A/en
Publication of CN110209383A publication Critical patent/CN110209383A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • G06F8/24Object-oriented

Abstract

The present invention provides a kind of method that ubiquitous object is carried out data connection and network connection, to support the access control and edge calculations of electronization and networking.Here, ubiquitous object refers to that information system to be connected into carries out personnel, article, instrument and equipment, electronic data and the computer software etc. of operational access.Using this method, software form or example, in hardware or software and hardware mixed form interface unit can be constructed, is applied in Internet of Things, industry internet, intelligent control, general manufacture and edge calculations.This method is by the realization of various functions needed for the ubiquitous object of operational access, all unify the mode mounted to module, the service logics such as network communication, state publication, data publication, service offer, behavior intelligent control, the general manufacture based on collaboration and edge calculations that ubiquitous object is realized with the dynamic combined of hanging part.Interface unit controls work by monitor with the mode work of ubiquitous object driving pendant assembly.

Description

Ubiquitous object interaction interface method towards general manufacture and edge calculations
Technical field
The invention belongs to field of software engineering, are related to the back-up environment of internet of things oriented application and the building method of tool.
Background technique
With the proposition of the industrial revolution 4.0, new requirement also proposed to informationization technology.Industry internet, intelligence system It makes, intelligent robot, the industrial standards such as 4.0, industrial 2025 and technology are paid attention to.Support to these new demands, general manufacture It is major way.
General manufacture is a kind of important operation system that ubiquitous object blendes together realization.In short, ubiquitous object can summarize For people, object, machine, number, soft.Wherein, people and object refer to the object of not electronic data interface, belong to " object is not networked " object.Machine Refer to the instrument and equipment that can carry electronic digital interface and tool etc., number refers to electronic data, soft to refer to computer software system System, is generally presented with method of service.All things on earth interconnects, and refers to Coordination, integrated, the formation multiple agent of ubiquitous object Hybrid system, realize service logic.
General manufacture refers to all behaviors and work that can produce materialization result.Materialization result refers to substance, article Form existing for thing including traditional directly visible tangible thing and product also include existing for certain medium Originally invisible thing, such as all kinds of schemes, literary works, computer software, integrated circuit diagram, etc..
Therefore, general manufacture here also includes production in addition to the manufacture including product and article in traditional manufacturing industry Industry and service trade and the research of other industry, design and creation work.
General manufacture is the widened manufacture of scope that will be manufactured, by the pervious production for being included into service trade or other industry Affairs are also included in manufacture scope, and basic reason is with manufacturing development, and people have in depth recognized that many does not belong to In conventionally manufactured production affairs also, substantially belong to manufacture scope, for example, the creation of all kinds of technical solutions, all kinds of scientific skills The research and development of art, the creation of all kinds of literary works, the exploitation of computer software, personnel training, etc.." manufacture " of these types, The process of " manufacture " and mode and traditional manufacture difference are very big, but purpose is the same: generating the achievement of " materialization ", also It is to generate directly visible or indirect visible thing.Manufacture scope is included in these non-traditional manufactures, is conducive to uniformly locate It manages and complements each other development.
Therefore, general manufacture is extensive more than conventionally manufactured, and application range is also more extensive than traditional manufacture, therefore also has more Extensively with deep demand and market.
In the fourth industrial revolution, traditional industrial classification (first to the tertiary industry) will be not present, industry and life The boundary for producing, manufacturing, servicing will be cancelled, and industry will be with a kind of appearance of the form of synthesis, this is mainly reflected in terms of two: " system Make/produce " object it is unitized, the implementer of " manufacture/production " will unitize.Therefore, the concept of general manufacture should be the 4th One of the basic demand of the secondary industrial revolution.
Edge calculations refer to calculation processing nearby in the calculating mode of edge device Yu system side, can be popular regard as It is a kind of to calculate mode nearby.Edge device and system include instrument and equipment, data source, system implementation end.Calculating is the meter of broad sense It calculates, including processing data information, storage and transmission etc..Edge calculations are substantially a kind of distributed computings.In edge calculations, Target is that edge device and system is made to can receive control, to participate in calculating, and calculated result is sent.Therefore, it It asks edge device that there are computing capability, networked capabilities and service ability is provided.
Therefore, either edge calculations or general manufacture, wherein most basic requirement is that ubiquitous object is accessed network.
Access for object, before this in Internet of Things emphasis consider be equipment access, to the object other than equipment Access, lack standardized method.Access to equipment is generally used interface unit mode.Interface unit it is basic composition at Dividing includes: A) input port: for connecting the sensing point of equipment, realize the reading of state;B) output port: the control of equipment is connected It is processed, realize the output of control command;C it) is connected to the network: the communication connection with other objects.Software in interface unit;C it) controls Device: it for reading the input data of interface unit from the input port of interface unit, is handled according to given logical, forms output number According to being sent from output port.In addition, controller also passes through communication port sending and receiving data.
For example, the ECU on Hyundai Motor is exactly typical interface unit.
Currently, controller mainly has following several forms:
1) PC interface board: being usually industrial personal computer in PC() on be inserted into several pieces of special purposes interface card constitute an interface unit.It is defeated Entering output and network communication has the plug-in card of PC to serve as, and controller is the software module operated on PC.
2) PLC: being exclusively used in the programmable logic controller (PLC) of control, from port, supports to write control with dedicated language Device program.
3) single board computer: using single board computer system as interface unit, generally all it is integrated with required port.Make extensively on automobile ECU just belongs to single board computer system.Single board computer system minute mark standard and dedicated two class.The port for the standard of standard being to provide and Programmed environment, user writes the control program of oneself under programmed environment support, without designing hardware.Dedicated is from soft Part to hardware is designed according to specific requirements, and the control mode of hardware is also that dare not open.
The single board computer interface of currently a popular standard mainly includes NodeMCU and Arduino
Arduino is succeeded in developing by an European development teams in winter in 2005, Major Members include Massimo Banzi, David Cuartielles, Tom Igoe, Gianluca Martino, David Mellis and Nicholas Zambetti Deng.Arduino is initially positioned at open source electronics Prototyping Platform, includes Arduino board and Arduino IDE two large divisions. On the one hand Arduino board is used to just connect various equipment and network by board, on the one hand by being embedded in Arduino board Application program controlling these be connected to equipment just.
The control of Arduino plate is realized by Arduino application program.Arduino application program is with being based on The Arduino programming language of Wiring is carried out in the case where Arduino develops Environmental support (IDE).Arduino program is in Arduino It is compiled as binary code under IDE, is solidificated in Arduino plate.
Arduino IDE is based on Processing.A kind of exploitation environment of the Processing based on Java, feature is to be based on " sketch sheet " (Sketch), a computer program is regarded as the sketch sheet an of code by it, towards image generation and data It shows.In Arduino, the sensing data that Arduino plate is passed to visually is shown with can be convenient using Processing Out.In addition, most of things that Java can be done can also be done using Processing.
NodeMCU is the platform of internet of things increased income according to the saying of NodeMCU R&D team.In fact, NodeMcu It is also a kind of Internet of Things object access technology, it is programmed using Lua scripting language.The platform is based on embedded Lue(eLua) it opens Source item.Lua is a small and exquisite scripting language, is Rio de Daneiro, BRA Catholic University of America (Pontifical Catholic University of Rio de Janeiro) an inner research group developed in 1993, and purpose of design is to be embedded in In application program, to provide flexible extension and customization function for application program.Lua script can be easily by C/C++ Code calls, and can also call the function of C/C++ in turn, this allows Lua to be widely used.
Lua supports procedure-oriented (procedure-oriented) programming and functional expression to program (functional simultaneously Programming), automatic memory management is supported, provide a kind of universal class: array may be implemented with it in table (table), Hash table, set, object.The matching of language build-in module.It supports closure (closure) concept, makes function that can also regard one as Value, also supports cooperating process.
The contents of the present invention are the defects according to existing for the interface unit of current standard veneer type, are provided a kind of new Veneer type interface unit, emphasis are the system and development approach of the control software of interface unit.
Summary of the invention
One, basic content
The present invention provides a kind of method for network access and access control method for ubiquitous object, can apply Internet of Things, industry The fields such as internet and edge calculations.
Ubiquitous object refers to the various objects of network participation information system activity to be added, including people, object, machine, number, soft. Here, " people ", which refers to, participates in movable staff, general to be networked using " object is not networked " mode;" object " refer to do not control with The article of ability to work, and networking mode is not networked by object;" machine " refers to the tool with control with automatic work ability With equipment, also includes computer system, can be networked by control interface (interface unit);" number " refers to that the data of electronization are deposited Storage, is typically also to pass through computer system accesses;" soft " refers to computer software, for the access of other Object Operations.
Given cut-in method and control method is by a kind of object implementatio8 for being known as interface unit UOC.Interface unit is by inputting Port, output port, communication port and monitor composition.Input/output port connects ubiquitous object, and communication port establishes network Connection, monitor are responsible for the operational access of ubiquitous object, coordinate various functions needed for each section realizes interface.
The control of the work of interface unit, is responsible for by monitor.Monitor is with the mode work of ubiquitous object driving pendant assembly Make.Monitor calls message handling device dynamical assemble message processing logic after detecting the action of ubiquitous object.That assembles is basic Ingredient is pendant.Pendant is a kind of standardized software module, is write by user, to realize specific service logic, in logic It is articulated in monitor.
Two, interface unit forms
Interface unit is mainly made of input port, output port, communication port and monitor, and each chief component illustrates such as Under:
■ input port: for reading the data of ubiquitous object, sensor and the output data channel of ubiquitous object are generally connected. It is mixed and is realized by software and hardware, had and read control and data transformation function.
■ output port: for being mixed and being realized by software and hardware to ubiquitous object output data and control command, there are data Output control and conversion function.
■ communication port: for the data communication with external object, the connection with network object is realized.
■ monitor: state publication, data publication, the service offer, behavior intelligent operation to ubiquitous object are used to support The functions such as control and edge calculations and external user pass through the ubiquitous object of NS software.From the aspect of port, monitor Function including three aspects:
A) port controlling, emphasis are the control logics according to user, read data from input port, are analyzed and handled, raw At output data or instruction, it is sent to output port;
B) network communication: being on the one hand to monitor internet message, and after having the message for meeting specification to reach, Accept message turns corresponding Message processor processes;It on the other hand is that the request of message handling device is answered to send message.
C) service logic dynamical assemble: port data, local data base, method base and other defined pendants are done For data source and service source, new pendant is set, these data sources and service source are carried out with the combination of service-oriented logic realization With cooperate with, form new pendant, realize set service logic.
Three, interface unit host type
The following several situations of hardware support needed for the specific implementation of UOC point:
A) computer system
Hardware is a computer system, and it is department of computer science suitable for ubiquitous object that UOC software, which operates in the computer system, The case where data in system store;For example, database as ubiquitous object, software service as ubiquitous object, belong to this Situation.
B) computer system+interface card
Hardware is the additional computer system interface card (such as PCI) of a computer system, and the interface card is directly and hardware classes Ubiquitous object connection.UOC software operates in the computer system, and such case is applicable in be controlled with industrial personal computer.Such as motion control Card and some other A/D card can be used as interface card.
C) single board computer+interface
Hardware is single board computer and entrained equipment interface, and UOC software operates in the single board computer system, such case be applicable in The case where directlying adopt single board computer control equipment.The example of single board computer has Arduino and NodeMCU etc.;
D) PLC
Hardware is PLC, and UOC software operates in PLC or in the computer system being connected to, and such case is applicable in be controlled with PLC System.
Four, monitor composition and working method
The core of interface unit is monitor software.Software composed structure is referring to Fig. 1
Monitoring software is by three kinds at being grouped as: engine, pendant, method base, data structure.
(1) pendant and method base
The software module that pendant has been construction standard is called or is started for message handling device or event transmitter, with reality The event of the Message Processing or specified event of now specifying message generates.The description of this " specified " relationship, passes through configuration file It carries out, this description referred to as " mounts ".
Method base is the customized standardized program module of user, is called for pendant, to realize complicated pendant function.
(2) data structure
Including message queue, transmit queue, event description table, pendant allocation list, ubiquitous object interaction image UOB.Message queue The message of the various tape handling of storage system;The message that transmit queue storage band is sent by network;Event description table defines thing The occurrence condition of part;Pendant allocation list defines the mapping relations of message handling device pendant and message.Ubiquitous object interaction image UOB External data are issued to for buffering ubiquitous object.
(3) engine
Engine is the software of cycle detection and listening mode work.With regard to carrying out cycle operation always after starting.Engine includes message Engine, event engine, transmitting-receiving engine, as shown in Figure 2.
Five, the working mechanism of monitor
The working mechanism of monitor is described below.
The work of ■ message engine: message engine monitoring information queue always, after finding pending new information, taking-up disappears Breath, calls corresponding message handling device to handle message.It is that user is according to service logic that user, which needs the groundwork cooperated, Demand, mounts the Message Processing pendant of corresponding service-oriented logical process on message engine, and mounting is described by piece supplying File is realized;Pendant is responsible for the tissue of message execution, and specific Message Processing is realized by pendant called side Faku County, needed at this time User setting method library module is called for message handling device;
Message engine implementation procedure is described as follows:
[1] it initializes;
[2] message queue message whether to be handled is checked;
[3] if without message to be processed, turn [1];
[4] (message to be handled) takes out message;
[5] message is analyzed, the corresponding Message Processing pendant of message is found out;
[6] start found out Message Processing pendant;
[7] turn [1]
■ receives and dispatches engine work: monitoring network request message and transmit queue, it is found that after standardized internet message reaches, connects Message is received, message is stored in message queue, while also detecting transmit queue, after there are internet message to be sent, execution disappears Breath sends work.It is to preset the message handling device of processing network request, be articulated to message and draw that user, which needs the groundwork cooperated, It holds up;If necessary to send data, then in the pendant for sending processing, generates and send message, be stored in transmit queue.
Transmitting-receiving engine implementation procedure is described as follows:
[1] it initializes;
[2] network port is monitored;
[3] if there is legitimate network request message reaches, turn [10];
[4] transmit queue message whether to be handled is checked;
[5] if without message to be processed, turn [];
[6] (transmit queue message to be handled) takes out message;
[7] message is analyzed, the corresponding Message Processing pendant of message is found out;
[8] start found out Message Processing pendant;
[9] turn [2];
[10] (there is the arrival of legitimate network request message) and receive message instruction;
[11] analysis message instruction checks that legitimacy discards the message if unqualified, turns [13];
[12] network request message is generated, message queue is stored in;
[13] turn [4];
The work of ■ event engine: event engine, which is responsible for periodically detecting event and defines table, calls event after discovery event occurs Generator pendant generates data and operation for event, the event occurred is then stored in message queue as message, for Message engine starts the processing to event.It is to define event according to business demand and define table that user, which needs the groundwork cooperated, Predeterminable event generator pendant and event handler pendant.Timing definition table describes the occurrence condition of each time, and when pointing out Between occur after call what pendant with the data and operation of generation time.
Event engine implementation procedure is described as follows:
[1] it initializes;Event is defined into table first defined item as current event definitions item;
[2] check whether current event definitions item meets event occurrence condition;
[3] if being unsatisfactory for event occurrence condition, turn [5];
[4] (current event definitions item meets event occurrence condition) if the corresponding event of current event definitions item generates pendant not Starting or failure pause, then start the pendant, which will generate corresponding data for event, and generate an event message It is stored in message queue;
[5] no by first event items as new current event definitions item if current event definitions item is last term Then next event defined item is turned [2] as new current event definitions item;;
Six, monitor key data structure
The work of monitor, based on key data structure include message queue, transmit queue, event defines table, pendant configuration Table and object interaction image.
■ message queue: currently pending message, including network request (reception) message and event message are stored.Network Request message is by the generation when listening to network request and reaching of transmitting-receiving engine;Event message checks event in event engine Afterwards, pendant is generated by event to generate.
■ transmit queue: the current network to be sent of storage sends message.Such message can be generated by various pendants, and be deposited Enter the queue.The queue has transmitting-receiving engine detection to send after transmission has message to be sent;
■ event defines table: being a sequence list, a certain item defines an event occurrence condition and corresponding event generator Pendant association.It is arranged automatically by user's manual configuration or work pendant.The table is detected by event engine, and discovery has the condition of satisfaction Event, then start event generator, prepare for the processing of event;
■ pendant allocation list: for describing message handling device association, message in message queue and corresponding can as be appeared in Processor pendant establish mapping.It is arranged automatically by user's manual configuration or work pendant.The table is detected by message engine, is disappeared Breath engine finds corresponding message handling device pendant by the table when analyzing message;
The ubiquitous object interaction image UOB of ■: the data buffer storage as general interaction between objects.One ubiquitous object is emitted to The data of other objects are stored in UOB, are then actively read from UOB by other related pendants.
UOB is mainly made of queue, comprising:
State queue: the status data that storage is read from object;
Command code queue: storage reaches the control command of object under;
Data object: the data from object or outside are cached;
Upper column data, each data item, all attachment have data head, indicate source and the whereabouts of data.The data of UOB are to user's journey Sequence person is transparent, and user is arranged UOB-API by system and accesses UOB.
Seven, pendant and system pendant specification
Pendant (PIP) is distinguished from the method for operation, is divided into odd-job pendant and farm labourer's pendant.Odd-job pendant starts only operation one every time It is secondary, it terminates and returns automatically after operation;It is in operating status always after normal work pendant starting, it is similar to service, usually thread shape Formula, until foreign intervention or internal completion overall timing.
Pendant is distinguished from the object of mounting, is divided into message handling device pendant and event generates pendant.Message handling device pendant Mounting love message processing engine, there is message processing engine starting.Event handling pendant is articulated in event engine, has event engine to open It is dynamic.
Pendant is distinguished from affiliated object, is divided into system pendant and user's pendant.User's pendant has that user is customized, for real Existing user logic;System pendant is the pendant of a kind of specific use, completes the function needed for monitor works normally.Main system System pendant include:
Network receives pendant: receiving internet message;
Network sends pendant: sending message from network;
System event generates pendant: internal system event generates pendant;
Pendant is object form formally, and a pendant is exactly a program language objects.
Each pendant object, it is necessary to have a starting method and several defined attributes, concrete model are as follows:
public enum PipName
Name constant needed for { // define pendant PIP
OneOff, // odd-job type
Loop // normal work type
// other title constant definitions
}
class PIP
{
PipName pipType;The operation type of //PIP
int start() {};// starting PIP;Return starting state: 0 be it is normal, other are mistake
int reStart() {};// restarting PIP;Return starting state: 0 be it is normal, other are mistake
int stop() {};// hang up PIP;Return starting state: 0 be it is normal, other are mistake
int cancel() {};The operation of // forced termination PIP;Return starting state: 0 be it is normal, other are mistake
int pipMain() {};The program body of //PIP is called by start or is started, completes specific PIP function
……….;// other methods are placed here, for above-listed method call
}
Eight, the basic application method of interface unit
Ubiquitous object is connected using interface unit, there is following basic step:
Step 1: connecting interface device.If interface unit is hardware, the port of interface unit is connected devices to;If interface unit It is software, then interface unit is deployed to interface unit container.
Step 2: if desired, setting method library, for PIP calling;
Step 3: it writes connection PIP: according to the requirement of specific equipment, writing and realize that equipment connection disappears with what other objects were connect It ceases processor PIP and its realizes module;
Step 4: it writes communication connection PIP: according to communicating requirement, writing the PIP of processing communication information and its realize module;
Step 5: deployment PIP: PIP configuration list file is write, each PIP and preset message relating are got up.
Step 6: it writes client: writing the client of application program according to the demand of application program.Client needs to visit It asks piece supplying, using seeking part OAI Access Integration piece supplying, and fetches access result.
Nine, monitor network transmission regulation
The transmitting-receiving engine of monitor is responsible for the network communication of system.Basic function is the monitoring and transmission for carrying out network and receiving message Monitor, after listening to messaging, according to transmission protocol receive or send message, calling system PIP implement network receive or Person's network is sent.According to the network transmission regulation sending and receiving data of monitor.
Monitor network transmission regulation is established on network communication protocol, can be carried out on various protocols, including TCP/IP, MQTT, HTTP and EIIP.
Monitor network transmission regulation must first be started transmitting-receiving in advance and be drawn with the progress of telegram mode, the both sides of network communication It holds up, is in listening state.Sender sends instruction, after recipient listens to, establishes transmission connection, hereafter carries out command reception, Primary communication is completed after finishing receiving, and connection disconnects.
Ten, message instructs
The instruction of monitor message is divided into three kinds: request instruction sends instruction and response instruction.
(1) request instruction
Request instruction is used to convey user's request message of (instruction sender) to specified monitor.Specific request content and place Reason mode is explained by the pendant of piece supplying.
Format:
"Request" <requestID> <messageNo> <object> < permit > [resMode] [parameters]
Illustrate:
The instruction is for issuing request instruction to specified monitor.The semanteme of request is explained by corresponding pendant.Monitor is only born Duty receives instruction, and calls corresponding pendant processing here.
Instruction pair command word requestID is specified by user, for the further classification or difference to request instruction.
Parameter is determined by user, is specifically explained by pendant for parameter needed for specified request.
The echoplex mode of the result of request, is specified by resMode
Permit is the pass of sender.Recipient will check the validity of the pass, the permission pointed out according to the pass Control the range and content of request.
MessageNo is message sequence number, is integer value, is described with 64 bits, when being from 1 day zero January in 2017 Rise to photos and sending messages when millisecond number.Each message of piece supplying has a corresponding message sequence number mark.Message sequence number is by disappearing Requestor is ceased to generate, if the same time has multiple message to generate, by generating precedence, subsequent each message be Add 1 on the basis of previous.
ObjectID: the identifier for the object that piece supplying is connected.One monitor can connect multiple objects, different pairs As defining different object identifiers.
Parameters: the parameter of message.
(B) instruction is sent
It sends instruction and sends data to monitor for user.
Format:
"Send" <sendID> <messageNo> <object> < permit > [resMode] [parameters]
Illustrate:
The instruction is for sending data to specified piece supplying.Monitor is only responsible for receiving the number carried in the instruction and instruction According to.Other affairs are all responsible for by corresponding pendant such as the data processing or storage to being received.
The coding line of paying of instruction has user oneself determination, is further discriminated between to Send meaning.For example, may indicate that desire Coding, format and the type of the data of transmission.
The data to be sent are included in parameters.
The processing result of transmission or the echoplex mode of state, are specified by resMode
The same Request of other parameters meaning
(C) response instruction
Execution state or result of the response instruction for the instruction to requestor echo request person.
Format:
"Respond" <replayID> <messageNo> <object> < permit > [resMode] [parameters]
Illustrate:
The instruction is for sending response message to specified monitor.It is asked if a monitor A has sent before first to monitor B It seeks message or sends message, and the resMode in message is indicated and needed B back response message, then B is handling message Afterwards, using the instruction back response message.
There are two types of response messages: condition responsive and data respond, and respectively corresponding secondary command word replayID is " StautsReplay " and " DataReplay ".First parameter in condition responsive is a JSON character string, and data are rung Should be other than first parameter carry the state of JSON format, second transmission also carries also carrying data block.
Object and messageNo is address and the message number of the message responded, they are all being rung of being previously received It answers in message and takes bring information.
Monitor is only responsible for receiving the data carried in the instruction and instruction.Other affairs, as to the data received Processing or storage, are all responsible for by corresponding pendant.
The secondary coding line of instruction has user oneself determination, is further discriminated between to Send meaning.For example, may indicate that desire Coding, format and the type of the data of transmission.
The data to be sent are included in parameters.
The processing result of transmission or the echoplex mode of state, are specified by resMode.
Detailed description of the invention
Fig. 1 is ubiquitous object interface architectural schematic
Fig. 2 is driver architecture schematic diagram
Fig. 3 is OAA plate composition schematic diagram
Specific embodiment
Here the implementation example for the method and system system that the present invention provides, the side that the present invention is furture elucidated provides are provided The realization technology of method and the implementation example of system, but other realization technologies and embodiment is not precluded.
Related algorithm and data structure are described using class C++;
One, key data structure is realized
(1) queue element (QE) structure
struct OaaTMessQue
{ // define message queue element type
Type of message;
Message-length;
Informed source;
Message destination;
Message arrival time;
Message issues the time;
Message priority;
Message name;
Message name;
Message pair title;
Message parameter;
}
(2) queue object
Message queue and transmit queue are all such example.
class OaaTMessQue
{ // message queue definition
int size;// queue full-size
int long;// queue current length
OaaTMessQueElem *que;The storage of // direction queue;
OaaTMessQue(int mSize);// constructed fuction, initializing variable, assignment sizes are the queue space of mSize
int GetLong() {return long};// return to queue current length
Int Dequeue (...) // from team head take an element
int Lookqueue(…);// read team's head element content
int CancelElem(…);// to one element of inner deletion
…..
}
(3) pendant configures table structure
Pendant allocation list is described with XML.
<MEMessageDesc> <!The message semantic definition of-message engine -- >
<MessagePack name= > <!One message package of-description, packet are a tissues to message,
For example, the corresponding packet of a page -- >
<MsgType name= > <!- each element describes a message categories -- >
<MsgName name=n1.. Processor=processor java class name | resource name/>
<!The corresponding processing pendant of-each one specific message of description, passes through name Attribute Association -- >
</MsgType >
</MessagePack >
</MEMessageDesc>
Wherein, MsgType and MsgName are that the information type that must define with client is corresponding with title.Procesor pairs The name answered, for specifying the processor pendant of message.
(4) event defines table
Description is similar to pendant allocation list, and difference is to replace message name and type with logical expression.
(5) object interaction image
Ubiquitous object interaction image is a data structure in logic, stores the state being concerned, data and the control of ubiquitous object System instruction.
State is the working condition of ubiquitous object, includes current state and historic state;There are two types of data, and one is ubiquitous The data of object output, another external object are input to the data or control command of internal ubiquitous object.Control command is Issue the control command of ubiquitous object in outside.
The interaction image of all ubiquitous objects of system is all in accordance with data arrival
Illustrate separately below these three data and related data logical construction,
(A) mapping table
If a ubiquitous object there are multiple states, (ID) is identified with 1 natural number respectively
One state can retain multiple historic states, be ID with 0 integer, 0 represents current state, and 1 represents currently upper One state, the rest may be inferred by analogy
(B) it orders
Order is intended for the control command of equipment, and different equipment has different control commands, here this defined order structure Model, specific command format, semanteme etc. are determined by specific equipment.
Each equipment, a corresponding command queue, sequential storage the current pending order of equipment.After order is performed Withdraw queue.The format ordered in queue is as follows:
1 parameter 2 ... of command word parameter
Between command word and parameter and between each parameter, there is space segmentation.In one parameter if comprising multiple fields, word Separated between section with comma.
(C) data
Data are divided to two kinds: input data and output data.Input data is the external data for being transferred to equipment, and output data is to set It is standby to be output to external data.The format and semanteme of data are determined by equipment.
Input and output data, data element random length in queue are stored with two queues respectively, data type is supported Java data type.
The definition of device Image interface
public interface IDevAccess
{ // define a common interface, makes the image access interface of different equipment all inherit the interface
}
public interface IDevAccessRead extends IDevAccess
The access interface IDevAccessRead of { // define read-only device
// set an equipment and have multiple states, (ID) is identified with 1 natural number respectively
// mono- state can retain multiple historic states, be ID with 0 integer, 0 represents current state, and 1 represents currently Last status, the rest may be inferred by analogy
Int getStatusCurr (state ID);The corresponding current state of // reading state ID, if it fails, negative is returned, Otherwise 0 is returned
Int getStaus (state ID, history ID);The history ID of // reading " state ID " is the historic state of " history ID ". If it fails, returning to negative, otherwise, the history number of the state actually read is returned to
}
public interface IDevAccessReadControl extends IDevAccessRead
The control interface IDevAccessReadControl of { // define equipment
Int sendControl (order);// equipment the control command for representing " order ", is sent to the command queue of equipment. If it fails, returning to negative, the current command number in queue is otherwise returned.After order is sent to command queue, there is the control of equipment System control processed executes.
Int cancelControl (order);// revocation is already sent to nearest one " order " of queue.If lost It loses, returns to negative, otherwise, return to 0
}
public interface IDevAccessReadData extends IDevAccessRead
The data interaction interface IDevAccessReadControlReadData of { // define equipment
Int writeData (data);The data queue of // data element the write device for representing " data ".If it fails, Negative is returned, otherwise returns to 0.
Int readData (data);// from the output queue of equipment one data element of reading, it is stored in specified " number According to position ".If it fails, returning to negative, otherwise, 0 is returned to
}
abstract class CDevAccess
// define an abstract class CDevAccess, support various CDevAccess all from succession
public CDevAccess ();
}
class CPLCAccess extends CDevAccess implements IDevAccessRead, IDevAccessReadControl, IDevAccessReadData
{ // realize the interface for being directed to PLC
}
public class CDevAccessFactory
{ // factory class is realized createDevAccess (DevAccess location information)
public CDevAccess createDevAccess (int type)
{
switch (type)
{
case 1:
return new CPLCAccess ();
case 2:
return new …;
default:
return new …;
}
return null;
}
}
One, the implementation method of supervisor engine
Here the description of related realization method is provided with class Java language.
(1) engine main program OAAE () implementation model
int OAAE()
Initialization needed for { // be monitored device starts each engine, returns to execution state, and 0 indicates normal, other are error
Init();The various data structures of // initialization
StartEventEng();// starting event engine thread, to detect the generation of various events
StartTransceiverEng();// starting transceiver engine thread
StartMessageEng();// initiation message engine thread
}
int StartEventEng()
{ // event engine checks that event table to find the event occurred, starts corresponding event generator pendant, by event Message queue is stored in as message;
Init();The various data structures of // initialization
StartTransceiver();// starting transceiver thread, to support network communication
StartUserEventDetector();// starting user's customized event detector thread, to detect various users certainly Definition event and message
StartDataDetector();// starting custom data variation detector, to have detected whether new data
}
(2) event queue designs
Event queue is divided into three kinds of network event, object event and internal event queues.
Network event queue: storage carrys out the message of automatic network or is sent to the message of network;
Object event queue: message of the storage from the ubiquitous object of inner port;
Internal event queue: message of the storage from the customized internal event of user;
The API of every kind of queue is similar, and main AP wants member function as follows:
GetEven (queue ID): (team's head) element is won in the queue indicated from " queue ID ";
ReadEven (queue ID): (team's head) element is won in the queue indicated from " queue ID ";
AddEvent (queue ID, event, priority): specified queue is added according to its priority for specified event.Commonly The event of priority is then added to queue end.
KillEvent (queue, event id): the specified event in specified queue is deleted;
Two, the hardware implementation method of interface unit
Current OAA plate is divided into unibus structure and two kinds of dual-bus structure, is applicable in and high-end applications and is normally applied respectively.
CPU, RAM of monobus OAA plate are directly connected by system bus with each device interface module.Dual bus knot CPU, RAM of structure and the connection bus of each device interface module are to separate.
The interface of OAA plate is divided into two classes: communication connection is connected with monitoring of tools.
The purpose of communication connection is the network realized between object, including equipment communication and software object communication.In particular, The connection between OAA is also realized in communication connection.As shown in Figure 3.Main communication interfaces module includes that (optional) is following several:
■ ether module: the network insertion for equipment
■ NB-IoT module: cellular narrowband Internet of Things (Narrow Band Internet of Things, NB- are based on IoT), it is mainly used for the network insertion of equipment;
■ LoRa: the remote wireless transmission based on spread spectrum;It is mainly used for the network insertion of equipment;
■ WIFI: WLAN;It is mainly used for the network insertion of equipment;
■ bluetooth: short-distance wireless communication is mainly used for equipment room short haul connection, is also used for monitoring of tools connection
■ CAN: fieldbus is mainly used for equipment network;
Monitoring of tools connection is mainly used for connect monitored device, these connected equipment it is typically no or it is weak have communication and Computing capability.Primary interface module includes:
■ is infrared: the communication of infrared transmission information, is mainly used for controlling household appliance
■ COM: the serial communication of RS232 and 485 is supported;
■ USB: the serial communication of hot plug is supported;
■ SPI: high-speed synchronous serial communication
■ GPIO: universal input/output interface;
■ PWM: pulse width modulation carries out digital coding to analog signal level;
■ A/D, D/A: modulus and digital-to-analogue conversion;Main application simulation signal acquisition, simulation control etc.;
■ NFC:IC near-field communication is mainly used for being connected and being communicated based on IC card.

Claims (7)

1. a kind of monitoring and connecting interface method, which is characterized in that a kind of interface unit is arranged, by input port, output port, leads to Port and monitor composition are believed, for including people, object, instrument and equipment, computer system, computer software and data The monitoring and network connection of ubiquitous object support the data of ubiquitous object and state publication, service to provide, intelligent control implementation, Then ubiquitous object collaboration " manufacture " is supported and as edge calculations node.
2. it is described in claim 1 monitoring interface composition and work, be characterized in that, monitor by message engine, event engine, Engine, processing pendant, method base, message queue, transmit queue are received and dispatched, event defines table, pendant allocation list and object interaction Image composition;Input port is used to read the data of ubiquitous object, and sensor and the output data for generally connecting ubiquitous object are logical Road;It is mixed and is realized by software and hardware, had and read control and data transformation function;Output port is used for ubiquitous object output data And control command, it is mixed and is realized by software and hardware, there is data output control and conversion function;Communication port is used for and external object Data communication;Ubiquitous object network connection, data and state described in claim 1 are issued, service provides, behavior is intelligently controlled The method of the completion of the functions such as system, edge calculations is that message engine, event engine and transmitting-receiving engine are according to following mechanism works:
Message engine: message engine monitoring information queue always after finding pending new information, takes out message, calls phase The message handling device answered is to handle message;User needs the groundwork that cooperates to be, user according to the demand of service logic, The Message Processing pendant of corresponding service-oriented logical process is mounted on message engine, mounting is that file reality is described by piece supplying It is existing;Pendant is responsible for the tissue of message execution, and specific Message Processing is realized by pendant called side Faku County, needs user to set at this time Method library module is set, is called for message handling device;
It receives and dispatches engine: monitoring network request message and transmit queue, it is found that after standardized internet message reaches, reception disappears Breath, is stored in message queue for message, while also detecting transmit queue, after there are internet message to be sent, executes message hair Send work;It is to preset the message handling device of processing network request, be articulated to message engine that user, which needs the groundwork cooperated,; If necessary to send data, then in the pendant for sending processing, generates and send message, be stored in transmit queue;
Event engine: event engine, which is responsible for periodically detecting event and defines table, calls event generator after discovery event occurs Pendant generates data and operation for event, the event occurred is then stored in message queue as message, so that message is drawn Hold up the processing started to event;It is to define event according to business demand and define table that user, which needs the groundwork cooperated, presets thing Part generator pendant and event handler pendant;Timing definition table describes the occurrence condition of each time, and points out the time Call any pendant with the data and operation of generation time afterwards.
3. transmitting-receiving engine as claimed in claim 2, communication control procedure is " telegram mode ", carries " pumping " instruction by transport protocol Realize internet message communication;Transport protocol need to only support one-way transmission;Pumping instruction includes request instruction, sends instruction and response Three kinds of instruction is respectively used to request data or the customized service of user, sends data and request results loopback;Receive and dispatch engine packet Corresponding transport protocol module is called to connect to identify the type of the agreement of conveying pumping instruction containing a transport protocol determining device Receive instruction.
4. event engine as claimed in claim 2, the structure that event defines table is (event occurrence condition, event generator pendant ID, event generator pendant executive mode, event generator pendant execute state);Event occurrence condition logical expression, is worth and is Start corresponding event generator pendant when event engine monitors when "true";Event generator pendant executive mode points out thing Part is to block method of calling (primary to call, block type returns) with thread sparking mode (running always after starting) or module also It is that the non-obstruction of module (lighting a fire, but only operation is once returned to, caller is not to wait for returning) returns to starting event transmitter;Event Generator pendant execute state be used to indicate last time starting event generator execution state (thread operation, block type operation, Non- block type operation, is completed, failure).
5. data publication described in claim 1 and behavior intelligent control are based on more pendant cooperative achievements;The realization of data publication It is carried out by setting data publication pendant;Data publication pendant injects pendant by data acquisition pendant, data transmission pendant, data Sequence cooperates with, they realize the target injection of the acquisition of incremental data, the transmission of incremental data and incremental data respectively; Behavior intelligent control realizes that behavior intelligent control pendant is identified by ubiquitous Obj State and hung by setting behavior intelligent control pendant Part, ubiquitous object behavior decision pendant, ubiquitous Obj State identification learning pendant, the study pendant collaboration of ubiquitous object behavior decision It forms;State recognition pendant provides the status categories of ubiquitous object group based on ubiquitous object group current state and historic state;Certainly Plan learns current state classification and task of the pendant based on ubiquitous object group, provides the control command sequence of optimization, It is executed by setting event by specified ubiquitous object is reached under decision.
It is supported 6. side service described in claim 1 provides to calculate with edge, the service based on interface unit;The service of interface unit Change, even if interface becomes service node, defines the request instructions of oneself, setting in the request instruction of pumping instruction first Service request handling pendant is articulated to message engine by service request handling pendant and method base;The realization of edge calculations, be The service of setting storage, processing, inquiry etc., the ubiquitous object that supporting interface represents are participated in as service node in interface unit Edge calculations.
7. on the one hand ubiquitous object interaction image as claimed in claim 2, the snapshot of the interacting activity as ubiquitous object record Ubiquitous object is sent to state, data, order of other objects etc., on the other hand records other objects and is sent to the ubiquitous object State, data and order etc.;Access of the processing pendant to ubiquitous object of message engine mounting is all that this is ubiquitous for operational access The interaction image of object, and interact the binding of image Yu ubiquitous object, be by the reading pendant of the ubiquitous object with to write pendant complete At.
CN201910495128.2A 2019-06-12 2019-06-12 Ubiquitous object interaction interface method towards general manufacture and edge calculations Pending CN110209383A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910495128.2A CN110209383A (en) 2019-06-12 2019-06-12 Ubiquitous object interaction interface method towards general manufacture and edge calculations

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910495128.2A CN110209383A (en) 2019-06-12 2019-06-12 Ubiquitous object interaction interface method towards general manufacture and edge calculations

Publications (1)

Publication Number Publication Date
CN110209383A true CN110209383A (en) 2019-09-06

Family

ID=67791640

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910495128.2A Pending CN110209383A (en) 2019-06-12 2019-06-12 Ubiquitous object interaction interface method towards general manufacture and edge calculations

Country Status (1)

Country Link
CN (1) CN110209383A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111459965A (en) * 2019-12-24 2020-07-28 中国科学院沈阳自动化研究所 Information monitoring system facing edge calculation
CN112083914A (en) * 2020-08-31 2020-12-15 深圳航天科技创新研究院 Method and system for realizing soft bus of object model embedded operating system
CN115857915A (en) * 2022-12-28 2023-03-28 广东外语外贸大学南国商学院 Object digitalization method for meta-universe system development

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111459965A (en) * 2019-12-24 2020-07-28 中国科学院沈阳自动化研究所 Information monitoring system facing edge calculation
CN111459965B (en) * 2019-12-24 2023-05-05 中国科学院沈阳自动化研究所 Information monitoring system for edge calculation
CN112083914A (en) * 2020-08-31 2020-12-15 深圳航天科技创新研究院 Method and system for realizing soft bus of object model embedded operating system
CN112083914B (en) * 2020-08-31 2023-09-12 深圳航天科技创新研究院 Method and system for realizing object model embedded operation system soft bus
CN115857915A (en) * 2022-12-28 2023-03-28 广东外语外贸大学南国商学院 Object digitalization method for meta-universe system development
CN115857915B (en) * 2022-12-28 2024-03-15 广东外语外贸大学南国商学院 Object digitizing method for meta-universe system development

Similar Documents

Publication Publication Date Title
Liu et al. Web-based digital twin modeling and remote control of cyber-physical production systems
CN110209383A (en) Ubiquitous object interaction interface method towards general manufacture and edge calculations
US11385613B2 (en) Process image within controllers enabling visibility and accessibility of real world objects
EP1913540B1 (en) Enhanced controller utilizing rfid technology
US20030233432A1 (en) Web-based interface for building management systems
US10416614B2 (en) Human programming interfaces for machine-human interfaces
CN106027671A (en) Cloud computing based industrial data bus and data service system
CN109048932A (en) A kind of intellect service robot system
CN107969167A (en) Physical awareness action triggers
CN109547299A (en) Information processing method, device, intelligence control system, intelligent gateway and server
CN112363718A (en) Industrial application integration system based on micro-service architecture
Seiger et al. A case study for workflow-based automation in the internet of things
Jost et al. Multi-agent systems for decentralized control and adaptive interaction between humans and machines for industrial environments
CN113536503A (en) Factory heterogeneous equipment access platform and method
KR101834066B1 (en) System and method for managing collaboration between the devices based on machine socialization using access point
JP4125005B2 (en) Object linkage device that uses message types
Jiang et al. Industrial dataspace: A broker to run cyber-physical-social production system in level of machining workshops
Bhandari et al. An internet-of-things system architecture based on services and events
Moawad et al. A rule-based contextual reasoning platform for ambient intelligence environments
CN112231231B (en) Cloud service debugging method, system and device
CN1316408C (en) Signaling events in workflow management systems
CN114493911A (en) Production line management method and system based on asset management shell
Choi et al. Connect with things through instant messaging
Kumar et al. Design and implementation of an automated office environment system using embedded sensors
Viñas I. Model Driven Development of Agents for Ambient Intelligence

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