CN101770557B - Method for calculating service time of software in system - Google Patents
Method for calculating service time of software in system Download PDFInfo
- Publication number
- CN101770557B CN101770557B CN 200810205098 CN200810205098A CN101770557B CN 101770557 B CN101770557 B CN 101770557B CN 200810205098 CN200810205098 CN 200810205098 CN 200810205098 A CN200810205098 A CN 200810205098A CN 101770557 B CN101770557 B CN 101770557B
- Authority
- CN
- China
- Prior art keywords
- time
- software
- time value
- accumulated
- value
- 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
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The present invention relates to a method for calculating service time of software in a system. The method comprises the following steps: storing an initial software service time value and an accumulated software service time value into a flash memory of the system; detecting whether the software is installed or started; recording a time value before the time of the system is modified and a time value after the time of the system is modified, changing the initial time value in the flash memory into the time value before the time of the system is modified, and changing the accumulated time value into the sum of the difference of a time value before the time of the system is modified and the starting time value of the flash memory and the current accumulated time value; updating the accumulated software service time value through a time period; detecting whether the total accumulated software time exceeds a time limit; and adopting a limiting measure for the use of the software in the system. In the method for calculating the service time of the software in the system, the timing is more accurate, and the cost is lower.
Description
Technical field
The computing method of service time that the present invention relates to a kind of software in system.
Background technology
In software product, usually need to calculate the service time of the software product that the user uses, thereby according to charging accordingly service time, or the free trial period etc. of certain hour is provided.Such as the software product on the PC (Personal Computer) much all there is a trial period of 30 days, installs when this software product and just can not continue to have used after surpassing 30 days, unless register and pay.General way is in system, in the registration table or certain file such as operating system, notes the time of installation; when each software startup or use; time when time that system is current and installation compares, if discovery time is expired, then starts safeguard measure.Because clock correction realized the purpose of timing when this method adopted memory system, if the user changes system time,, then adopt time value that this method obtains with inaccurate such as 20 days after system time is installed instead, lost the meaning of protection.
The another kind of method of calculating the service time of user software product is to adopt the network time server method for updating, though this method can the resolution system time and the problem of actual physics time synchronized.But need to connect network, depend on that the setting of operator and user confirm the service time of software product, and cost is than higher.
Summary of the invention
Calculate inaccurate and the cost problem of higher service time in system in order to solve software of the prior art, be necessary to provide a kind of accurate and lower-cost software computing method of service time of calculating.
The computing method of a kind of software service time in system is characterized in that, this method comprises that zero-time value and accumulated time value that software is used are stored in the flash memories of this system; Whether detection software is mounted or starts; Write down time value and amended time value before this system time is revised, and the zero-time value in this flash memories changed to time value before this system time is revised, the difference that this accumulated time value changes to time value and the zero-time value in the flash memories before system time is revised again with current accumulated time value with; Through cycle time, upgrade the accumulated time value that this software uses; Whether overtime limits to detect total accumulated software time; Restriction is taked in use in system to this software.
Compared with prior art, in the software of the present invention computing method of service time, write down time value and amended time value before this system time is revised, and each system time is added up service time before changing, thus total accumulated time of software for calculation.Therefore, the computing method of software of the present invention service time are more accurate, can prevent that the user from changing total accumulated time by revising system time, thereby reach the purpose of this software of protection.The computing method of software of the present invention service time are utilized the total accumulated time of Time Calculation of system itself, avoid using the network time server method for updating, owing to do not need to connect the networking, cost is lower.
Description of drawings
The process flow diagram of the computing method of service time that Fig. 1 is software of the present invention in system.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, the present invention is described in further detail below in conjunction with accompanying drawing.
See also Fig. 1, the process flow diagram of the computing method of service time that are software of the present invention in system.This method comprises that zero-time value and accumulated time value that software is used are stored in the flash memories of this system; Whether detection software is mounted or starts; Write down time value and amended time value before this system time is revised, and the zero-time value in this flash memories changed to time value before this system time is revised, the difference that this accumulated time value changes to time value and the zero-time value in the flash memories before system time is revised again with current accumulated time value with; Through cycle time, upgrade the accumulated time value that this software uses; Whether overtime limits to detect total accumulated software time; Restriction is taked in use in system to this software.
The concrete steps of this software computing method of service time in system are as follows:
Step 101: zero-time T0 and accumulated time T1 that target software uses are set, and this zero-time T0 and this accumulated time T1 are stored in the flash memories (Flash) of this system.Zero-time (absolute physical time) when this zero-time T0 is used for record object software startup (or installation), the accumulated time that target software used when T1 was used for recording user change system time.The initial value of this zero-time T0 and accumulated time T1 is 0.This flash memories is preferably NOR type flash memories.
Step 102: judge whether target software is mounted or starts,, then withdraw from this calculation procedure,, then enter step 103 if target software is mounted or starts if target software is not mounted or starts.
Step 103: this zero-time T0 is set to the time that this target software is installed or started, and the zero-time T0 that this is reset is stored in the flash memories of this system.
Step 104: judge whether system time is modified,, then enter step 106,, then enter step 105 if system time is modified if system time is not modified.
Step 105: write down time R0 and amended time R1 before this system time is revised, and the zero-time T0 in this flash memories is set to R1, accumulated time T1 is set to R0-T0+T1.
Step 106: at regular intervals the cycle, for example 1 hour or 1 day, the total cumulative time Tt after the calculating target software is brought into use supposed that current system time is TC, then total cumulative time Tt=TC-T0+T1.
Step 107: judge that whether overtime limits total accumulated time Tt, if not, then re-executes step 106, if then enter step 108.
Step 108: the software that the user uses is taked restriction, for example stop using or pay the fees again, and T0 is made as the current time of system, T1 is put 0 and deposit in this flash memories.
Compared with prior art, in the software of the present invention computing method of service time, before the register system time change and after changing time R0 and R1, and added up the service time of this software, thereby prevent the inaccuracy of the computing time that the user's modification system time brings.Therefore, the computing method of software of the present invention service time are more accurate, can prevent that the user from changing total accumulated time by revising system time, thereby reach the purpose of this software of protection.The computing method of software of the present invention service time are utilized the total accumulated time of Time Calculation of system itself, avoid using the network time server method for updating, owing to do not need to connect the networking, cost is lower.The computing method of software of the present invention service time can also can be used on PC so that be used in portable terminal, promptly can be used for the period of time for approval of software for calculation, also can be used for according to carrying out corresponding charge operation service time.
Compared with prior art, the computing method of software of the present invention service time are used NOR type flash memories, and NOR type flash memories can carry out in chip that (eXecute In Place, XIP), and transfer efficiency is higher.Because flash memories generally all has the restriction of writing number of times, and the computing method of software of the present invention service time are only just calculated accumulated time and are saved in this flash memories when system time is modified, thereby reduced write operation to the system flash storer, therefore the computing method of software of the present invention service time have reduced the number of times of system read-write flash memories, thereby reduced the overhead of system, prolonged the serviceable life of system.
Under situation without departing from the spirit and scope of the present invention, can also constitute many very embodiment of big difference that have.Should be appreciated that except as defined by the appended claims, the invention is not restricted at the specific embodiment described in the instructions.
Claims (6)
1. the computing method of software service time in system is characterized in that this method comprises:
1) the zero-time value that software is used and the initial value of accumulated time value are stored in the flash memories of this system;
2) whether detection software is mounted or starts;
3) if detection software is not mounted or starts, withdraw from calculation procedure;
4) if detection software is mounted or starts, write down time value and amended time value before this system time is revised, and the zero-time value in this flash memories changed to time value before this system time is revised, the difference that this accumulated time value changes to time value and the zero-time value in the flash memories before system time is revised again with current accumulated time value with;
5), upgrade the accumulated time value that this software uses through cycle time;
6) whether overtime limits to detect total accumulated software time;
7) if detect not overtime restriction of total accumulated software time, then repeating step 5);
8) if detect total accumulated software time overtime restriction, restriction is taked in the use in system to this software.
2. the computing method of software as claimed in claim 1 service time in system, it is characterized in that: this flash memories is a NOR type flash memories.
3. the computing method of software as claimed in claim 1 service time in system is characterized in that: the zero-time value that this software uses and the initial value of accumulated time value are 0.
4. the computing method of software as claimed in claim 1 service time in system, it is characterized in that: be mounted or start if detect software, the zero-time value that this software uses is set to the time value that this software is installed or started, and the zero-time value that this is reset is stored in the flash memories of this system.
5. the computing method of software as claimed in claim 1 service time in system, it is characterized in that: this time cycle is 1 hour or 1 day.
6. the computing method of software as claimed in claim 1 service time in system, it is characterized in that: this flash memories is arranged at terminating machine or PC.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 200810205098 CN101770557B (en) | 2008-12-30 | 2008-12-30 | Method for calculating service time of software in system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 200810205098 CN101770557B (en) | 2008-12-30 | 2008-12-30 | Method for calculating service time of software in system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101770557A CN101770557A (en) | 2010-07-07 |
CN101770557B true CN101770557B (en) | 2011-12-14 |
Family
ID=42503411
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 200810205098 Expired - Fee Related CN101770557B (en) | 2008-12-30 | 2008-12-30 | Method for calculating service time of software in system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101770557B (en) |
Families Citing this family (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102999734B (en) * | 2011-09-19 | 2015-12-02 | 比亚迪股份有限公司 | A kind of computing machine term of life limits method and system |
TW201337630A (en) * | 2012-03-13 | 2013-09-16 | Wistron Corp | Method and system for protecting software authorization |
CN103885792A (en) * | 2012-12-20 | 2014-06-25 | 中国移动通信集团公司 | Method and device for operating application software mounted on terminal |
CN103268435B (en) * | 2013-04-25 | 2016-07-06 | 福建伊时代信息科技股份有限公司 | Intranet license generates method and system, intranet license protection method and system |
CN103312513B (en) * | 2013-06-19 | 2016-03-02 | 北京华胜天成科技股份有限公司 | The method and system of use authority are verified under distributed environment |
CN104270360A (en) * | 2014-09-28 | 2015-01-07 | 曙光信息产业股份有限公司 | Implementation method for trusteeship service time mechanism in resource trusteeship protocol |
CN105138900B (en) * | 2015-07-30 | 2018-09-25 | 珠海格力电器股份有限公司 | Control method and system for validity period of single-machine software |
CN107741906B (en) * | 2017-09-29 | 2019-05-17 | 平安科技(深圳)有限公司 | Monetary fund system automation test method, device, equipment and storage medium |
CN110314270B (en) * | 2019-04-30 | 2022-05-13 | 金脑元(武汉)医学生物科技有限公司 | Insomnia treatment system and insomnia therapeutic instrument based on cloud server |
CN110659456B (en) * | 2019-09-09 | 2021-10-15 | 北京优炫软件股份有限公司 | Application software product use control method and device |
CN114626067A (en) * | 2021-06-25 | 2022-06-14 | 江苏航天龙梦信息技术有限公司 | Temporary firmware control method |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4937780A (en) * | 1986-05-30 | 1990-06-26 | Bull Nh Information Systems, Inc. | Single instruction updating of processing time field using software invisible working registers |
CN1822017A (en) * | 2006-03-31 | 2006-08-23 | 北京飞天诚信科技有限公司 | Real time clock correcting method in soft ware protecter |
CN101216870A (en) * | 2007-12-28 | 2008-07-09 | 北京深思洛克数据保护中心 | A method for real time acquisition and remote calibration in software protection device |
-
2008
- 2008-12-30 CN CN 200810205098 patent/CN101770557B/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4937780A (en) * | 1986-05-30 | 1990-06-26 | Bull Nh Information Systems, Inc. | Single instruction updating of processing time field using software invisible working registers |
CN1822017A (en) * | 2006-03-31 | 2006-08-23 | 北京飞天诚信科技有限公司 | Real time clock correcting method in soft ware protecter |
CN101216870A (en) * | 2007-12-28 | 2008-07-09 | 北京深思洛克数据保护中心 | A method for real time acquisition and remote calibration in software protection device |
Also Published As
Publication number | Publication date |
---|---|
CN101770557A (en) | 2010-07-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101770557B (en) | Method for calculating service time of software in system | |
CN103942061B (en) | Battery firmware updating method, portable electronic device and rechargeable battery module | |
CN101739266B (en) | Firmware updating method | |
CN1946210B (en) | TD-SCDMA mobile phone for quick open, start and display and its realizing method | |
CN106569921B (en) | A kind of metering core clock processing method and processing device of twin-core intelligent electric energy meter | |
CN101526907B (en) | Flash memory management method without startup errors of electronic product | |
CN103823769A (en) | Computer system and data recovery method | |
CN109040467A (en) | Interface electricity determines method, apparatus, storage medium and mobile terminal | |
CN106713662A (en) | Method and device for optimizing performance of positioning system, and mobile terminal | |
CN104063254A (en) | Online upgrading method for electric energy meter | |
CN106872996A (en) | The optimization method of alignment system performance, device and mobile terminal | |
CN103514014A (en) | Method for designing boot system of embedded terminal equipment | |
US9003063B2 (en) | Systems, methods, and apparatus for estimating power time of use | |
CN108762789A (en) | A kind of server node firmware update and relevant apparatus | |
CN114236461A (en) | Electric quantity calibration method, electronic equipment and storage medium | |
CN103455750A (en) | High-security verification method and high-security verification system for embedded devices | |
CN108614715A (en) | A kind of Internet of Things gas meter, flow meter that can independently upgrade and upgrade method | |
CN100576136C (en) | Usage license data are connected the method for service data transmission network with relevant equipment | |
CN103914311A (en) | Firmware management method and system | |
CN111124452A (en) | Software upgrading method and device for instrument, instrument and storage medium | |
CN103345440A (en) | Statistical method and device of accumulated running time of electronic equipment and electronic equipment | |
CN102929676A (en) | Quick adapting method of terminal device based on Android operation system | |
CN110008105A (en) | A kind of BMC time reservation method, device and electronic equipment and storage medium | |
US20190033943A1 (en) | Method for calculating power-on hours of an electronic device and electronic device utilizing the same | |
CN112511156A (en) | Pulse metering and storing method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20111214 Termination date: 20141230 |
|
EXPY | Termination of patent right or utility model |