Pick  want: This article analyzes the characteristics of the distributed Bluetooth home network, and proposes a solution to establish an object-oriented Bluetooth distributed smart home network. An object-oriented Bluetooth communication model is established for the solution, and its application in the smart home network is carried out. Analyze and look forward to the development prospects of the object-oriented Bluetooth distributed smart home network. introduction With the development of communication technology, network technology, control technology and artificial intelligence technology, people have higher and higher requirements for the comfort and intelligence of the home environment, and the intelligent network has entered the home unstoppably. In recent years, with the rise of wireless network research worldwide, research on wireless smart home networks has become a new research hotspot. Smart home network refers to a local area network that connects various electrical equipment and electrical subsystems through a certain transmission medium inside the home, adopts a unified communication protocol, realizes resource sharing internally, and exchanges information through gateways and external networks. . Figure 1 Distributed Bluetooth home network architecture Picture 2 The structure of the port object Bluetooth technology is a short-range wireless communication technology standard jointly formulated by the Bluetooth SIG (Special Interest Group) . Its purpose is to achieve a maximum data transmission rate of 1Mb/s ( effective data transmission rate is 721kb/s) and a maximum transmission distance of 10 meters ( After increasing the power, it can transmit 100 meters ) wireless communication. In May 1998, Ericsson, Nokia, Toshiba, IBM, and Intel and other five leading manufacturers put forward in the standardization activities carried out jointly by short-range wireless communications technology Bluetooth technology (Bluetooth), whose purpose is to provide a short-range, low-cost Wireless transmission application technology. Bluetooth technology has the following characteristics: ISM 2.4GHz operating in the (industrial, scientific and medical band) frequency band, no need to apply frequency license; the use of 1600hop / s fast frequency hopping technology; the use of forward error correction coding (FEC) technology ; FM modulation mode is adopted , the equipment is simple; it supports point-to-point and point-to-multipoint communication; the protocol system is complete and fully supports the existing high-level protocols; the equipment is small in size , easy to carry or move , and low in cost. The home smart network based on Bluetooth technology replaces cables with short-range wireless communication technology to build an intelligent wireless home network. Based on the characteristics of the distributed Bluetooth smart home network, this paper studies the application of object-oriented information processing technology to the technical issues of the distributed Bluetooth smart home network, constructs an object-oriented communication model of the Bluetooth communication controller, and conducts application research on the model . Bluetooth network home network appliance for Bluetooth, a Bluetooth communication Bluetooth module embedded controllers and other devices, linked by wireless way, so as to communicate with each other; the same time, is connected to the home gateway and an external Bluetooth network having a routing function, constituting the family The network system or home local area network provides centralized or remote audio and video communications, computer control and management, etc., so that information can be fully circulated and shared within the family and with the outside world. The bluetooth distributed smart home network is to follow the industrial control scheme, and the control function is transferred to the Bluetooth communication controller equivalent to the lower computer in the industrial control to realize the mode of decentralized control and centralized management. Its system structure is shown in Figure 1 . Bluetooth home gateway: Connect to the home Bluetooth communication controller, and connect to the local area network and telephone network through cables, and upload the home network information to the management center and the head of the household through the Internet and telephone. Bluetooth communication controller: Communicate with Bluetooth devices, monitor the status of the device, and communicate and coordinate with other Bluetooth communication controllers to control its lower-level devices. Execute the command sent by the gateway and upload the relevant information of the Bluetooth device. Bluetooth devices: Bluetooth devices refer to household devices with built-in Bluetooth modules, such as Bluetooth air conditioners. They exchange information with the Bluetooth communication controller and accept its control, and can also communicate with other Bluetooth devices. Although the distributed system has many advantages, due to the limitations of Bluetooth technology and information processing technology in the Bluetooth distributed smart home network, its shortcomings cannot be ignored. Its performance is as follows: Since each Bluetooth device can only maintain connection with 7 devices at the same time , and the Bluetooth communication controller needs to interact with more devices, if you want to coordinate with more devices, you need to switch the working mode, which affects the processing. Efficiency, even lead to communication failure; because the same device may receive a lot of information, if the microprocessor uses queuing processing for the information, the time delay will increase; in the Bluetooth distributed smart home network, between the Bluetooth communication controllers and the Bluetooth communication controllers There is information transmission between Bluetooth devices and Bluetooth devices, causing crosstalk. At the same time, the more communication channels, the greater the crosstalk, and the communication distance and transmission rate will decrease. The communication mechanism and information processing mechanism of the Bluetooth distributed smart home network system are important factors that affect the performance of the system. Therefore, this article proposes the application of object-oriented technology to the Bluetooth distributed smart home network system program, which will help solve the above problems and improve the system. efficacy. Object Oriented Technology Object-oriented technology is an engineering technology that is oriented to data flow and integrates many advantages such as modularization, data abstraction, information hiding, and message transmission. It is suitable for both system analysis and program design. In recent years , object-oriented technology has been developing rapidly both in theory and in practice. The most important thing in object-oriented technology is the concept of "object". This "object" has certain attributes and methods , where the attributes refer to various characteristic parameters of the object itself. A specific object can have many attributes and methods . The important feature of object-oriented technology is the encapsulation of the object . For the outside world, it does not need to know what attributes the object has , nor does it need to know how the methods of the object itself are implemented. , And only need to call the method provided by the object to complete a specific function. Object-oriented technology has the following advantages: simple maintenance, modularity is a characteristic of an object-oriented programming, an entity is represented as a class in the same namespace class and having the same functions, a class may be added without affecting the namespace Other members of the namespace; extensibility, object-oriented programming essentially supports extensibility, if there is a class with a certain function , you can quickly expand this class to create a class with extended functions; code Reuse, because the function is encapsulated in the class , and the class exists as an independent entity , it is relatively simple to provide a class library. In the Bluetooth distributed smart home network, the information interaction and control center is the Bluetooth communication controller. Applying object-oriented technology to the Bluetooth distributed smart home network means that when designing the Bluetooth communication controller, the objects in the program correspond to the external application object entities, and the corresponding relationship between the program objects and the external world objects is established and The correspondence between the functions in the program and the process in the external world can provide developers with a convenient way of development. The connection point of object-oriented technology and distributed home network system is the port object communication model. In the port object communication mechanism, the basic unit of communication is the port object PO (Port Object) . A typical PO object is shown in Figure 2 . Ports are channels for information exchange between port objects . According to their functions, they can be divided into three types : variable input and output ports , which are interfaces for exchanging data and information required for operations between port objects; parameter input and output ports, which are port objects. The interface for exchanging parameter configuration is the basis of system dynamic reconfiguration. Message input and output port, it is a special port, is the interface between port objects to call related operations. The port object is essentially a message processor, which responds to the message input by the message input port, that is, calls related operations, and at the same time can output corresponding messages through the message output port to call the operations of other port objects. A port object has multiple internal states and operations, and the invocation of its operations follows the message-driven principle. But compared to other objects, only their external ports are visible. Each port object belongs to a specific port object class, and all objects in this class have the same internal operating framework. The port object supports the inheritance mechanism, that is, the subclass can inherit all the properties and operations of the parent class, and can also have its own unique properties and operations. In the bluetooth distributed smart home network, the bluetooth communication controller is a processor with bluetooth function. It adopts a single-task multithreaded concurrent execution model, that is, a single application can be divided into several independent tasks, which are allocated on each processor One task, but each task can create multiple threads as needed, and multiple threads distributed on multiple processors interact to complete an application together. Threads communicate through shared objects. Shared objects can be accessed by threads on any Bluetooth communication controller. The access to this object ( excluding local access to the object ) is called inter-module connection; and the local objects in the model can only be accessed by the local Bluetooth communication controller. Thread access and access to local objects ( including local access to shared objects ) are called intra-module connections. Only when the connection between the modules occurs, the Bluetooth communication controllers communicate with each other, thereby reducing the amount of air communication. For intra-module connections, since each module supports parallel processing, the processing efficiency is greatly increased. The Bluetooth communication controller is the core of the Bluetooth distributed smart home network. For the above-mentioned port object communication model, communication is realized through the Bluetooth communication controller. The communication model between Bluetooth communication controllers is shown in Figure 3 . The object-oriented Bluetooth communication controller is mainly composed of 3 layers: hardware layer, protocol layer, and application layer. The hardware layer mainly completes some functions that depend on the hardware, including functions such as wireless signal transceiver, encoding and decoding. The port object communication mechanism isolates the hardware details of the system from the core part of the upper layer. When the underlying hardware of the system changes, only the underlying hardware driver needs to be changed, which enhances the portability of the system. The protocol layer follows the Bluetooth core protocol and the protocol subset ( including OBEX, etc. ) reference model standards corresponding to the Bluetooth distributed smart home network . The application layer is the key to realizing distributed. The communication mechanism based on port objects is implemented at this layer. The application layer is mainly composed of port object manager, object list, process interface, local procedure call and remote procedure call modules. Its structure is shown in Figure 4 . The task of the port object manager is to complete the management tasks such as creation, deletion, and positioning of port objects, and to provide name services for the system. The process interface is the interface between the user process and the application layer, no matter whether the user's process call is remote or local, it is the same for the user. The distinction between calls is done by the process interface. It first accesses the object list to determine the type of call, and then sends the procedure call to different procedure call modules for processing. The local procedure call module handles the intra-module connection, it directly transfers the local call to the local execution and returns the result; only those inter-module connections are taken care of by the remote call module. The remote call module is responsible for packaging the message and communicating with the protocol layer. Figure 3 Object-oriented Bluetooth communication controller communication model Picture 4 Application layer internal structure In the Bluetooth communication controller, each port object has its own name and identification code (ID number ) , and the corresponding information of the port object can be queried by name or ID . When the system is initialized, the port object manager builds a port object list on each Bluetooth communication controller. The list includes a local object list and a shared object list. The object list saves the mapping relationship between the names and ID numbers of all objects and their status. The state of the object is dynamically updated by the system. In order to maintain the consistency of the data, the Bluetooth communication controller must broadcast the message when the shared object is created, deleted, and updated to keep the shared object table consistent. In the Bluetooth communication controller, both local and remote objects are accessed through a unified process interface. The process interface can get the ID number of the object by looking up the object table , and the position of the object can be located through the ID number. If the object is located locally, the process interface transfers the process to the local procedure call module, and the module directly calls the corresponding process, and returns the result to the user call through the process interface. If the object is a remote object, the process interface transfers the process to the remote procedure call module, and the remote procedure call module packages the relevant parameters and sends them to the remote Bluetooth communication controller, and then hangs up and waits for the remote Bluetooth communication controller's response; After receiving the request, the Bluetooth communication controller uploads the message to the remote procedure call module located in the remote Bluetooth communication controller through the protocol layer. After unpacking the message, the remote module's process interface calls the local procedure on the remote module After the processing is completed, the result is packaged and sent back to the requesting node. After receiving the message, the request node returns to the calling process to end the suspended state and continue execution. During operation, the state of the object needs to be dynamically updated, which will increase the additional communication overhead, but when the state of the shared object needs to be accessed frequently, the system only needs to access the state of the shared object in the local object list without initiating a communication process . Concluding remarks Since the introduction of Bluetooth technology at the end of the last century, the research of Bluetooth technology and the development of Bluetooth products have attracted worldwide attention. Research on the application of Bluetooth technology to smart home networks is also emerging. Due to the randomness of the installation of home devices, distributed Bluetooth home networks have solved the "plug and play" problem of Bluetooth home devices going online. However, due to the inherent characteristics of Bluetooth technology and distributed processing, the data transmission, processing rate, and security of the distributed Bluetooth smart home network are affected. In response to these problems, this article applies object-oriented technology to the core of the distributed Bluetooth smart home network—the Bluetooth communication controller, and establishes a communication and processing mechanism model. The analysis shows that the solution solves the processing speed and security of the distributed Bluetooth smart home network. Problem, this will help promote the further development of distributed Bluetooth smart home networks. E Bend,H Bend,90 Degree Bend,E Bend Waveguide Chengdu Zysen Technology Co., Ltd. , https://www.zysenmw.com