CN209806847U - Self-defined protocol goldfish breeding system based on Internet of things - Google Patents

Self-defined protocol goldfish breeding system based on Internet of things Download PDF

Info

Publication number
CN209806847U
CN209806847U CN201920074565.2U CN201920074565U CN209806847U CN 209806847 U CN209806847 U CN 209806847U CN 201920074565 U CN201920074565 U CN 201920074565U CN 209806847 U CN209806847 U CN 209806847U
Authority
CN
China
Prior art keywords
module
layer
goldfish
oxygen concentration
singlechip
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.)
Expired - Fee Related
Application number
CN201920074565.2U
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.)
Nanchang University
Original Assignee
Nanchang University
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 Nanchang University filed Critical Nanchang University
Priority to CN201920074565.2U priority Critical patent/CN209806847U/en
Application granted granted Critical
Publication of CN209806847U publication Critical patent/CN209806847U/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A40/00Adaptation technologies in agriculture, forestry, livestock or agroalimentary production
    • Y02A40/80Adaptation technologies in agriculture, forestry, livestock or agroalimentary production in fisheries management
    • Y02A40/81Aquaculture, e.g. of fish

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The utility model discloses a self-defined agreement goldfish feeding system based on the internet of things, the system takes AT89C51 singlechip as a control chip, wherein the singlechip and a mobile phone client are connected through a server, an oxygen concentration detection module detects the hydrolysis oxygen concentration in a fish tank by utilizing an oxygen concentration detector, a communication module, if the hydrolysis oxygen concentration is detected to be less than the minimum value of the hydrolysis oxygen concentration range pre-stored by the singlechip, the singlechip automatically sends oxygen concentration information to a user mobile phone client, the user can send corresponding instructions to the singlechip through the mobile phone client according to the information, whether to start an oxygen supply instrument for oxygen supply and the length of oxygen supply time are selected, the mobile phone client module comprises remote control and observation functions, the system can feed goldfish and change water according to a preset scheme, a camera is connected with the singlechip, the movable picture of the goldfish can be observed through the mobile phone client, the user can master the goldfish situation at any time and any place, and the flexible control of the goldfish feeding system is enhanced.

Description

Self-defined protocol goldfish breeding system based on Internet of things
Technical Field
The utility model relates to a thing networking technology field is raised to the goldfish, specifically is a system is raised to self-defined agreement goldfish based on thing networking.
Background
Goldfish, as an ornamental animal, is popular with the public and is widely cultivated at home. The invention is important for an effective goldfish culture system, the AT89C51 singlechip is a chip with various functions, has the functions of on-line serial and parallel communication, adopts a C/S (client/server) architecture and a streaming media technology (rtmp) protocol, realizes a private protocol of an application layer on the basis of a TCP (transmission control protocol), and combines remote control with the singlechip to successfully solve the limitation of the traditional goldfish culture.
SUMMERY OF THE UTILITY MODEL
Technical problem to be solved
Not enough to prior art, the utility model provides a self-defined agreement goldfish system of raising based on thing networking has solved the problem of the limitation that traditional goldfish was bred.
(II) technical scheme
In order to achieve the above object, the utility model provides a following technical scheme: the utility model provides a system is raised to custom agreement goldfish based on thing networking, includes oxygen concentration detection module, communication module, mobile client module, its characterized in that: the oxygen concentration detection module includes the oxygen concentration detector, communication module has included AT89C51 singlechip, server, transfer layer and mobile client, AT89C51 singlechip passes through GPS data wireless and mobile client module electric connection, mobile client module is provided with remote control module and observation function module, remote control module passes through GPS data wireless and is connected with remote control relay and solenoid valve electricity, mobile client passes through GPS data wireless and server electric connection, AT89C51 singlechip passes through data line electric connection with level sensor, the transmission end of AT89C51 singlechip passes through control line and camera electric connection, the camera passes through streaming media server carrier and mobile client electric connection, mobile client module is provided with the server.
Preferably, the service end includes a transmission layer, a service layer and a Dao layer, a data end of the Dao layer is connected with the Database, a data end of the Dao layer is connected with the service layer through a data line, a control end of the service layer is connected with the transmission layer, a task queue is arranged between the transmission layer and the service layer, and the transmission layer is connected with the serialization module, the Token pool and the connection pool through the data line.
Preferably, the transport layer includes a plurality of Client, mainreader, Acceptor, Thread Pool, Decode computer Encode, Read, Decode computer Encode, Surbreaker, and Send modules.
Preferably, the service layer comprises a task queuing module, the task queuing module is connected with the task extraction module, the task extraction module is electrically connected with a Worker thread pool, the Worker thread pool is electrically connected with the distributor through a data line, and the distributor is provided with a plurality of services.
Preferably, the client includes the transfer layer, transfer layer and service layer intercommunication each other, the control end of service layer communicates with StageController and Controller data respectively, StageController and Controller all with Stage control end electric connection, StageController is provided with StagePool, Controller is provided with controllerepool.
Preferably, the mobile phone client module adopts a C/S architecture setting, and the system realizes asynchronous event IO setting based on a Netty framework.
Preferably, a custom protocol is adopted in the communication module;
protocol format:
type (1 byte) + code (1 byte) + sender number (4 bytes) + receiver number (four bytes)
Type (2):
1 Request: sent to the server by the customer service terminal and the equipment
2 Response: sending by server-side response request to client device
3, Notice: and the data is sent to the client and the equipment by the server.
And (3) encoding:
Request:
1. request registration
2. Heartbeat
3. Request oxygen supply
4. Oxygen supply
5. Feeding food
6. Water changing
7. Request monitoring
Response:
1. Request success
2. Request failure
Notice:
1. Oxygen supply
2. Oxygen supply
3. Feeding food
4. Water changing
5. Opening the camera to start plug flow
Instructions for:
(1) client, device registration
The client and the equipment send: 1+1+ equipment client number + server number;
the server returns: successfully 2+1+ server number + equipment number;
failure 2+2+ server number + device number;
(2) keeping online (one heartbeat every 5 minutes)
The client and the equipment send: 1+2+ equipment client number + server number;
the server returns: successfully 2+1+ server number + equipment number;
failure 2+2+ server number + device number;
(3) prompting oxygen supply by equipment
The device sends: 1+3+ equipment number + client number;
the server returns: successfully 2+1+ server number + equipment number;
failure 2+2+ server number + device number;
the server sends to the client: 3+1+ Server number + device number
(4) And starting oxygen supply:
the client sends: 1+4+ client number + equipment number;
the server returns: successfully 2+1+ server number + client number;
failure 2+2+ server number + client number;
the server sends to the device: 3+2+ Server number + client number
(5) And starting feeding:
the client sends: 1+5+ client number + equipment number;
the server returns: successfully 2+1+ server number + client number;
failure 2+2+ server number + client number;
the server sends to the device: 3+3+ Server number + client number
(6) And starting to change water:
the client sends: 1+6+ client number + equipment number;
the server returns: successfully 2+1+ server number + client number;
failure 2+2+ server number + client number;
the server sends to the device: 3+4+ Server number + client number
(7) And starting monitoring:
the client sends: 1+7+ client number + equipment number;
the server returns: successfully 2+1+ server number + client number;
failure 2+2+ server number + client number;
the server sends to the device: 3+5+ server number + client number.
(III) advantageous effects
The utility model provides a self-defined agreement goldfish system of raising based on thing networking. The method has the following beneficial effects:
(1) this system is raised to self-defined agreement goldfish based on thing networking, accessible oxygen concentration detector detects the oxygen concentration of hydrolysising, when being less than the oxygen concentration range minimum of hydrolysising that AT89C51 singlechip prestore, the singlechip can be automatic to user's cell-phone sending information, the user can be according to information, whether the selection starts the length of apparatus oxygen suppliment and oxygen suppliment time of oxygen supply, wherein cell-phone client module has remote control and observation function, send corresponding instruction through AT89C51 singlechip, can accomplish reasonable intaking and go out water, the feeder links to each other with the singlechip, can feed for goldfish automatically, and AT89C51 singlechip even has the surveillance camera head, it is the carrier to flow media server to lead, make its cell-phone client carry out real-time remote observation to the activity picture of goldfish.
Drawings
FIG. 1 is a schematic operation diagram of the custom protocol of the present invention;
FIG. 2 is a schematic diagram of the server design of the present invention;
FIG. 3 is a detailed view of the operation of the transfer layer of the present invention;
FIG. 4 is a detailed view of the service layer operation of the present invention;
FIG. 5 is a design drawing of the client end of the present invention;
fig. 6 is a design drawing of the structure of the utility model.
Detailed Description
The technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments in the present invention, all other embodiments obtained by a person skilled in the art without creative work belong to the protection scope of the present invention.
As shown in fig. 1-6, the utility model provides a technical solution: a self-defined protocol goldfish breeding system based on the Internet of things;
fig. 1 is a schematic diagram of the system of the utility model, the goldfish raising system software part adopts the C/S architecture, the whole system realizes asynchronous physical property IO based on the Netty framework to obtain larger load capacity, the goldfish raising system software part realizes oxygen supply, food feeding and water changing of the remote control system, realizes the proprietary protocol of the application layer on the basis of the TCP protocol, and also realizes video real-time monitoring based on the streaming media technology (rtmp protocol);
as shown in fig. 2, the whole server is mainly composed of a transport layer, a service layer, and a Dao layer, and maintains a connection pool, a Token pool, and a task queue, and the serialization module is mainly called by the transport layer;
as shown in fig. 3, the transport layer: the method is characterized in that communication with equipment and a client side is realized, instructions are received, sent, decoded and encoded, the layer mainly has the functions of receiving and sending messages, the mode of io is asynchronous transactional io, the implementation is based on a netty framework, and firstly, a thread model of the layer is introduced: for example, as shown in the figure, a typical Reactor thread model is provided, first, a main Reactor thread pool is responsible for processing a request connection of a Client, only one port is monitored in the project so as to be a single thread, another sub-thread pool sub-Reactor is responsible for processing a task, the number of cores of a cpu is set in the project, the model has the main advantage of being asynchronous, a larger concurrency amount can be provided for a project with a plurality of connections but not strong activity of a goldfish feeding system, a pipeline form is adopted in input and output of a Channel connected to each Client, a series of handles need to be registered, and the model is only a mode of a responsibility chain, the decoding, processing and encoding handles are mainly used in the project, the decoding is used for decoding a serialized object from a new state to a serialized state, the encoding is used for serialization of the object, and the processing is used for encapsulating an object which is completed by decoding into a task object, and adding the detection handle of a heartbeat into the pipeline after the user finishes logging in, and adding the Channel into the connection pool after logging in and adding the corresponding Token into the Token pool;
as shown in fig. 4, for a service layer, a task is continuously obtained from a task queue by a task extraction thread, then the task is submitted to a working thread pool to complete the task, each thread uses a distributor class to determine which task is, and then a specific task service class is selected to complete the task, the layer is a main business logic bearer and drives a Dao layer to complete various database operations, the Dao layer has a single function, namely, some add-delete change of the database is realized, and an encapsulation operation provides an interface for the previous layer;
FIG. 5 is a client design, the client design is a typical MVC model, a Stage layer is a UI layer responsible for data display and user interaction, a StageController is an addition to, display of, and interaction with the pool of StagePool, a controlleris responsible for the delivery of UI layer and service layer data, and is responsible for interaction with the pool of ControllerPool, a service layer is a business logic layer providing various services, a transport layer is receiving and delivering data, a StageController is a management class for multiple stages, responsible for creating Stage, adding it to StagePool, taking it out when needed, and hiding it when not needed, a controlrpool is a pool of Controller objects corresponding to Stage, and taking it out when needed;
as shown in fig. 6, which is a physical diagram of a fish tank, an oxygen concentration detector is used for detecting the hydrolytic oxygen concentration in the fish tank; the communication module comprises an AT89C51 singlechip, a server and a mobile phone client, wherein if the oxygen concentration detector detects that the concentration of the hydrolysis oxygen is less than the minimum value of the range of the concentration of the hydrolysis oxygen pre-stored by the singlechip, the singlechip automatically sends information to a mobile phone of a user, and the user can select whether to start the oxygen supply instrument for supplying oxygen and the length of the oxygen supply time according to the information; the mobile phone client module has remote control and observation functions, remotely controls the relay and the electromagnetic valve, combines feedback information of the water level sensor, and sends corresponding instructions to the single chip microcomputer, so that reasonable water inlet and outlet can be realized; the feeder is connected with the singlechip and can automatically feed goldfishes; the camera connected with the singlechip takes the streaming media server as a carrier, and the mobile phone client is used for remotely observing the moving picture of the goldfish, and the contents which are not described in detail in the specification belong to the prior art known by professionals in the field.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (5)

1. The utility model provides a system is raised to custom agreement goldfish based on thing networking, includes oxygen concentration detection module, communication module, mobile client module, its characterized in that: the oxygen concentration detection module includes the oxygen concentration detector, communication module has included AT89C51 singlechip, server, transfer layer and mobile client, AT89C51 singlechip passes through GPS data wireless and mobile client module electric connection, mobile client module is provided with remote control module and observation function module, remote control module passes through GPS data wireless and is connected with remote control relay and solenoid valve electricity, mobile client passes through GPS data wireless and server electric connection, AT89C51 singlechip passes through data line electric connection with level sensor, the transmission end of AT89C51 singlechip passes through control line and camera electric connection, the camera passes through streaming media server carrier and mobile client electric connection, mobile client module is provided with the server.
2. The internet-of-things-based custom protocol goldfish feeding system according to claim 1, wherein: the system comprises a service end and a service end, wherein the service end comprises a transmission layer, a service layer and a Dato layer, the data end of the Dato layer is connected with a Database, the data end of the Dato layer is connected with the service layer through a data line, the control end of the service layer is connected with a transmission layer, a task queue is arranged between the transmission layer and the service layer, and the transmission layer is connected with a serialization module, a Token pool and a connection pool through the data line.
3. The internet-of-things-based custom protocol goldfish feeding system according to claim 2, wherein: the transport layer includes a plurality of clients, mainReator, Acceptor, ThreadPool, DecodeComputeEncode, a plurality of Reads, a plurality of DecodeComputeEncode, Surbreaker, and Send modules.
4. The internet-of-things-based custom protocol goldfish feeding system according to claim 2, wherein: the service layer comprises a task queuing module, the task queuing module is connected with the task extraction module, the task extraction module is electrically connected with a Worker thread pool, the Worker thread pool is electrically connected with the distributor through a data line, and the distributor is provided with a plurality of services.
5. The internet-of-things-based custom protocol goldfish feeding system according to claim 1, wherein: the client comprises a transmission layer, the transmission layer is communicated with the service layer, a control end of the service layer is communicated with a StageController and a Controller respectively, the StageController and the Controller are electrically connected with a Stage control end, the StageController is provided with a StagePool, the Controller is provided with a controllerPool, a mobile phone client module adopts C/S architecture setting, and the system realizes asynchronous event IO setting based on a Netty frame.
CN201920074565.2U 2019-01-17 2019-01-17 Self-defined protocol goldfish breeding system based on Internet of things Expired - Fee Related CN209806847U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201920074565.2U CN209806847U (en) 2019-01-17 2019-01-17 Self-defined protocol goldfish breeding system based on Internet of things

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201920074565.2U CN209806847U (en) 2019-01-17 2019-01-17 Self-defined protocol goldfish breeding system based on Internet of things

Publications (1)

Publication Number Publication Date
CN209806847U true CN209806847U (en) 2019-12-20

Family

ID=68871143

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201920074565.2U Expired - Fee Related CN209806847U (en) 2019-01-17 2019-01-17 Self-defined protocol goldfish breeding system based on Internet of things

Country Status (1)

Country Link
CN (1) CN209806847U (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109730019A (en) * 2019-01-17 2019-05-10 南昌大学 A kind of multi-functional goldfish feeding system of custom protocol based on Internet of Things

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109730019A (en) * 2019-01-17 2019-05-10 南昌大学 A kind of multi-functional goldfish feeding system of custom protocol based on Internet of Things
CN109730019B (en) * 2019-01-17 2023-10-03 南昌大学 Multifunctional goldfish feeding system based on Internet of things and adopting custom protocol

Similar Documents

Publication Publication Date Title
CN106530515A (en) Logistics distribution service system and logistics distribution method
CN106713389A (en) Monitoring method and system
CN106303024A (en) Wisdom hotel guest room apparatus control system and method
CN109730019B (en) Multifunctional goldfish feeding system based on Internet of things and adopting custom protocol
CN107220162A (en) A kind of service alarm method, storage medium and device
CN209806847U (en) Self-defined protocol goldfish breeding system based on Internet of things
US20120059530A1 (en) Energy management device and method
CN109412936A (en) A kind of Intelligent gateway system based on robot
CN108846963A (en) A kind of intelligent storage cabinet on-off control system and its send access method
CN109450908A (en) Communication means based on distributed message
CN104950896A (en) Floor sweeping robot, server and floor sweeping robot service system
CN107516210A (en) A kind of method of mobile payment based on Quick Response Code and bluetooth for track traffic
CN104506808A (en) Networking intelligent aquatic creature monitoring system
CN105868549A (en) Medical facility based on Internet and Internet of Things and communication device and method of medical facility
CN106530465A (en) Intelligent whole door lock unit with low power consumption and implementing method of intelligent whole door lock unit
CN109246193A (en) A kind of the external connection service for life supply system and method for wisdom family
CN106408100A (en) Smart reservation and registration system and method
CN109272132A (en) It is a kind of to realize tax office and do the method, system and application server of tax personnel's two way reservation
CN107767567A (en) A kind of long-range water, power information management system
CN204291240U (en) The intelligent Shui nationality biosurveillance system of a kind of networking
CN110352902A (en) Cultivation oxygen system and method for supplying oxygen
CN103560941B (en) Portable mail server and its operation method
CN102419856A (en) Family planning medical instrument self sending and monitoring system applying Internet of things
CN206505491U (en) A kind of boiler reading code intelligently pays control terminal
CN108888158A (en) A kind of intelligence goes out paper system and its paper delivery method

Legal Events

Date Code Title Description
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20191220

Termination date: 20210117