CN104732653A - Energy-saving lamp recovery system adopting concurrency control over database - Google Patents
Energy-saving lamp recovery system adopting concurrency control over database Download PDFInfo
- Publication number
- CN104732653A CN104732653A CN201510144394.2A CN201510144394A CN104732653A CN 104732653 A CN104732653 A CN 104732653A CN 201510144394 A CN201510144394 A CN 201510144394A CN 104732653 A CN104732653 A CN 104732653A
- Authority
- CN
- China
- Prior art keywords
- saving lamp
- electricity
- recovery
- request
- terminal
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Telephonic Communication Services (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Abstract
The invention relates to an energy-saving lamp recovery system adopting concurrency control over a database. The energy-saving lamp recovery system comprises a server, a recovery terminal and a monitoring client. The recovery terminal and the monitoring client are in communication with the server, the server receives a communication request of the recovery terminal, a request pool module and a request receiving processing module perform concurrency control, then, the communication request is responded to, a response result is transmitted to a monitoring module to perform goods statistics, and therefore monitoring on the recovery system is achieved. The high efficiency and robustness of the database are guaranteed by achieving concurrency control over the database, and therefore a solid foundation is laid for achieving the full-automatic management function of the recovery system. The recovery system can achieve full-automatic self-monitoring and operation, and therefore the manpower and material resources of the recovery system are saved to the maximum degree, and normal operation of the recovery system is guaranteed.
Description
Technical field
The present invention relates to electricity-saving lamp and reclaim field, particularly relate to a kind of electricity-saving lamp recovery system of carrying out database concurrency control.
Background technology
Mercury is requisite material in electricity-saving lamp, mercurous about 5mg in an electricity-saving lamp, and mercury is also a kind of noxious material, and air contains 1mg/m3 can make people poisoning.Since 2010, China's electricity-saving lamp year consumption figure all more than 1,600,000,000, and year treatment capacity only millions of, the mercury pollution brought thus is quite serious.Because China's electricity-saving lamp distribution is extensively not easily transported, it is not strong that citizen reclaim consciousness, cause China that branch cannot be adopted to reclaim the method focused on again, the reclaimer of import simultaneously high cost, it is also unpractical for relying on external large-scale reclaimer completely, and therefore China is necessary the electricity-saving lamp recovery system developing applicable China's actual conditions.
The robotization of recovery system depends on computer technology, and by database, data management is carried out to recovery system and to be very important technological means, and for making recovery system possess good recovery ability, must need to set up multiple recovery terminal, thus facilitate the people in each area to reclaim electricity-saving lamp, and the communication of multiple recovery terminal and database easily causes Data Concurrent problem.
Database is shared resource, possesses ACID characteristic, i.e. atomicity (Atomicity), consistance (Consistency), isolation (Isolation) and persistence (Durability), the Database Systems of support affairs, this four kinds of characteristics must be had simultaneously, these four kinds of characteristics be database there is principle, if run counter to these characteristics, the requirement of both parties is not then reached most probably based on the process of exchange of database, the communication of multiple recovery terminal and database likely there will be the situation reading simultaneously and/or revise same data, control just may access and store incorrect data if do not add this concurrent operations, destroy the consistance of database, therefore, need to carry out Data Concurrent control.
Summary of the invention
For this reason, the invention provides a kind of electricity-saving lamp recovery system of carrying out database concurrency control, the present invention ensure that high efficiency and the robustness of database by fulfillment database con current control, thus lay a solid foundation for the full-automatic management function realizing recovery system, recovery system of the present invention can realize full automatic self-monitoring and operation, thus save the manpower and materials of recovery system to greatest extent, and ensure that the normal operation of recovery system.
The technical scheme that the present invention solves the problems of the technologies described above is as follows:
Carry out an electricity-saving lamp recovery system for database concurrency control, comprise server, reclaim terminal and monitor client, described recovery terminal and monitor client all carry out communication with described server;
Described recovery terminal comprises electricity-saving lamp identification mechanism, electricity-saving lamp collects mechanism, currency output mechanism and control center, the control that described electricity-saving lamp identification mechanism, electricity-saving lamp collect mechanism, currency output mechanism all accepts described control center, described control center and described server carry out communication;
Described server receives the communication request of described recovery terminal, con current control is carried out by request pond module and request receiving processing module, thus described communication request is responded, and response results is transferred to monitoring module and carry out kinds of goods statistics, when the electricity-saving lamp quantity that described recovery terminal reclaims arrives electricity-saving lamp amount threshold or residue quantity of money arrives quantity of money threshold value, described monitoring module pushes alert message to described monitor client;
Described monitor client is for receiving described alert message, and the personnel holding described monitor client go to the recovery terminal of specifying in described alert message to empty electricity-saving lamp or supplementary currency according to described alert message.
Preferably, described request receiving processing module comprises some treatment channel, and described treatment channel possesses the ability of Parallel processing demands;
The communication request that described request pond module sends for receiving described recovery terminal, and judge whether described request sum arrives the maximum number of concurrent of server, if, then return notification message to recovery terminal, requiring that reclaiming terminal waits, if not, is then that described request is ranked according to the channels operation state of described request receiving processing module, and among the passage transmitting it to request receiving processing module by queue sequence, by described passage process request.
Preferably, when described request sum arrives the maximum number of concurrent of server, follow-up request is sequentially stored in the Buffer Pool of described request pond module, when there is idle channel in described request receiving processing module, described request receiving processing module sends wakeup message to described request pond module, described request pond module is that the message in described Buffer Pool is ranked, and transmits it to request receiving processing module by queue sequence.
Preferably, described number of queues is equal with described treatment channel number.
Preferably, described request pond according to the busy extent for the treatment of channel in described request receiving processing module, queue described in dynamic conditioning.
Preferably, after described recovery terminal carries out reclaimer operation success each time, described control center generates according to described reclaimer operation and reclaims message, and described recovery message is sent to server;
Described server receives the recovery message of described recovery terminal, carries out kinds of goods statistics according to described recovery message to described recovery terminal, and described kinds of goods statistics comprises each described recovery terminal the electricity-saving lamp quantity reclaimed and the statistics remaining quantity of money.
Preferably, whether described electricity-saving lamp identification mechanism is recovered thing for identification is electricity-saving lamp, and described electricity-saving lamp collects mechanism for being received by regenerant, and described currency output mechanism is used for exporting currency according to the quantity of regenerant to providing the personnel of regenerant.
Preferably, described communication request comprises two kinds, one be reclaim message, described recovery message comprise produces described recovery message recovery terminal number, produce recovery the reason of message, the electricity-saving lamp quantity of described recovery terminal and quantity of money; Another kind is notification message, and after recovery terminal electricity-saving lamp is cleared or supplements currency, described recovery terminal sends a notification message to described server, and described server upgrades kinds of goods statistical conditions according to described notification message.
Preferably, described alert message comprises recovery terminal number, reclaims terminal address, produces and reclaim the reason of message, the electricity-saving lamp quantity of described recovery terminal and quantity of money.
Preferably, described electricity-saving lamp amount threshold and described quantity of money threshold value can be arranged at described server end.
The invention has the beneficial effects as follows:
The invention provides a kind of electricity-saving lamp recovery system of carrying out database concurrency control, establish full automatic recovery system by the co-ordination and database concurrency process of reclaiming terminal, monitor client and server.The present invention ensure that high efficiency and the robustness of database by fulfillment database con current control, thus lay a solid foundation for the full-automatic self-management function realizing recovery system, recovery system of the present invention can realize full automatic self-monitoring and operation, possesses the advantage of automaticity height and high stability.
Accompanying drawing explanation
Fig. 1 is a kind of electricity-saving lamp recovery system of carrying out database concurrency control.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, the present invention is described in further detail.
In one embodiment, as shown in Figure 1, a kind of electricity-saving lamp recovery system of carrying out database concurrency control, comprises server, and reclaim terminal and monitor client, described recovery terminal and monitor client all carry out communication with described server;
Described recovery terminal comprises electricity-saving lamp identification mechanism, electricity-saving lamp collects mechanism, currency output mechanism and control center, the control that described electricity-saving lamp identification mechanism, electricity-saving lamp collect mechanism, currency output mechanism all accepts described control center, described control center and described server carry out communication;
Described server receives the communication request of described recovery terminal, con current control is carried out by request pond module and request receiving processing module, thus described communication request is responded, and response results is transferred to monitoring module and carry out kinds of goods statistics, when the electricity-saving lamp quantity that described recovery terminal reclaims arrives electricity-saving lamp amount threshold or residue quantity of money arrives quantity of money threshold value, described monitoring module pushes alert message to described monitor client;
Described monitor client is for receiving described alert message, and the personnel holding described monitor client go to the recovery terminal of specifying in described alert message to empty electricity-saving lamp or supplementary currency according to described alert message.
Preferably, described request receiving processing module comprises 4 treatment channel, and described treatment channel possesses the ability of Parallel processing demands;
The communication request that described request pond module sends for receiving described recovery terminal, and judge whether described request sum arrives the maximum number of concurrent of server, if, then return notification message to recovery terminal, requiring that reclaiming terminal waits, if not, is then that described request is ranked according to the channels operation state of described request receiving processing module, and among the passage transmitting it to request receiving processing module by queue sequence, by described passage process request.
Preferably, when described request sum arrives the maximum number of concurrent of server, follow-up request is sequentially stored in the Buffer Pool of described request pond module, when there is idle channel in described request receiving processing module, described request receiving processing module sends wakeup message to described request pond module, described request pond module is that the message in described Buffer Pool is ranked, and transmits it to request receiving processing module by queue sequence.
Described number of queues is equal with described treatment channel number.Described request pond according to the busy extent for the treatment of channel in described request receiving processing module, queue described in dynamic conditioning.
After described recovery terminal is successfully completed a reclaimer operation, described control center generates according to described reclaimer operation and reclaims message, and described recovery message is sent to server;
Described server receives the recovery message of described recovery terminal, carries out kinds of goods statistics according to described recovery message to described recovery terminal, and described kinds of goods statistics comprises each described recovery terminal the electricity-saving lamp quantity reclaimed and the statistics remaining quantity of money.
Whether described electricity-saving lamp identification mechanism is recovered thing for identification is electricity-saving lamp, and described electricity-saving lamp collects mechanism for being received by regenerant, and described currency output mechanism is used for exporting currency according to the quantity of regenerant to providing the personnel of regenerant.
Preferably, described communication request comprises two kinds, one be reclaim message, described recovery message comprise produces described recovery message recovery terminal number, produce recovery the reason of message, the electricity-saving lamp quantity of described recovery terminal and quantity of money; Another kind is notification message, and after recovery terminal electricity-saving lamp is cleared or supplements currency, described recovery terminal sends a notification message to described server, and described server upgrades kinds of goods statistical conditions according to described notification message.
Described alert message comprises recovery terminal number, reclaims terminal address, produces and reclaim the reason of message, the electricity-saving lamp quantity of described recovery terminal and quantity of money.
Described electricity-saving lamp amount threshold and described quantity of money threshold value can be arranged at described server end, described electricity-saving lamp amount threshold setting range is the 70%-85% of described recovery terminal electricity-saving lamp capacity, and described quantity of money threshold value setting range is the 10%-30% of described recovery terminal currency storage cap value.
Described server adopts server push mechanism, uses same connection that information is initiatively pushed to described monitor client in response cycle, and described server adopts Comet4j and NOI agreement to realize described server push mechanism.
Described server sets up overall Map, described Map connects for all comet recording server end, described monitor client logon server, if log in successfully, then server sets up comet connection to user, and by this connection write Map, and according to the record in Map to described monitor client pushed information.Described server maintenance has recovery terminal mapping table and monitor client mapping table, described recovery terminal mapping table is for recording the corresponding relation reclaiming terminal number and reclaim terminal address, described monitor client mapping table is for recording monitor client and the management of reclaiming terminal, the possessor of monitor client has a responsibility for safeguarding the recovery terminal with corresponding relation, makes to reclaim terminal normal operation.
When described server produces alert message, immediately described alert message is sent to described monitor client, and described monitor client sends request to keep link again.Do not produce new alert message when described server exceedes the certain predetermined time, then send null message to described monitor client, now monitor client also sends request to keep link again.
Above disclosedly be only a kind of preferred embodiment of the present invention, certainly can not limit the interest field of the present invention with this, therefore according to the equivalent variations that the claims in the present invention are done, still belong to the scope that the present invention is contained.
Claims (10)
1. carry out an electricity-saving lamp recovery system for database concurrency control, it is characterized in that, comprise server, reclaim terminal and monitor client, described recovery terminal and monitor client all carry out communication with described server;
Described recovery terminal comprises electricity-saving lamp identification mechanism, electricity-saving lamp collects mechanism, currency output mechanism and control center, the control that described electricity-saving lamp identification mechanism, electricity-saving lamp collect mechanism, currency output mechanism all accepts described control center, described control center and described server carry out communication;
Described server receives the communication request of described recovery terminal, con current control is carried out by request pond module and request receiving processing module, thus described communication request is responded, and monitoring module response results being transferred to server carries out kinds of goods statistics, when the electricity-saving lamp quantity that described recovery terminal reclaims arrives electricity-saving lamp amount threshold or residue quantity of money arrives quantity of money threshold value, described monitoring module pushes alert message to described monitor client;
Described monitor client for receiving described alert message, and goes to the recovery terminal of specifying in described alert message to empty electricity-saving lamp or supplementary currency according to described alert message.
2. a kind of electricity-saving lamp recovery system of carrying out database concurrency control according to claim 1, is characterized in that,
Described request receiving processing module comprises some treatment channel, and described treatment channel possesses the ability of Parallel processing demands;
The communication request that described request pond module sends for receiving described recovery terminal, and judge whether described request sum arrives the maximum number of concurrent of server, if, then return notification message to recovery terminal, requiring that reclaiming terminal waits, if not, is then that described request is ranked according to the channels operation state of described request receiving processing module, and among the passage transmitting it to request receiving processing module by queue sequence, by described passage process request.
3. a kind of electricity-saving lamp recovery system of carrying out database concurrency control according to claim 2, it is characterized in that, when described request sum arrives the maximum number of concurrent of server, follow-up request is sequentially stored in the Buffer Pool of described request pond module, when there is idle channel in described request receiving processing module, described request receiving processing module sends wakeup message to described request pond module, described request pond module is that the message in described Buffer Pool is ranked, and transmits it to request receiving processing module by queue sequence.
4. a kind of electricity-saving lamp recovery system of carrying out database concurrency control according to Claims 2 or 3, it is characterized in that, described number of queues is equal with described treatment channel number.
5. a kind of electricity-saving lamp recovery system of carrying out database concurrency control according to claim 4, is characterized in that, described request pond according to the busy extent for the treatment of channel in described request receiving processing module, queue described in dynamic conditioning.
6. according to a kind of electricity-saving lamp recovery system of carrying out database concurrency control in claim 1-5 described in any one, it is characterized in that, after described recovery terminal is successfully completed a reclaimer operation, described control center generates according to described reclaimer operation and reclaims message, and described recovery message is sent to server;
Described server receives the recovery message of described recovery terminal, carries out kinds of goods statistics according to described communication request to described recovery terminal, and described kinds of goods statistics comprises each described recovery terminal the electricity-saving lamp quantity reclaimed and the statistics remaining quantity of money.
7. according to a kind of electricity-saving lamp recovery system of carrying out database concurrency control described in claim 6, it is characterized in that, whether described electricity-saving lamp identification mechanism is recovered thing for identification is electricity-saving lamp, described electricity-saving lamp collects mechanism for being received by regenerant, and described currency output mechanism is used for exporting currency according to the quantity of regenerant to providing the personnel of regenerant.
8. a kind of electricity-saving lamp recovery system of carrying out database concurrency control according to claim 7, it is characterized in that, described communication request comprises two kinds, one be reclaim message, described recovery message comprise produces described recovery message recovery terminal number, produce recovery the reason of message, the electricity-saving lamp quantity of described recovery terminal and quantity of money; Another kind is notification message, and after recovery terminal electricity-saving lamp is cleared or supplements currency, described recovery terminal sends a notification message to described server, and described server upgrades kinds of goods statistical conditions according to described notification message.
9. a kind of electricity-saving lamp recovery system of carrying out database concurrency control according to claim 7 or 8, it is characterized in that, described alert message comprises recovery terminal number, reclaims terminal address, produces and reclaim the reason of message, the electricity-saving lamp quantity of described recovery terminal and quantity of money.
10. a kind of electricity-saving lamp recovery system of carrying out database concurrency control according to claim 9, is characterized in that, described electricity-saving lamp amount threshold and described quantity of money threshold value can be arranged at described server end.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510144394.2A CN104732653A (en) | 2015-03-30 | 2015-03-30 | Energy-saving lamp recovery system adopting concurrency control over database |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510144394.2A CN104732653A (en) | 2015-03-30 | 2015-03-30 | Energy-saving lamp recovery system adopting concurrency control over database |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104732653A true CN104732653A (en) | 2015-06-24 |
Family
ID=53456518
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510144394.2A Pending CN104732653A (en) | 2015-03-30 | 2015-03-30 | Energy-saving lamp recovery system adopting concurrency control over database |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104732653A (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101610179A (en) * | 2008-06-20 | 2009-12-23 | 杭州世导科技有限公司 | The trustship center and the real-time action management system that are used for real-time action management system |
CN102800151A (en) * | 2011-05-24 | 2012-11-28 | 增城市博大塑料五金有限公司 | Intelligent container recycling system and container self-service recycling terminal |
CN203102430U (en) * | 2013-02-20 | 2013-07-31 | 深圳市格林美高新技术股份有限公司 | Energy-saving lamp recycling machine |
CN103226870A (en) * | 2013-03-20 | 2013-07-31 | 中北大学 | Material recycling device based on Ad Hoc network |
CN103559120A (en) * | 2013-11-13 | 2014-02-05 | 北京网秦天下科技有限公司 | Log recording method and server |
CN104363270A (en) * | 2014-10-29 | 2015-02-18 | 咸亨国际(杭州)物联网信息产业有限公司 | Centralized interface communication concurrency control system and control method thereof |
-
2015
- 2015-03-30 CN CN201510144394.2A patent/CN104732653A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101610179A (en) * | 2008-06-20 | 2009-12-23 | 杭州世导科技有限公司 | The trustship center and the real-time action management system that are used for real-time action management system |
CN102800151A (en) * | 2011-05-24 | 2012-11-28 | 增城市博大塑料五金有限公司 | Intelligent container recycling system and container self-service recycling terminal |
CN203102430U (en) * | 2013-02-20 | 2013-07-31 | 深圳市格林美高新技术股份有限公司 | Energy-saving lamp recycling machine |
CN103226870A (en) * | 2013-03-20 | 2013-07-31 | 中北大学 | Material recycling device based on Ad Hoc network |
CN103559120A (en) * | 2013-11-13 | 2014-02-05 | 北京网秦天下科技有限公司 | Log recording method and server |
CN104363270A (en) * | 2014-10-29 | 2015-02-18 | 咸亨国际(杭州)物联网信息产业有限公司 | Centralized interface communication concurrency control system and control method thereof |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103116661B (en) | A kind of data processing method of database | |
CN101102577B (en) | Incremental synchronization method for data in tables of frontground and background database of wireless communication base station system | |
CN104317800A (en) | Hybrid storage system and method for mass intelligent power utilization data | |
CN108848132B (en) | Power distribution scheduling main station system based on cloud | |
CN111818112A (en) | Kafka system-based message sending method and device | |
CN108140035B (en) | Database replication method and device for distributed system | |
CN101860493A (en) | Method, server and system for distributing application server address for clients | |
CN106210163B (en) | IP address-based localization method and device | |
CN111399764B (en) | Data storage method, data reading device, data storage equipment and data storage medium | |
CN114048217A (en) | Incremental data synchronization method and device, electronic equipment and storage medium | |
CN107870982A (en) | Data processing method, system and computer-readable recording medium | |
CN103716384A (en) | Method and device for realizing cloud storage data synchronization in cross-data-center manner | |
CN105592164A (en) | Distributed system and method for data processing | |
CN104615684A (en) | Mass data communication concurrent processing method and system | |
CN105162727B (en) | A kind of method for realizing quick peer-to-peer communications in DSFA systems based on VxWorks system | |
CN115292280A (en) | Cross-region data scheduling method, device, equipment and storage medium | |
CN103631600A (en) | Data processing method and system for embedded RFID (radio frequency identification) middleware | |
CN103678423A (en) | Data file input system, device and method | |
CN105354110B (en) | Cloud Server data back up method and device | |
CN103297477B (en) | A kind of data acquisition reporting system and data processing method and proxy server | |
CN109542841A (en) | The method and terminal device of data snapshot are created in cluster | |
CN112363838A (en) | Data processing method and device, storage medium and electronic device | |
CN105450733A (en) | Business data distribution processing method and system | |
CN105930504B (en) | A kind of network management timing file cocurrent processing system and concurrent processing method | |
CN104732653A (en) | Energy-saving lamp recovery system adopting concurrency control over database |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20150624 |
|
WD01 | Invention patent application deemed withdrawn after publication |