CN107273279A - A kind of bill management method and device - Google Patents

A kind of bill management method and device Download PDF

Info

Publication number
CN107273279A
CN107273279A CN201710466536.6A CN201710466536A CN107273279A CN 107273279 A CN107273279 A CN 107273279A CN 201710466536 A CN201710466536 A CN 201710466536A CN 107273279 A CN107273279 A CN 107273279A
Authority
CN
China
Prior art keywords
user
allocation information
resource allocation
resource
group
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
Application number
CN201710466536.6A
Other languages
Chinese (zh)
Inventor
胡叶
秦璞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201710466536.6A priority Critical patent/CN107273279A/en
Publication of CN107273279A publication Critical patent/CN107273279A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3452Performance evaluation by statistical analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/12Accounting
    • G06Q40/125Finance or payroll

Abstract

The present invention provides a kind of bill management method and device, and the above method comprises the following steps:Obtain resource allocation information;According to the resource allocation information of acquisition, operation resource using information, bill management is carried out, accurately and efficiently bill management is realized.

Description

A kind of bill management method and device
Technical field
The invention belongs to accounting management field, more particularly to a kind of bill management method and device.
Background technology
Slurm is the job scheduling an increased income application software, is widely used in realizing in high performance service cluster and makees Existing job logging function carries out statistical analysis in the management and running of industry, Slurm, and the daily record of record includes:Each operation Running status, start over the time, using the resource such as information such as cpu check figures, internal memory, nodes, these information are present in text In part or database.
With current cloud computing and the continuous growth of big data demand, HPCC is used as a kind of computing resource It can be rented by supplier as service or commercial, therefore be accomplished by providing the user corresponding accounting management function.
But user obtains the mode of book keeping operation statistical information and is mainly user by client to slurm in Slurm at present Management node sends order and obtains job log record, and slurm management nodes record letter by the form backtracking of command parameter Breath.But, user needs voluntarily to count and calculate bill result after obtaining log recording, on the one hand reduces efficiency, on the other hand, Also easily error.
Therefore, above-mentioned technical problem is solved in the urgent need to accurately and efficiently bill management method.
The content of the invention
The present invention provides a kind of bill management method and device, to solve the above problems.
The embodiment of the present invention provides a kind of bill management method.The above method comprises the following steps:Obtain resource distribution letter Breath;According to the resource allocation information of acquisition, operation resource using information, bill management is carried out.
The embodiment of the present invention provides a kind of bill managing device, including acquisition module, bill statistical module;Wherein, it is described Acquisition module is connected with the bill statistical module;
The acquisition module, the resource allocation information for obtaining user;
The bill statistical module, for according to the resource allocation information, operation resource using information, carrying out bill pipe Reason.
Pass through following scheme:Obtain resource allocation information;Letter is used according to the resource allocation information of acquisition, operation resource Breath, carries out bill management, realizes accurately and efficiently bill management.
Pass through following scheme:By selecting after user or user's group, the monovalent information of input resource, in corresponding xml document Middle increase is corresponding<price>Element records resource allocation information;Realize and supporting the note valency statistical function of slurm clusters On the basis of, distinguish and realize user and the configuration of user's group and valuation statistics, can so meet client in actual use mistake Need to realize in journey by user, by user's group or the demand being applied in combination, greatly strengthen the experience of user.
Pass through following scheme:According to the inquiry request of acquisition, the operation note of user or user's group in the correspondence period is obtained Record and travel through each charge book;According to pair of operation resource using information, user or user's group in resource allocation information The resource allocation information answered, carries out bill statistics;The function of segmentation account phase is realized, user can change configuration information, as a result Data are calculated and counted according to the unit price of correspondence time, can so meet user's modification with postponing statistics bill and configuration information The requirement of uniformity, greatly strengthen Consumer's Experience.
Brief description of the drawings
Accompanying drawing described herein is used for providing a further understanding of the present invention, constitutes the part of the application, this hair Bright schematic description and description is used to explain the present invention, does not constitute inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 show the bill management method process chart of the embodiment of the present invention 1;
Fig. 2 show the bill management method process chart of the embodiment of the present invention 2;
Fig. 3 show the bill managing device structure chart of the embodiment of the present invention 3;
Fig. 4 show the bill managing device structure chart of the embodiment of the present invention 4.
Embodiment
Describe the present invention in detail below with reference to accompanying drawing and in conjunction with the embodiments.It should be noted that not conflicting In the case of, the feature in embodiment and embodiment in the application can be mutually combined.
Fig. 1 show the bill management method process chart of the embodiment of the present invention 1, comprises the following steps:
Step 101:Obtain resource allocation information;
Further, before acquisition resource allocation information, in addition to:
Data model is defined, resource allocation information is preserved using xml document:Account.xml file records are created to use The resource allocation information at family;Create the resource allocation information of accountGrp.xml file record user's groups.
Wherein, data model is defined, scheme preserves configuration information using xml document, creates account.xml records and use The resource allocation information at family, creates the resource allocation information that accountGrp.xml records user's group.Example is as follows:
In xml document each<account>One user of element representation or the resource distribution of user's group,<price> Element representation user uses the unit price of resource,<account>Element can include one or more<price>Element.As above show In example, the unit price for the cpu durations that userl user used after 24 days Mays in 2016 was 10 yuan/hour, on May 24th, 2017 The unit price of the cpu durations used afterwards is 5 yuan/hour.
Wherein, configuration information can also be preserved except using xml document by database.
Further, in the xml document each<account>One user of element representation or the resource of user's group Configuration,<price>Element representation user uses the unit price of resource,<account>Element is comprising one or more<price>Member Element.
Further, by selecting after user or user's group, the monovalent information of input resource, increase in corresponding xml document Plus it is corresponding<price>Element records resource allocation information.
Wherein, keeper selects user or the user's group to be configured in the page, and the monovalent information of input resource, click is carried Hand over, background service is received after page request increases corresponding according to the user of selection or user's group in corresponding xml document< price>Element records resource allocation information.
Step 102:According to the resource allocation information of acquisition, operation resource using information, bill management is carried out.
Further, according to the inquiry request of acquisition, the charge book of user or user's group in the correspondence period is obtained simultaneously Travel through each charge book;
According to the corresponding resource distribution letter of operation resource using information, user or user's group in resource allocation information Breath, carries out bill statistics.
Preferentially, if the time that operation starts is while have the resource allocation information of user and user's group, user is used The resource allocation information of group;Or,
If only existing the resource allocation information of user, directly using the resource allocation information of user;Or,
If only existing the resource allocation information of user's group, directly using the resource allocation information of user's group;Or,
If resource allocation information is not present in user and user's group, resource book keeping operation is 0.
Wherein, the charge book of user or user's group in the slurm command lookup periods is called according to required parameter, then Each record of traversal, obtains corresponding resource unit price according to activity duration and user/user's group and counts in configuration file.
If while there is the unit price configuration of user and user's group, using user's group with confidence in the time that operation starts Breath;If only existing user or only existing the unit price configuration of user's group, the information is directly used;If user and user's group are equal In the absence of configuration, then the resource book keeping operation of the operation is 0.
With reference to Fig. 2, citing is described in detail:
The embodiment of the present invention can specifically be realized according to following steps:
A bottom scan script) is defined
Input parameter:Time started startTime, end time endTime, search type flag (user or group), Search list (user or user group list)
Output parameter:JSON arrays, one charge book of each json element representation.
Start over time of the script first in input parameter calls sacct orders, then according to specified format time The record of order return is gone through, each is recorded, (sacct orders are returned again according to temporal filtering charge book is started over Record it is considered that maximum include the record set of period, it is therefore desirable to refilter), finally according to input inquiry mode with Content is searched to obtain the data to be exported and export with the form of JSON elements.
B the monovalent acquisition module of resource) is defined
Define getCfgs functions and obtain resource unit price, it is Configuration Type (user/group) to enter ginseng, and the module is according to configuration Type obtains corresponding configuration file (accout.xml/accountGrp.xml) and parsed and configured, configuration information with The form of JSON objects is used as output.
The module is called as public function in the monovalent configuration module of resource and operation valuation module.
C the monovalent configuration module of resource) is defined
The monovalent configuring request of setCfg functions process resource is defined, input parameter is Configuration Type (user/group), is used Family/user's group name, CPU durations unit price is monovalent during working rig.The module calls B first) defined in function obtain matched somebody with somebody Put, if not finding the user or user's group in having configured, newly-built account elements and the price member in xml document Element record configuration information, if account elements are existing, the newly-built price elements record configuration information under the element.
D) definition valuation statistical module
To each A) charge book that returns, first according between at the beginning of record, user and subscriber group information obtain The monovalent information of the corresponding resource of operation, if only existing user or user's group configuration, valuates by the configuration;If existed simultaneously Then use the configuration of user's group.Acquisition unit price matches somebody with somebody to postpone calculates operation bill according to the resource service condition of operation.Finally, according to Query type and inquiry content search whether the statistics knot of the existing user or user's group in the JSON objects of returning result Really, if do not existed, create and minute book bar operation resource and bill, if there is then add up this operation resource and Bill.Charge book traversal returns to JSON objects after terminating.
Fig. 3 show the bill managing device structure chart of the embodiment of the present invention 3, including acquisition module, bill statistical module; Wherein, the acquisition module is connected with the bill statistical module;
The acquisition module, the resource allocation information for obtaining user;
The bill statistical module, for according to the resource allocation information, operation resource using information, carrying out bill pipe Reason.
Fig. 4 show the bill managing device structure chart of the embodiment of the present invention 4, on the basis of Fig. 3, in addition to sets mould Block;Wherein, the setup module is connected with the acquisition module;
The setup module, for defining data model, resource allocation information is preserved using xml document:It is additionally operable to wound Build the resource allocation information of account.xml file record users;It is additionally operable to create accountGrp.xml file record users The resource allocation information of group.
Further, in the xml document each<account>One user of element representation or the resource of user's group Configuration,<price>Element representation user uses the unit price of resource,<account>Element is comprising one or more<price>Member Element.
Further, the acquisition module, is additionally operable to the inquiry request according to acquisition, obtain in the correspondence period user or The charge book of user's group simultaneously travels through each charge book;
The bill statistical module, is additionally operable in resource distribution be believed according to operation resource using information, user or user's group Corresponding resource unit price in breath, carries out bill statistics.
The book keeping operation statistical of the present invention can also be used for the HPC cluster using non-slurm, and such as PBS clusters are adjusted by parsing The job history data that degree device is safeguarded can obtain the resource service condition of operation.
Pass through following scheme:Obtain resource allocation information;Letter is used according to the resource allocation information of acquisition, operation resource Breath, carries out bill management, realizes accurately and efficiently bill management.
Pass through following scheme:By selecting after user or user's group, the monovalent information of input resource, in corresponding xml document Middle increase is corresponding<price>Element records resource allocation information;Realize and supporting the note valency statistical function of slurm clusters On the basis of, distinguish and realize user and the configuration of user's group and valuation statistics, can so meet client in actual use mistake Need to realize in journey by user, by user's group or the demand being applied in combination, greatly strengthen the experience of user.
Pass through following scheme:According to the inquiry request of acquisition, the operation note of user or user's group in the correspondence period is obtained Record and travel through each charge book;According to pair of operation resource using information, user or user's group in resource allocation information The resource allocation information answered, carries out bill statistics;The function of segmentation account phase is realized, user can change configuration information, as a result Data are calculated and counted according to the unit price of correspondence time, can so meet user's modification with postponing statistics bill and configuration information The requirement of uniformity, greatly strengthen Consumer's Experience.
The preferred embodiments of the present invention are the foregoing is only, are not intended to limit the invention, for the skill of this area For art personnel, the present invention can have various modifications and variations.Within the spirit and principles of the invention, that is made any repaiies Change, equivalent substitution, improvement etc., should be included in the scope of the protection.

Claims (10)

1. a kind of bill management method, it is characterised in that comprise the following steps:
Obtain resource allocation information;
According to the resource allocation information of acquisition, operation resource using information, bill management is carried out.
2. accounting management method according to claim 1, it is characterised in that before acquisition resource allocation information, in addition to:
Data model is defined, resource allocation information is preserved using xml document:Create account.xml file record users' Resource allocation information;Create the resource allocation information of accountGrp.xml file record user's groups.
3. accounting management method according to claim 2, it is characterised in that in the xml document each< account>One user of element representation or the resource distribution of user's group,<price>Element representation user uses the unit price of resource, <account>Element is comprising one or more<price>Element.
4. method according to claim 3, it is characterised in that by selecting user or user's group, input resource unit price letter After breath, increase corresponding in corresponding xml document<price>Element records resource allocation information.
5. according to the method described in claim 1, it is characterised in that according to the inquiry request of acquisition, obtain in the correspondence period The charge book of user or user's group simultaneously travels through each charge book;
According to the corresponding resource allocation information of operation resource using information, user or user's group in resource allocation information, enter Row bill is counted.
6. method according to claim 5, it is characterised in that if the time that operation starts is while have user and user's group Resource allocation information, then using the resource allocation information of user's group;Or,
If only existing the resource allocation information of user, directly using the resource allocation information of user;Or,
If only existing the resource allocation information of user's group, directly using the resource allocation information of user's group;Or,
If resource allocation information is not present in user and user's group, resource book keeping operation is 0.
7. a kind of bill managing device, it is characterised in that including acquisition module, bill statistical module;Wherein, the acquisition module It is connected with the bill statistical module;
The acquisition module, the resource allocation information for obtaining user;
The bill statistical module, for according to the resource allocation information, operation resource using information, carrying out bill management.
8. device according to claim 7, it is characterised in that also including setup module;Wherein, the setup module and institute Acquisition module is stated to be connected;
The setup module, for defining data model, resource allocation information is preserved using xml document:It is additionally operable to create The resource allocation information of account.xml file record users;It is additionally operable to create accountGrp.xml file record user's groups Resource allocation information.
9. device according to claim 7, it is characterised in that in the xml document each<account>The list of elements Show the resource distribution of a user or user's group,<price>Element representation user uses the unit price of resource,<account>Element Comprising one or more<price>Element.
10. device according to claim 7, it is characterised in that the acquisition module, being additionally operable to please according to the inquiry of acquisition Ask, obtain correspondence the period in user or user's group charge book and travel through each charge book;
The bill statistical module, is additionally operable to according to operation resource using information, user or user's group in resource allocation information Corresponding resource allocation information, carry out bill statistics.
CN201710466536.6A 2017-06-19 2017-06-19 A kind of bill management method and device Pending CN107273279A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710466536.6A CN107273279A (en) 2017-06-19 2017-06-19 A kind of bill management method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710466536.6A CN107273279A (en) 2017-06-19 2017-06-19 A kind of bill management method and device

Publications (1)

Publication Number Publication Date
CN107273279A true CN107273279A (en) 2017-10-20

Family

ID=60068003

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710466536.6A Pending CN107273279A (en) 2017-06-19 2017-06-19 A kind of bill management method and device

Country Status (1)

Country Link
CN (1) CN107273279A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109063074A (en) * 2018-07-24 2018-12-21 浪潮(北京)电子信息产业有限公司 Data processing method, device, equipment and medium based on Hadoop
CN109491787A (en) * 2018-11-01 2019-03-19 郑州云海信息技术有限公司 The book keeping operation statistical method and system of computing resource under a kind of cluster computing environment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110137826A1 (en) * 2009-12-07 2011-06-09 Control4 Corporation Synchronizing a cost estimate on an electronic device
CN104574051A (en) * 2015-01-12 2015-04-29 浪潮(北京)电子信息产业有限公司 Charging method and device
CN105245351A (en) * 2015-08-28 2016-01-13 浪潮集团有限公司 Charging method and device
CN106294708A (en) * 2016-08-08 2017-01-04 浪潮(北京)电子信息产业有限公司 A kind of cluster accounting management method and system based on Torque

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110137826A1 (en) * 2009-12-07 2011-06-09 Control4 Corporation Synchronizing a cost estimate on an electronic device
CN104574051A (en) * 2015-01-12 2015-04-29 浪潮(北京)电子信息产业有限公司 Charging method and device
CN105245351A (en) * 2015-08-28 2016-01-13 浪潮集团有限公司 Charging method and device
CN106294708A (en) * 2016-08-08 2017-01-04 浪潮(北京)电子信息产业有限公司 A kind of cluster accounting management method and system based on Torque

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109063074A (en) * 2018-07-24 2018-12-21 浪潮(北京)电子信息产业有限公司 Data processing method, device, equipment and medium based on Hadoop
CN109491787A (en) * 2018-11-01 2019-03-19 郑州云海信息技术有限公司 The book keeping operation statistical method and system of computing resource under a kind of cluster computing environment

Similar Documents

Publication Publication Date Title
US11017368B2 (en) Systems and methods for automatically collection of performance data in a multi-tenant database system environment
CN105930446B (en) A kind of telecom client label generating method based on Hadoop distributed computing technology
CN110008257A (en) Data processing method, device, system, computer equipment and storage medium
CN107066499A (en) The data query method of multi-source data management and visualization system is stored towards isomery
CN109492021A (en) Enterprise&#39;s portrait information query method, device, computer equipment and storage medium
CN111915366B (en) User portrait construction method, device, computer equipment and storage medium
CN104572688A (en) Information push method and device
CN107506383B (en) Audit data processing method and computer equipment
CN109299157A (en) A kind of data export method and device of distributed big single table
CN107391506A (en) Method and apparatus for inquiring about data
CN104298788A (en) Paging querying method and system
CN109271561A (en) A kind of profile information search method and device
CN109800269A (en) Data managing method, device, computer equipment and storage medium
CN110737706A (en) Data management method, device, equipment and computer readable storage medium
CN106649869A (en) Statistical method and statistical device for big data in database
CN109767098A (en) Processing method, device, computer equipment and the storage medium of product attribute
CN107273279A (en) A kind of bill management method and device
CN108304591A (en) A kind of method for customizing of label, system and terminal device
CN103297419B (en) Line rolls off the production line upper data fusion method and system
CN109544207A (en) A kind of information processing method, storage medium and server
CN105550351A (en) Passenger travel data ad-hoc query system and method
CN108846002B (en) Label real-time updating method and system
CN116468011A (en) Report generation method, device, equipment and storage medium
CN107105440A (en) A kind of information processing method, device and business operation support system
CN109858969A (en) A kind of favourable price based on business configuration determines method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20171020