[go: up one dir, main page]

CN104754038A - Monitoring method and device for grain in distributed grain storehouse - Google Patents

Monitoring method and device for grain in distributed grain storehouse Download PDF

Info

Publication number
CN104754038A
CN104754038A CN201510100028.7A CN201510100028A CN104754038A CN 104754038 A CN104754038 A CN 104754038A CN 201510100028 A CN201510100028 A CN 201510100028A CN 104754038 A CN104754038 A CN 104754038A
Authority
CN
China
Prior art keywords
list
grain
data
day
remote control
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.)
Granted
Application number
CN201510100028.7A
Other languages
Chinese (zh)
Other versions
CN104754038B (en
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.)
Anhui Province Opens Up Automation Co Ltd
Original Assignee
Anhui Province Opens Up Automation 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 Anhui Province Opens Up Automation Co Ltd filed Critical Anhui Province Opens Up Automation Co Ltd
Priority to CN201510100028.7A priority Critical patent/CN104754038B/en
Publication of CN104754038A publication Critical patent/CN104754038A/en
Application granted granted Critical
Publication of CN104754038B publication Critical patent/CN104754038B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D21/00Measuring or testing not otherwise provided for
    • G01D21/02Measuring two or more variables by means not covered by a single other subclass
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Selective Calling Equipment (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a monitoring method and device for grain in a distributed grain storehouse and belongs to the technical field of stored grain monitoring. The monitoring method includes steps that S1, a remote control terminal acquires grain quality parameters and/or grain storage environment parameters of each grain storehouse and sends the acquired parameters and equipment codes corresponding to the remote control terminal to a caching device; after the application system of a user is started for the first time in one day, the application system creates an intraday form of data acquisition equipment on the starting day and files the previous form of the data acquisition equipment created on the previous starting day, wherein the previous form has stored the data acquired on the day when creating the previous form; S2, the application system of the user extracts data from the caching device and stores the extracted data in the intraday form. The monitoring method and device for the grain in the distributed grain storehouse properly store the monitored data and provide security assurance for comprehensively realizing the grain quality parameters and grain storage environment parameters.

Description

A kind of monitoring method to grain in distributed grain depot and device
Technical field
The invention belongs to stored grain monitoring technical field, particularly a kind of monitoring method to grain in distributed grain depot and device.
Background technology
Timely understanding grain quality parameter and/or grain storage environment parameter are the keys properly managing stored grain, if can not understand the information such as grain quality parameter and/or grain storage environment parameter of stored grain in time, then directly can affect the storage of grain.Such as stored grain moisture is too high, and the vigorous grain that easily causes of its vital movement is mouldy, rotten, even rotten too early.If stored grain moisture is too low, not only alleviate the weight of grain, and grain also needs certain moisture to maintain its MIN vital movement, its Measurement for Grain Moisture Content is even more important to kind of grain.
In order to ensure that grain is stored under an optimal environment, now by monitoring device, Real-Time Monitoring is carried out to the grain quality parameter of stored grain and/or grain storage environment parameter.Again according to the data monitored, next step safeguard measure is taked to stored grain.But, in the process of monitoring, have large quantities of Monitoring Data, if can not properly store, then can cause the loss of Monitoring Data, and then grain quality parameter and/or grain storage environment parameter can not be fullyed understand, thus affect the storage of grain.
Summary of the invention
The present invention is in order to overcome above-mentioned the deficiencies in the prior art, provide a kind of monitoring method to grain in distributed grain depot, this monitoring method has carried out appropriate storage to the data monitored, for overall understanding grain quality parameter and grain storage environment parameter provide safety assurance.
For achieving the above object, present invention employs following technical scheme:
To a monitoring method for grain in distributed grain depot, comprise the following steps:
S1: remote control terminal gathers grain quality parameter in grain depot everywhere and/or grain storage environment parameter, and the device coding corresponding to the grain quality parameter collected and/or grain storage environment parameter and remote control terminal is sent to buffer storage by described remote control terminal;
User's application system in data acquisition equipment is after starting shooting first one day, create the list on the same day on the data acquisition equipment start same day, and the list day before yesterday that the creates during start of data acquisition equipment last time is filed, the list described day before yesterday data to gather the same day of the storage creation list day before yesterday;
S2: described user's application system extracted data from described buffer storage, and the data extracted are processed, be saved in list on described same day.
The present invention can also be realized further by following steps.
Preferably, the step setting up list on described same day is as follows:
S11: the user's application system in described data acquisition equipment reads system time when starting shooting one day, obtain the collection date of data thus, then open in a database and gather date corresponding database then according to gathering the date with described, search whether to generate in database then and gather with described the of that month list that the date is consistent;
S12: if described of that month list exists, then proceed to step S14; Otherwise, proceed to step S13;
S13: automatically set up in database then and gather of that month list that the date is consistent with described and preserve, then proceed to step S14;
S14: search whether to generate in database then and gather with described the list on the same day that the date is consistent;
S15: if described list existence on the same day, then terminate to create list on the same day; Otherwise, proceed to step S16;
S16: automatically set up in database then and the described list preserving on the same day gathering that the date is consistent, and the list day before yesterday created during last for described data acquisition equipment start is filed.
Preferably, the step of filing list described day before yesterday is as follows:
S21: the user's application system in described data acquisition equipment opens database and of that month list then when creating list on the same day, and now database is current database then; The list name virtual day before yesterday of N days before the collection date in same day list is generated with the method for successively decreasing one by one;
S22: extracted the virtual day before yesterday of the year information in list name of proxima luce (prox. luc) list name successively one by one from the virtual day before yesterday of N days generated, and judge that whether this year information is identical with the year information of the current database when front opening;
S23: if the year information in virtual day before yesterday list name is identical with the year information of current database, then proceed to step S24; Otherwise, proceed to step S25;
S24: search in current database and whether there is the day list of the same name with list virtual day before yesterday, if there is the day list of the same name with list virtual day before yesterday, then day of the same name list found is day list to be archived, proceeds to step S26; Otherwise, proceed to step S22;
S25: close database then, open the database the year before last corresponding to a year, the year before last, database became new current database, search in new current database and whether there is the day list of the same name with list virtual day before yesterday, if there is the day list of the same name with list virtual day before yesterday, day of the same name list then found is day list to be archived, proceeds to step S26; Otherwise, proceed to step S22;
The data recorded in be archived day list are added in this month list in current database by S26: extract month information to be archived day list name, obtain the moon list that will file one by one.
Preferably, described remote control terminal carries out image data according to the collection period T1 of setting, and becomes message to transmit the data creating collected, and the data in this message refresh according to collection period T1; Described remote control terminal according to setting transmission cycle T 2 from buffer storage uploading message described in trend; The A/D conversion values of acquisition parameter is directly deposited in message by described remote control terminal.
Preferably, the automatic operation mode of described data acquisition equipment is as follows:
S31: select automatic operation mode on described data acquisition equipment;
S32: the message that described buffer storage automatic reception remote control terminal is uploaded, and interpolation receives the system time of message as data acquisition time;
S33: described user's application system extracts message from described buffer storage, the device coding corresponding to grain quality parameter and/or grain storage environment parameter and remote control terminal is extracted again from the message extracted out, and the data extracted are resolved and processed, obtain the data setting form, make these setting data of forms and data acquisition time become a record, automatic powder adding is added in list on described same day;
S34: judge whether the data needing to detect the collection of assigning remote control terminal;
S35: if desired detect the data that assigning remote control terminal gathers, then proceed to step S36; Otherwise, proceed to step S39;
S36: the device coding corresponding to assigning remote control terminal is deposited in the remote control terminal device coding variable of user's application system self by described user's application system automatically;
S37: according to the device coding in the message be currently received, judges that whether this device coding is identical with the device coding that namely remote control terminal device coding variate-value leaves in remote control terminal device coding variable;
S38: if this device coding is identical with remote control terminal device coding variate-value, be then presented at the data after process in the text display frame of specifying in user's application system;
S39: judge whether to stop automatic reception message, if stop automatic reception message, then stops automatic reception message; Otherwise, proceed to step S32.
Preferably, the application system of user described in step S33 is resolved the data extracted and is processed, this resolves the character string comprising and become to be convenient to by the data transaction be stored in bytewise in message to show, this process comprises and from the basic list of the user of leaving in data acquisition equipment, obtains the user name corresponding with this device coding according to the device coding in message, the basic list of described user houses the device coding corresponding to all remote control terminals, user name, enabling time, contact person, contact method, remarks.
The grain quality parameter of described remote control terminal collection comprises Measurement for Grain Moisture Content, cereal temperature, the grain storage environment parameter of described remote control terminal collection comprises temperature, the humidity of grain depot, described remote control terminal is collecting device state code also, equipment fault code, total run time, the day operation time, operational factor; Described day, list comprised with the device coding of character string forms display, data acquisition time, equipment state code, equipment fault code, total run time, day operation time, operational factor; The fund of the operational factor in described day list and the operational factor in described message adapts.
A kind of on-Line Monitor Device, comprises with lower part:
Grain monitoring device; For monitoring grain quality parameter and grain storage environment parameter;
Drying unit, for regulating moisture in grain;
Remote control terminal, the signal input part of described remote control terminal is connected with the signal output part of described grain monitoring device, and the signal output part of described remote control terminal is also connected with the signal input part of described drying unit;
Data transmission unit and DTU, for serial data being converted to IP data or IP data being converted to serial data, between described data transmission unit with described remote control terminal, two-way communication is connected;
Buffer storage, for receive and preserve described data transmission unit send data, be connected by network communication between described buffer storage with described data transmission unit;
Data acquisition equipment, for the data extracted from buffer storage, and deposit in database after the data of extraction being carried out resolving and process, between described data acquisition equipment with described buffer storage, two-way communication is connected.
Preferably, described grain monitoring device is set to multiple at the diverse location of same silo, and the signal output part of described multiple grain monitoring device is connected with the signal input part of described remote control terminal respectively.
Preferably, described multiple grain monitoring device, drying unit, remote control terminal and data transmission unit form a wireless remote monitoring unit jointly, described buffer storage respectively with carry out both-way communication by GPRS/INTERNET network between multiple monitoring means and be connected, described multiple monitoring means monitors grain quality parameter and the grain storage environment parameter of grain in different silo respectively.
Beneficial effect of the present invention is:
1) by setting up day list, the data that the remote control terminal that distinct device is encoded sends over are stored in the present invention, day list was named with the collection date of data, and then the data that storage of collected date is all, according to the sequencing of time, multiple days lists are filed in moon list, again moon list is stored in annual data storehouse, described database comprises multiple annual data storehouse, the data monitored in this monitoring method store all in order, avoid the loss of data, also for overall understanding grain quality parameter and grain storage environment parameter provide one safe and efficient to check approach.
2) carried out appropriate filing to the list day before yesterday in the present invention, its filing can realize across month filing, also can realize, across time filing, having carried out effective storage, avoid Missing data to the data monitored.
3) medium-long range control terminal of the present invention generates message, multinomial subdata is made a message by described remote control terminal, user's application system automatic powder adding when automatic reception message adds the system time receiving this message and shows unirecord " time " field as day, the device coding received in message is used in data receiver thread, find out and the user name corresponding to this device coding in equipment basic condition list, and by the user name that obtains together stored in day list, namely data are in transmitting procedure, do not transmit user name and the data acquisition time of remote control terminal.The method reduce the length of message, facilitate the transmission of data, also make the step of its transmitting procedure become succinctly, in order, the efficiency of image data can be improved, reduce the use cost of user.
4) in the present invention, the data collected are made a frame message by each remote control terminal separately, this message with the device coding of remote control terminal for mark, and store with bytewise, the message received extracts by user's application system, extract the subdata in the subitem of message, and subdata is carried out resolving and processing, be processed into the display format of the Sino-Japan list of user's application system, each is opened all containing many record data in day list, and the data that many record data and multiple remote control terminal collect are one-to-one relationship.
Accompanying drawing explanation
Fig. 1 is the block diagram connection diagram of on-Line Monitor Device in the present invention;
Fig. 2 is the workflow diagram setting up day list in the present invention;
Fig. 3 is the workflow diagram that in the present invention, in message, data store.
In figure, the implication of label symbol is as follows:
10-grain monitoring device, 20-drying unit, 30-remote control terminal
40-data transmission unit, 50-data acquisition equipment
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
To an on-Line Monitor Device for grain in distributed grain depot, comprise with lower part:
Grain monitoring device 10, for monitoring grain quality parameter and grain storage environment parameter; Described grain monitoring device 10 at least comprises the grain moisture content monitor of the temperature for monitoring environment residing for moisture and grain in grain;
Drying unit 20, for regulating moisture in grain, described drying unit comprises motor, controls the control circuit board of electric machine rotation, and the output shaft of described motor is connected with flabellum, and described control circuit board and motor electrically connect;
Remote control terminal 30, the signal input part of described remote control terminal 30 is connected with the signal output part of described grain monitoring device 10, and the signal output part of described remote control terminal 30 is also connected with the signal input part of control circuit board in described drying unit 20;
Data transmission unit 40 i.e. DTU, for serial data being converted to IP data or IP data being converted to serial data, described data transmission unit 40 is connected with two-way communication between remote control terminal 30;
Buffer storage, for receive and preserve described data transmission unit 40 send data, be connected by GPRS/INTERNET network communication between described buffer storage with described data transmission unit 40;
Data acquisition equipment 50, for the data extracted from buffer storage, and deposit in database after the data of extraction being carried out resolving and process, described data acquisition equipment 50 is connected with two-way communication between described buffer storage.
In order to make the data of grain quality parameter and grain storage environment parameter monitoring more accurate, described grain monitoring device 10 is set to multiple at the diverse location of same silo, and the signal output part of described multiple grain monitoring device 10 is connected with the signal input part of described remote control terminal 30 respectively.
Described multiple grain monitoring device 10, drying unit 20, remote control terminal 30 and data transmission unit 40 form a wireless remote monitoring unit jointly, described buffer storage respectively with carry out both-way communication by network and GPRS/INTERNET between multiple monitoring means and be connected, described multiple monitoring means monitors grain quality parameter and the grain storage environment parameter of grain in different silo respectively.
Described remote control terminal 30 is programmable controller.Be bi-directionally connected by serial communication between described programmable controller and described data transmission unit 40.
Further, the GPRS-INTERNET gateway that provides with Cheng Ye Co., Ltd for sky, Beijing of described buffer storage and server; Be connected by GPRS/INTERNET gateway both-way communication between described server with described data transmission unit; Described GPRS/INTERNET gateway is interconnected for realizing between GPRS/INTERNET network, and also namely described GPRS/INTERNET gateway is internetwork connector or protocol converter; Described data acquisition equipment 50 is the personal computer containing application programming interface; Described data acquisition equipment 50 is communicated by message queue with between buffer storage, thus realizes exchanges data.Employ the wireless serial application interface wlserAPI that sky, Beijing provides with Cheng Ye Co., Ltd in described data acquisition equipment 50, and make it at running background, user's application system is run under multi-thread mechanism.The data receiver thread utilizing this API to provide and data queue, thus realize the automatic reception described remote control terminal being sent to data.Utilize this multi-thread mechanism can send data and monitoring DTU working condition when not interrupting receive data.Also utilize Microsoft ACCESS, building database, and the ACCESS database operation method utilizing Microsoft to provide, customer data base is managed.
Described grain monitoring device 10 monitors grain quality parameter and the grain storage environment parameter of same silo diverse location, and the device coding corresponding to the data monitored and remote control terminal is transferred to described remote control terminal 30, the data that described remote control terminal 30 gathers also comprise equipment state code, equipment fault code, total run time, the day operation time, operational factor etc., device coding corresponding to remote control terminal and the data creating that collects also are become message by described remote control terminal 30, described data acquisition equipment 50 is given by message transmissions through described data transmission unit 40.Described data acquisition equipment 50 can receive the message that the multiple remote control terminals 30 for monitoring different silo send over.In described data acquisition equipment 50, user's application system stores the message received, file and shows.
If one day is on January 3rd, 2015, the day list created when starting shooting first to data acquisition equipment is list on the same day, if be on December 30th, 2014 when data acquisition equipment was started shooting last time, then the day list created when December 30, the same day started shooting first in 2014 is the list day before yesterday;
Or, if one day is on December 3rd, 2014, the day list created when starting shooting first to data acquisition equipment is list on the same day, if data acquisition equipment start last time is on November 30th, 2014, then the day list created when November 30, the same day started shooting first in 2014 is the list day before yesterday.
For the monitoring method in the on-Line Monitor Device to grain in distributed grain depot, comprise the following steps:
S1: remote control terminal 30 gathers grain quality parameter in grain depot everywhere and/or grain storage environment parameter; The grain quality parameter of described remote control terminal collection comprises Measurement for Grain Moisture Content, cereal temperature but be not limited only to Measurement for Grain Moisture Content, cereal temperature, the grain storage environment parameter of described remote control terminal collection comprises the temperature of grain depot, humidity but be not limited only to temperature, the humidity of grain depot, described remote control terminal 30 carries out image data according to the collection period T1 of setting, and become message to transmit the data creating collected, data in this message refresh according to collection period T1, and described collection period T1 value is less than transmission cycle T 2 and is worth; Described remote control terminal 30 according to setting transmission cycle T 2 from buffer storage uploading message described in trend, the span of this transmission cycle T 28 ~ 20 minutes; The A/D conversion value of the physical quantity that transducer detects by described remote control terminal 30 is directly deposited in message, the temperature value collected is converted to the shaping amount of Hexadecimal form by such as temperature sensor, and in the message that this shaping amount is made stored in remote control terminal 30, and in the message that makes stored in remote control terminal 30 of temperature value in hexadecimal form, described remote control terminal 30 sends after not needing to convert the temperature value of Hexadecimal form the temperature value of relocatable to again; Described remote control terminal 30 goes back collecting device state code, equipment fault code, total run time, day operation time, operational factor; Described equipment state code, equipment fault code, total run time, the day operation time, operational factor is the data of relevant device in this checkout gear;
S2: the device coding corresponding to the data collected and remote control terminal 30 is sent to buffer storage by described remote control terminal 30, the message that data acquisition equipment 50 is sended over by the remote control terminal 30 existed with message queue form in wlserAPI accessed cache device; User's application system in described data acquisition equipment 50 creates data acquisition equipment 50 and to start shooting the same day list on the same day of (if one day is on January 3rd, 2015) one day, and the list day before yesterday that data acquisition equipment 50 last time start (if last start be on December 30th, 2014) creates is filed, this of list data to gather the same day of the storage creation list day before yesterday day before yesterday; Described data acquisition equipment 50 is when starting shooting, and its buffer storage starts to receive the message that remote control terminal 30 sends over, and its user's application system also starts to create list and the filing list day before yesterday on the same day;
S3: described user's application system extracted data from described buffer storage, and the data extracted are processed, be saved in list on described same day; Described user's application system is resolved the data extracted and is processed, this resolves the character string comprising and become to be convenient to by the data transaction be stored in bytewise in message to show, this process comprises and from the basic list of user, obtains the user name corresponding with this device coding according to the device coding in message, the basic list of described user houses the device coding corresponding to all remote control terminals 30, user name, enabling time, contact person, contact method, remarks.
Described day, list comprised with the device coding of character string forms display, data acquisition time, equipment state code, equipment fault code, total run time, day operation time, operational factor; In described day list, in operational factor and described message, the fund of operational factor adapts.
The described moon, list comprised the day list according to date sequencing arrangement, described annual data storehouse comprises the day list and the moon list for data filing arranged according to the sequencing of time, and described database comprises several according to the tactic annual data of time order and function and the basic list of user.
The step setting up list on described same day is as follows, as shown in Figure 2:
S11: the January 3 2015 system data when the user's application system in described data acquisition equipment 50 reads that January 3 started shooting first in 2015 is as the collection date of data, then gathering date corresponding database then and annual data storehouse DB_2015 according to gathering to open in a database date i.e. on January 3rd, 2015 with described, searching whether to have generated in annual data DB_2015 storehouse and gather with described the of that month list front-month list TABLE_JAN be consistent date i.e. on January 3rd, 2015;
S12: if described moon list TABLE_JAN exists, then proceed to step S14; Otherwise, proceed to step S13;
S13: automatically set up moon list TABLE_JAN and preserve in the DB_2015 of annual data storehouse, then proceeding to step S14;
S14: search whether to have generated in the DB_2015 of annual data storehouse and gather with described list on the same day this day list TABLE_2015_1_3 be consistent date i.e. on January 3rd, 2015;
S15: if described day list TABLE_2015_1_3 exists, then terminate to create day list TABLE_2015_1_3; Otherwise, proceed to step S16;
S16: automatically set up day list TABLE_2015_1_3 and preserve in the DB_2015 of annual data storehouse, and the list day before yesterday this day list TABLE_2014_12_30 created when start is 2014 December 30 described data acquisition equipment 50 last time files.
The step of filing list described day before yesterday is as follows:
S21: the user's application system in described data acquisition equipment opens database and of that month list then when creating list on the same day, now database is current database then, virtual day list name array DataTableName [0]-DataTableName [N-1] of N days before date in same day list is generated with the method for successively decreasing one by one, make I=0, bFind=false;
S22: the information extracting the time from day list name DataTableName [I]; If this year information is consistent with the year information of current database, proceed to step S23; Otherwise, proceed to step S25;
S23: search in current database and whether there is the day list of the same name with day list DataTableName [I], if there is the day list of the same name with day list DataTableName [I], makes flag bit bFind=true; To string variable assignment tableName=DataTableName [I], proceed to step S27; Otherwise assignment I=I+1, proceeds to step S24;
S24: if I<=N-1, then proceed to step S22; If I>N-1, then proceed to step S27;
S25: close current database, opens the database the year before last of 1 year correspondence; Described the year before last, database became current database; Search in current database and whether there is the day list of the same name with day list DataTableName [I], if there is the day list of the same name with day list DataTableName [I], make flag bit bFind=true; To string variable assignment tableName=DataTableName [I], proceed to step S27; Otherwise assignment I=I+1, proceeds to step S26;
S26: if I<=N-1, then proceed to step S26; I>N-1, then proceed to step S27;
S27: judge whether bFind equals true, if bFind=true, from tableName, extract month information, obtain the moon list that will file, then the data recorded in identical with talbeName name in current database day list are added in this month list one by one; Otherwise, close current database.
The step of filing described day list TABLE_2014_12_30 is as follows:
S21: the user's application system in described data acquisition equipment opens annual data storehouse DB_2015 and moon list TABLE_JAN when creating day list TABLE_2015_1_3, now annual data storehouse DB_2015 is current database, and before generating with the method for successively decreasing one by one the date in day list TABLE_2015_1_3, virtual day list name array of N days is as follows:
DataTableName[0]-DataTableName[N-1],
DataTableName[0]=TABLE_2015_1_2,
DataTableName[1]=TABLE_2015_1_1,
DataTableName[2]=TABLE_2014_12_31,
DataTableName[3]=TABLE_2014_12_30,
DataTableName[4]=TABLE_2014_12_29,
DataTableName[5]=TABLE_2014_12_28,
DataTableName [6]=TABLE_2014_12_27, makes I=0, bFind=false;
S22: the information extracting the time from day list name array DataTableName [I], when the initial value of I is 0, extracts year information 2015 from DataTableName [0]=TABLE_2015_1_2; This year information 2015 is consistent with the year information of the current database DB_2015 when front opening;
S23: there is not the day list of the same name with day list name array DataTableName [0]=TABLE_2015_1_2 in current database, then assignment I=I+1=1;
S24: extract the time and believe 2015 from DataTableName [1]=TABLE_2015_1_1, this year information 2015 is consistent with the year information of the current database DB_2015 when front opening;
S25: there is not the day list of the same name with day list name array DataTableName [1]=TABLE_2015_1_1 in current database, then assignment I=I+1=2;
S26: extract year information 2014 from DataTableName [2]=TABLE_2014_12_31; This year information 2014 is inconsistent with the year information of the current database DB_2015 when front opening;
S27: close annual data storehouse DB_2015, open the annual data storehouse DB_2014 of a year as current database; The day list of the same name with day list name array DataTableName [2]=TABLE_2014_12_31 is there is not, assignment I=I+1=3 in current database DB_2014;
S28: extract year information 2014 from DataTableName [3]=TABLE_2014_12_30; This year information 2014 is consistent with the year information of the current database DB_2014 when front opening;
S29: there is the day list of the same name with day list name array DataTableName [3]=TABLE_2014_12_30 in current database, make flag bit bFind=true, to string variable assignment tableName=DataTableName [3]; Month information and December is extracted from tableName, obtain the moon list TABLE_DEC that will file, then the data recorded in day list TABLE_2014_12_30 identical with talbeName name in current database DB_2014 are added in moon list TABLE_DEC one by one.
The concrete steps that described user's application system accesses in the message received are as follows, as shown in Figure 3:
S31: the message that described buffer storage automatic reception remote control terminal 30 is uploaded, and by the message that receives stored in data queue, wait for that described user's application system extracts message from data queue, judge whether the enabler flags position receiving message is true;
S32: if enabler flags position is true, namely presses " image data " button, then read present system time; Otherwise terminate to receive message;
S33: judging that described user's application system extracts the mode of operation of message is automatic operation mode or manual work pattern,
S34: if automatic operation mode, namely user, in user's application system, user application interface selects " automatically " mode of operation, then proceed to step S41; If manual work pattern, namely user, in user's application system, user application interface selects " manually " mode of operation, then proceed to step S51;
S41: extract the message that described reception remote control terminal 30 is uploaded from the data queue described buffer storage, adds the present system time of reading as data acquisition time;
S42: extract the device coding corresponding to grain quality parameter and/or grain storage environment parameter and remote control terminal 30 from the message extracted out, and the data extracted are resolved and processed, described user's application system is resolved the data extracted and is processed, this resolves the character string comprising and become to be convenient to by the data transaction be stored in bytewise in message to show, this process comprises and from the basic list of user, obtains the user name corresponding with this device coding according to the device coding in message, obtain the data of string format in list on described same day, the data after these process and data acquisition time is made to become a record, automatic powder adding is added in list on described same day,
S43: judge whether the data needing to detect the collection of assigning remote control terminal 30, namely whether user clicks the message box of the device coding corresponding to assigning remote control terminal 30 in the user interface;
S44: if desired detect the data that assigning remote control terminal 30 gathers, then proceed to step S45; Otherwise, proceed to step S48;
S45: the device coding corresponding to assigning remote control terminal 30 is deposited in remote control terminal device coding variable by described user's application system automatically;
S46: according to the device coding in the message be currently received, judges that whether this device coding is identical with the device coding that namely remote control terminal 30 device coding variate-value leaves in remote control terminal 30 device coding variable;
S47: if this device coding is identical with remote control terminal 30 device coding variate-value, then will be presented in the text display frame of specifying in user's application system when the data after pre-treatment;
Whether S48: judge whether that enabler flags position is false, namely press " stopping gathering " button;
S49: if enabler flags position is false, then stop automatic reception message; Otherwise, proceed to step S41.
S51: whether described " manually " mode of operation is correct in order to test the data that described data acquisition equipment 50 receives, and in the text box of " receiving message number " in user's application system, setting needs the number receiving uploading message;
S52: user's application systems software is according to the number needing reception uploading message of setting; Automatic adjustment is used for the dynamic array size of store data; Message from data receiver thread and buffer storage in the queue of Automatic Extraction receipt message, adds the present system time of reading as data acquisition time;
S53: extracted data from the message extracted, and the data extracted are resolved and processed, obtain the data of string format in described day list, described user's application system is resolved the data extracted and is processed, this resolves the character string comprising and become to be convenient to by the data transaction be stored in bytewise in message to show, this process comprises and from the basic list of user, obtains the user name corresponding with this device coding according to the device coding in message, the data after these process and data acquisition time is made to become a record, being stored in dynamic array and being presented at specifies in display box, and 1 operation is added to the reception packet accouter that initial value is zero,
S54: judge whether the count value receiving packet accouter is the integral multiple needing the message frame number shown;
S55: if the count value receiving packet accouter equals the integral multiple of the message frame number needing display, then remove the data of specifying display in display box, otherwise, proceed to step S53;
S56: if the count value receiving packet accouter equals to specify the number receiving uploading message, then resetting receives enabler flags position, even if enabler flags position is false;
S57: if enabler flags position is false, stop receiving message;
S58: judge whether to need the data after by process stored in described same day list, namely judge whether " writing data form " button is pressed;
S59: if " writing data form " button is pressed, then by the data in dynamic array stored in described same day list; Otherwise the data in dynamic array are not stored in described same day list.
The message queue that user's application system uses wireless serial application interface wlserAPI and described remote control terminal 30 to be sent in buffer storage carries out exchanges data; Described message queue comprises the instruction for sending uploading message and receives the data queue of message, sending the state queue of state, whether supporting that order and data carry out the command queue of transmitting for sending for monitored instruction and message.

Claims (10)

1., to a monitoring method for grain in distributed grain depot, it is characterized in that comprising the following steps:
S1: remote control terminal gathers grain quality parameter in grain depot everywhere and/or grain storage environment parameter, and the device coding corresponding to the grain quality parameter collected and/or grain storage environment parameter and remote control terminal is sent to buffer storage by described remote control terminal;
User's application system in data acquisition equipment is after starting shooting first one day, create the list on the same day on the data acquisition equipment start same day, and the list day before yesterday that the creates during start of data acquisition equipment last time is filed, the list described day before yesterday data to gather the same day of the storage creation list day before yesterday;
S2: described user's application system extracted data from described buffer storage, and the data extracted are processed, be saved in list on described same day.
2. the monitoring method to grain in distributed grain depot according to claim 1, the step that it is characterized in that setting up list on described same day is as follows:
S11: the user's application system in described data acquisition equipment reads system time when starting shooting one day, obtain the collection date of data thus, then open in a database and gather date corresponding database then according to gathering the date with described, search whether to generate in database then and gather with described the of that month list that the date is consistent;
S12: if described of that month list exists, then proceed to step S14; Otherwise, proceed to step S13;
S13: automatically set up in database then and gather of that month list that the date is consistent with described and preserve, then proceed to step S14;
S14: search whether to generate in database then and gather with described the list on the same day that the date is consistent;
S15: if described list existence on the same day, then terminate to create list on the same day; Otherwise, proceed to step S16;
S16: automatically set up in database then and the described list preserving on the same day gathering that the date is consistent, and the list day before yesterday created during last for described data acquisition equipment start is filed.
3. the monitoring method to grain in distributed grain depot according to claim 2, the step that it is characterized in that filing list described day before yesterday is as follows:
S21: the user's application system in described data acquisition equipment opens database and of that month list then when creating list on the same day, and now database is current database then; The list name virtual day before yesterday of N days before the collection date in same day list is generated with the method for successively decreasing one by one;
S22: extracted the virtual day before yesterday of the year information in list name of proxima luce (prox. luc) list name successively one by one from the virtual day before yesterday of N days generated, and judge that whether this year information is identical with the year information of the current database when front opening;
S23: if the year information in virtual day before yesterday list name is identical with the year information of current database, then proceed to step S24; Otherwise, proceed to step S25;
S24: search in current database and whether there is the day list of the same name with list virtual day before yesterday, if there is the day list of the same name with list virtual day before yesterday, then day of the same name list found is day list to be archived, proceeds to step S26; Otherwise, proceed to step S22;
S25: close database then, open the database the year before last corresponding to a year, the year before last, database became new current database, search in the current database that this is new and whether there is the day list of the same name with list virtual day before yesterday, if there is the day list of the same name with list virtual day before yesterday, day of the same name list then found is day list to be archived, proceeds to step S26; Otherwise, proceed to step S22;
The data recorded in be archived day list are added in this month list in current database by S26: extract month information to be archived day list name, obtain the moon list that will file one by one.
4. the monitoring method to grain in distributed grain depot according to Claims 2 or 3, it is characterized in that: described remote control terminal carries out image data according to the collection period T1 of setting, and becoming message to transmit the data creating collected, the data in this message refresh according to collection period T1; Described remote control terminal according to setting transmission cycle T 2 from buffer storage uploading message described in trend; The A/D conversion values of acquisition parameter is directly deposited in message by described remote control terminal.
5. the monitoring method to grain in distributed grain depot according to claim 4, is characterized in that the automatic operation mode of described data acquisition equipment is as follows:
S31: select automatic operation mode on described data acquisition equipment;
S32: the message that described buffer storage automatic reception remote control terminal is uploaded, and interpolation receives the system time of message as data acquisition time;
S33: described user's application system extracts message from described buffer storage, the device coding corresponding to grain quality parameter and/or grain storage environment parameter and remote control terminal is extracted again from the message extracted out, and the data extracted are resolved and processed, obtain the data setting form, make these setting data of forms and data acquisition time become a record, automatic powder adding is added in list on described same day;
S34: judge whether the data needing to detect the collection of assigning remote control terminal;
S35: if desired detect the data that assigning remote control terminal gathers, then proceed to step S36; Otherwise, proceed to step S39;
S36: the device coding corresponding to assigning remote control terminal is deposited in the remote control terminal device coding variable of user's application system self by described user's application system automatically;
S37: according to the device coding in the message be currently received, judges that whether this device coding is identical with the device coding that namely remote control terminal device coding variate-value leaves in remote control terminal device coding variable;
S38: if this device coding is identical with remote control terminal device coding variate-value, be then presented at the data after process in the text display frame of specifying in user's application system;
S39: judge whether to stop automatic reception message, if stop automatic reception message, then stops automatic reception message; Otherwise, proceed to step S32.
6. the monitoring method to grain in distributed grain depot according to claim 5, it is characterized in that: the application system of user described in step S33 is resolved the data extracted and processed, this resolves the character string comprising and become to be convenient to by the data transaction be stored in bytewise in message to show, this process comprises and from the basic list of the user of leaving in data acquisition equipment, obtains the user name corresponding with this device coding according to the device coding in message, the device coding corresponding to all remote control terminals is housed in the basic list of described user, user name, enabling time, contact person, contact method, remarks.
7. the monitoring method to grain in distributed grain depot according to claim 6, is characterized in that: the grain quality parameter of described remote control terminal collection comprises Measurement for Grain Moisture Content, cereal temperature; The grain storage environment parameter of described remote control terminal collection comprises temperature, the humidity of grain depot; Described remote control terminal is collecting device state code also, equipment fault code, total run time, day operation time, operational factor; Described day, list comprised with the device coding of character string forms display, data acquisition time, equipment state code, equipment fault code, total run time, day operation time, operational factor; The fund of the operational factor in described day list and the operational factor in described message adapts.
8. realize an on-Line Monitor Device for the monitoring method described in claim 1, it is characterized in that comprising with lower part:
Grain monitoring device (10), for monitoring grain quality parameter and grain storage environment parameter;
Drying unit (20), for regulating moisture in grain;
Remote control terminal (30), the signal input part of described remote control terminal (30) is connected with the signal output part of described grain monitoring device (10), and the signal output part of described remote control terminal (30) is also connected with the signal input part of described drying unit (20);
Data transmission unit (40) i.e. DTU, for serial data being converted to IP data or IP data being converted to serial data, between described data transmission unit (40) with described remote control terminal (30), two-way communication is connected;
Buffer storage, for receiving and preserving the data that described data transmission unit (40) sends, is connected by network communication between described buffer storage with described data transmission unit (40);
Data acquisition equipment (50), for the data extracted from buffer storage, and deposit in database after the data of extraction being carried out resolving and process, described data acquisition equipment (50) is connected with two-way communication between described buffer storage.
9. on-Line Monitor Device according to claim 8, it is characterized in that: described grain monitoring device (10) is set to multiple at the diverse location of same silo, the signal output part of described multiple grain monitoring device (10) is connected with the signal input part of described remote control terminal (30) respectively.
10. on-Line Monitor Device according to claim 9, it is characterized in that: described multiple grain monitoring device (10), drying unit (20), remote control terminal (30) and data transmission unit (40) form a wireless remote monitoring unit jointly, described buffer storage respectively with carry out communication by GPRS/INTERNET network between multiple monitoring means and be connected, described multiple monitoring means monitors grain quality parameter and the grain storage environment parameter of different silo inside respectively.
CN201510100028.7A 2015-03-06 2015-03-06 A kind of monitoring method and device to grain in distributed grain depot Active CN104754038B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510100028.7A CN104754038B (en) 2015-03-06 2015-03-06 A kind of monitoring method and device to grain in distributed grain depot

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510100028.7A CN104754038B (en) 2015-03-06 2015-03-06 A kind of monitoring method and device to grain in distributed grain depot

Publications (2)

Publication Number Publication Date
CN104754038A true CN104754038A (en) 2015-07-01
CN104754038B CN104754038B (en) 2018-04-13

Family

ID=53593125

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510100028.7A Active CN104754038B (en) 2015-03-06 2015-03-06 A kind of monitoring method and device to grain in distributed grain depot

Country Status (1)

Country Link
CN (1) CN104754038B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110196251A (en) * 2019-06-13 2019-09-03 六盘水市食品药品检验检测所 A kind of sampling system and method for food inspection
CN112020738A (en) * 2018-04-23 2020-12-01 陈浩能 Method and apparatus for product monitoring
CN115250241A (en) * 2022-09-23 2022-10-28 四川墨比品牌优创科技有限公司 Food processing remote control method and control system based on Internet of things
CN116107248A (en) * 2023-02-01 2023-05-12 青岛海尔空调器有限总公司 Crop storage monitoring method, apparatus and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004051386A1 (en) * 2002-11-29 2004-06-17 Honda Motor Co.,Ltd. Part ordering system and part ordering method
CN103412539A (en) * 2013-08-07 2013-11-27 江苏丹玉集团有限公司 Wireless remote movable intelligent green grain storage monitoring system
CN104034492A (en) * 2014-06-04 2014-09-10 青岛中瑞泰软控技术有限公司 Water pressure testing curve and parameter processing method
CN104199427A (en) * 2014-09-17 2014-12-10 彭宏伟 Distribution-type environment monitoring and control system and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004051386A1 (en) * 2002-11-29 2004-06-17 Honda Motor Co.,Ltd. Part ordering system and part ordering method
CN103412539A (en) * 2013-08-07 2013-11-27 江苏丹玉集团有限公司 Wireless remote movable intelligent green grain storage monitoring system
CN104034492A (en) * 2014-06-04 2014-09-10 青岛中瑞泰软控技术有限公司 Water pressure testing curve and parameter processing method
CN104199427A (en) * 2014-09-17 2014-12-10 彭宏伟 Distribution-type environment monitoring and control system and method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112020738A (en) * 2018-04-23 2020-12-01 陈浩能 Method and apparatus for product monitoring
CN110196251A (en) * 2019-06-13 2019-09-03 六盘水市食品药品检验检测所 A kind of sampling system and method for food inspection
CN115250241A (en) * 2022-09-23 2022-10-28 四川墨比品牌优创科技有限公司 Food processing remote control method and control system based on Internet of things
CN116107248A (en) * 2023-02-01 2023-05-12 青岛海尔空调器有限总公司 Crop storage monitoring method, apparatus and storage medium

Also Published As

Publication number Publication date
CN104754038B (en) 2018-04-13

Similar Documents

Publication Publication Date Title
US20200217689A1 (en) On-line web accessed energy meter
CN104754038A (en) Monitoring method and device for grain in distributed grain storehouse
CN106842991B (en) Remote control method and device for intelligent electric meter
CN106937136A (en) Data delay method and system based on statistical information between network direct broadcasting
EP3547236B1 (en) Method and device for calculating household appliance faults
CN103971500B (en) A kind of remote equipment failure information acquisition system data compression transmission method
CN103581272A (en) File transfer method and device
CN108737453B (en) Telemetry data organization method and device for communication of Internet of things
CN103401881B (en) Based on data acquisition system and the method for intelligent instrument
CN110445682B (en) Method, server, equipment and system for monitoring survival state of networking node
CN102520685A (en) Data acquisition system capable of monitoring and controlling industrial field and acquisition method thereof
CN104865860A (en) Sampling, storing and inquiring method and device of WTGS (Wind Turbine Generator System) state monitoring system
CN103442003A (en) Data acquisition backfill system for SCADA system and method thereof
CN111369774B (en) Data acquisition method for communication among platform, remote transmission centralized meter reading equipment and remote transmission water meter
CN108334582B (en) Method for compressing historical data in real-time database
CN106899678B (en) High-efficiency data transmission method and system for dynamically balancing energy Internet network bandwidth
CN109587259A (en) The method for remote management and system of mobile device and the server for using the method
CN111092781A (en) Household appliance data management method and device and household appliance
CN202486579U (en) A data acquisition system capable of monitoring and controlling industrial sites
CN204442423U (en) A kind of on-Line Monitor Device to grain in distributed grain depot
CN111770177A (en) Data processing method and data acquisition terminal
CN109683202B (en) System and method for collecting electromagnetic exploration data
CN109274587A (en) A kind of energy source gateway for supporting multi-protocols
CN112419698B (en) Electric energy meter data transmission method, system and device based on distribution line message specification
CN111445654B (en) Quick access method for fire monitoring system, fire monitoring system and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant