The hottest RFID Middleware Technology

  • Detail

Radio frequency identification middleware technology

radio frequency identification (RFID) technology is a fast, real-time and accurate information acquisition and processing technology, which can uniquely and effectively identify physical objects through radio frequency signals. It can be widely used in production, retail, logistics, transportation, medical treatment, national defense, animal husbandry, mining and other industries

the basic RFID system generally consists of three parts: tag, reader and application support software. Middleware is an important part of application support software. It is a bridge connecting hardware devices such as tags, readers and enterprise application software such as enterprise resource planning (ERP) and customer relationship management (CRM). The main task of middleware is to filter, summarize, calculate and group the tag related data sent by the reader, reduce a large amount of raw data sent from the reader to enterprise applications, and generate event data with semantic interpretation. It can be said that middleware is the nerve center of RFID system

for the design of RFID middleware, there are many problems to be considered, such as how to realize many quality attributes of software, how to realize the isolation between middleware and hardware equipment, how to deal with the relationship with equipment management functions, how to achieve high-performance data processing, and so on

1. RFID network frame structure

the frame structure of RFID network is shown in Figure 1

Figure 1 RFID network structure frame figure

tag data is reported to the application system through middleware grouping, filtering and other processing; The application system is responsible for the persistent storage of event data and the management of business information bound by tags

rfid system shared public service platform provides public services such as root node object name service (ONS), enterprise application authentication management, tag information discovery and enterprise authorization code management. Among them, the root node ons, together with the internal ons of all enterprise RFID systems, forms an ons tree. Any tag can find the address of the tag information base corresponding to the tag on the ons tree, that is, it can further access the detailed information corresponding to the tag

2. Middleware function and implementation principle

in a word, the function of middleware is to accept the request of the application system, send operation commands to one or more designated readers, such as tag inventory, tag identification data writing, tag user data area reading and writing, tag data locking, tag killing, etc., and receive, process, and report the result data to the background application system

among them, tag counting is the most basic and widely used function

in addition

2.1 overview of label counting function

the workflow of label counting can be simply described as:

the application system defines the requirements for label data in the form of rules, which are proposed by the application system to the middleware and maintained by the middleware. The rules define: which readers' inventory data are required, the start and end conditions of the label data reporting cycle (event cycle), 164 synthetic resin lotion sand wall architectural coating, how to filter the label data, how to group the label data, whether the reported data is the original count data, new label data or new minus label data, and what original data the label data contains

the application system specifies a rule to propose the subscription of tag data to the middleware

the middleware starts the event cycle in time according to the reservation of the application system to the tag data, and sends the tag inventory command to the reader

the reader sends the data counted in a certain time period (reading period) to the middleware. The reading cycle can be determined by the middleware and reader through private negotiation

the middleware receives the data reported by the reader

according to the definition of the rules, the middleware performs filtering, grouping, accumulation and other operations on the received data, and generates a data result report according to the requirements of the rules at the end of the event cycle, which is sent to the subscribers of the rules. The filtering process can remove duplicate data and data that the application system is not interested in, greatly reducing the amount of data transmitted between components

see Figure 2 for this process

Figure 2 middleware tag inventory summary flow chart

here, we need to explain the concept of logical reader

middleware abstracts the event source into a logical concept logical reader. A logical reader can contain multiple physical readers, and even more refined into multiple antennas containing multiple physical readers

the division of logical readers can be determined according to the actual system deployment, the complexity of stainless steel process and the high requirements for performance and technology. For example, four readers are deployed at two exits of a warehouse. These four readers can be configured as a logical reader according to needs, which may be named as warehouse exit. When the application system needs the label data of the warehouse exit, it can issue an inventory command based on this logical reader, and the name of the logical reader is used as a parameter of some application program interface (API) calls

2.2 implementation principle of label counting

as mentioned above, rules are the key element of the whole middleware function. The rule is equivalent to the purchase order sent by the application system to the middleware, which defines the requirements for the time (event cycle) and specification (how to filter, group, report style, etc.) of goods (label data). The principle description part refers to the relevant contents of EPCglobal

rules and reports have their own information model to represent the information they carry. At the same time, rules have their own state machine model. When accepting the long-term subscription and single subscription of the application system, these subscription operations will trigger the state transition of the rules, such as the transition from the never requested state to the requested state

rules are defined by the application system through API

(1) rule information model

the unified modeling language (UML) is used to describe the rule information model, as shown in Figure 3

Figure 3 rule information model figure

in an object-oriented context, rules can be represented as a class (ecspec). It can be seen from the description of the information model that a rule class has an association with many other classes, or has the following attributes: lists of one or more logical readers, event cycle boundaries, reportspecs of one or more reports, and whether to include the marks of the rule itself in the report

(2) the report information model

is similar to the rule information model. The report information model is shown in Figure 4

Figure 4 report information model figure

among them, the event report group class (ecreports) has the following attributes: rule name (specname), time reporting time (date), event cycle length (totalmilliseconds), event cycle end condition (terminationcondition), rule definition class instance (SPEC), and instance list (reports) of one or more report classes


report class (ecreport) contains specific label data information

(3) tag inventory API

requests for definition rules, subscription data, etc. issued by the application system are completed by calling the API provided by the middleware. The API calling process can be implemented by Java RMI, soap and other related specific technologies, and the most important API is shown in Table 1

Table 1 tag inventory application interface

where, the poll operation is equivalent to the unsubscribe operation calling after the subscribe operation receives the data of an event cycle; The immediate operation is equivalent to the define operation. After defining the rule, call the poll operation, and then call the undefine operation

(4) rule state machine model

rules start from their definition and may exist in three states: unrequested, requested and active

after the rule is created, it has not been subscribed by any client (i.e. application system), and the rule is in the unrequested state; The first booking action of the rule will make the rule jump to the requested state; When the event cycle start condition is met, the rule enters the active state; When the event cycle end condition is met, if there is a subscriber in the rule, it will jump to the requested state, otherwise it will jump to the unrequested state

3. Middleware system architecture

as a software system (or component), in addition to realizing certain function and performance requirements, the quality attributes such as comprehensibility, scalability, modifiability (or reconfigurability), pluggability, reusability and so on will be put forward as the requirements of software design

in the past ten years, object-oriented thinking has occupied the field of software design almost completely and become the most mainstream analysis and design method. In recent years, the research on design patterns has become more and more perfect. Patterns have almost become a higher-level programming language (compared with Java, c++ and other high-level programming languages) and are widely used

object-oriented thinking and design patterns are all aimed at achieving the goals of software comprehensibility, extensibility, modifiability, pluggability and reusability. This paper will also apply object-oriented thinking and reference pattern language to make a preliminary discussion on the software architecture of middleware. The following examples, such as high-level programming language, all use java language [2]

3.1 encapsulate and isolate the nodes in the processing process

divide the nodes in the middleware business process into different modules for processing, which can obtain the advantages of encapsulation, high cohesion, low coupling, etc., see Figure 5

Figure 5 module division diagram of middleware system

among them, the report upload module is responsible for realizing different types of report upload methods, such as HTTP, JMS, etc; API interface module is responsible for isolating the application system and the middleware core business logic processing module, and providing the middleware API interface to the application system; The middleware core business logic processing module is responsible for the middleware core business, including data receiving and filtering, data grouping, report generation, rule object status jump, etc; The reader communication module is responsible for the communication between the middleware system and the reader

3.2 facade mode and factory mode expose API interfaces to the outside

in order to avoid excessive coupling of the client side of the background application system, that is, middleware, facade mode is used to realize clear isolation between the inside and outside of the system. See the sequence diagram shown in Figure 6 for the processing flow. The client only establishes contact with the facade class. If the facade interface is clearly defined, the client can know nothing about the internal implementation of the middleware, which reflects the encapsulation in object-oriented

Figure 6. See the source code example for the design of the client calling apt sequence diagram

class. It can be seen that using simple factory mode can flexibly replace the version of the API implementation class without the client's knowledge. The middleware API interface clearly defines the operations provided by the middleware. The client only needs to know that the apifactory class can get instances of the middleware API interface. Middleware API interface middlewareapi:


void define (string specname, ecspec spec);

void undefine (string specname);

void subscribe (string specname, string URI);

void unsubscribe (string specname, string URI);

epcreports poll (string specname);

epcreports poll (string specname);

kreports immediate (ecspec spec);


factory class apifactory:


publicstaticmiddlewareapigetapiinstance() {


implementation class of API a:


publicstaticvoidmain (string[] args) {

middlewareapi API = tapiinst

Copyright © 2011 JIN SHI