Method and apparatus to managing user account resource
Technical field
The present invention relates to communication field, relate in particular to a kind of method and apparatus managing user account resource.
Background technology
Along with the development of intelligent network and improving constantly of intelligent network user demand, intelligent network business progressively tends to diversification, complicated.IN service is from original single providing outside the call function, progressively increased the transmission note, GPRS (GPRS) online waits other function.In intelligent network, except business function constantly increases, in order to pursue differentiated service, the professional form of expression also emerges in an endless stream, for example for card class business, amount of money card, duration card, money charging card, note rechargeable card, term of validity rechargeable card etc. are arranged, and might comprise local call part and toll message part for the duration and the amount of money.No matter being the duration of call, the conversation amount of money or note bar number etc., in fact all is account resource a kind of of intelligent network user.The difference of the service of opening according to user applies, a user account may comprise one or more resources.
In the actual operation of intelligent network, along with the development of business, through regular meeting new business function appears, so, need in intelligent network, increase new resource type.
A kind of method that the resource of the user account in the intelligent network is customized is in the prior art: resource type as one of attribute of user account information data, is represented a kind of resource type with the fixed field of account formation data.When the resource of user account is handled, for example deduct or increase a kind of quantitative value of resource, the value in the territory by changing respective resources type correspondence reaches the purpose that changes the number of resources value.
The schematic diagram that above-mentioned fixed field with account information is represented resource type in Fig. 1, is fixedly represented account's remaining sum with N territory, with M domain representation account's residue short message bar number as shown in Figure 1.
The shortcoming of said method is:
1, is difficult to the extended resources type.If in the process that business is carried out, need to increase new resource type, then must redesign account data storage format, and new resource type is represented in the territory that need increase necessity in the account.To cause service needed to be developed again like this;
2, because the extended resources type must be developed business again, must cause cost of investment to increase, new business is released problems such as time lag.
The another kind of method that the resource of the user account in the intelligent network is customized is in the prior art: also be with resource type as one of attribute of user account information data, represent a kind of resource type with the fixed field of account formation data.But, in account formation data, reserved the part territory for later extended resources type.Increase new resource type if carry out process need in business, the territory that then can select to reserve in the above-mentioned account formation data is represented.Above-mentioned in account formation data the reserved part territory schematic diagram as shown in Figure 2.
The shortcoming of said method is:
Though 1 this method can the extended resources type, extendible resource type is subject to the number in the territory of reservation.In case the resource type number of expansion has surpassed the number in the territory of reserving, the extended resources type just will the problem of the method for above-mentioned first kind of prior art occur being similar to again;
2, the territory of Yu Liuing is before the utilization of resources that is not expanded, serious waste memory space.
Summary of the invention
In view of above-mentioned existing in prior technology problem, the purpose of this invention is to provide a kind of method and apparatus to managing user account resource, thereby can realize customizing neatly resource type, not need to change operation flow and database design, reduce the exploitation operation cost.
The objective of the invention is to be achieved through the following technical solutions:
A kind of device to managing user account resource comprises: essential information maintenance module, resource information maintenance module and resource type maintenance module, wherein,
The essential information maintenance module: the identification information that is used to manage with user account is the essential information data of the user account of index, and identification information and resource information maintenance module by described user account are associated;
Resource information maintenance module: be used to manage identification information, the identification information of resource type is the resource information data of the user account of index with user account, identification information and essential information maintenance module by described user account are associated, and identification information and resource type maintenance module by described resource type are associated;
The resource type maintenance module: being used to manage with the identification information of resource type is the resource type list information of index, and identification information and resource information maintenance module by described resource type are associated.
The resource type list information of managing in resource information data of managing in the described resource information maintenance module and the resource type maintenance module is stored by vertical table mode.
The essential information data of managing in the described essential information maintenance module comprise: the account number of user account, place batch, sequence number, password and Account Status, the account number of described user account is represented a kind of user account uniquely.
The resource information data of managing in the described resource information maintenance module comprise: the ID of the account number of user account, the employed resource type of user account and the quantitative value of this type resource.
The resource type list information of managing in the described resource type maintenance module comprises ID, title, unit and the descriptor of each resource type, and the ID of described resource type represents a kind of resource type uniquely.
A kind of method to managing user account resource comprises step:
A, be essential information, resource information and resource type information with the information decomposition in the user account, each several part information separate, stored;
B, the essential information by described separate, stored, resource information and resource type information manage the resource of user account.
Described steps A specifically comprises:
The account number, place of storage user account batch, sequence number, password and Account Status in the described essential information, the account number of described user account is represented a kind of user account uniquely.
Described steps A specifically comprises:
Account number, the sign ID of the employed resource type of user account and the quantitative value of this type resource of storage user account in the described resource information, every kind of resource of each user account number is a record in the described resource information.
Described steps A specifically comprises:
ID, title, unit and the descriptor of each resource type of storage in the described resource type information, the ID of resource type represents a kind of resource type uniquely, each resource type is a record in the described resource type information.
Described steps A specifically comprises:
Described essential information and described resource information are associated by the account number of user account, described resource information and described resource type information are associated by the ID of resource type, and described essential information, described resource information and described resource type information are formed the user account system.
Described step B specifically comprises:
When needs increase a kind of resource type in user account, in described resource type information, increase the ID of this kind of unique identification resource type, and increase the descriptor of this resource type according to user definition for this resource type.
Described step B specifically comprises:
When needs were deleted a kind of resource type in user account, the resource information data of the ID of the resource type that in described resource information all references need be deleted were all deleted.
Described step B also comprises:
The ID of the described resource type that need delete of deletion and the descriptor of this resource type in described resource type information.
Described step B specifically comprises:
B1, external entity send the query requests of carrying user account information to described user account system, after the user account system receives this query requests, in described resource information, inquire corresponding resource information data, comprise the ID of resource type of user account and the resource quantity information of this ID correspondence in these resource information data according to described user account;
B2, described user account system return to external entity by the described resource information data that external interface will inquire, and external entity is analyzed the resource information data that the system of accounts is returned, and obtain the resource information that user account had.
Described step B specifically comprises:
B3, external entity transmit operation request give described user account system, the ID and the operation amount information of the resource type that carry action type, number of the account in this operation requests, will operate;
After B4, described user account system receive described operation requests, in described resource information,, the corresponding resource quantity of ID of relative users account's respective resources type is increased or reduces operation according to the described operation information that carries in this operation requests.
As seen from the above technical solution provided by the invention, the present invention is by being separated definition of user account resource type and account resource use, thereby can realize customized user account resource type neatly, make account resource type unlimited extension easily; New business can be provided fast, not need to change operation flow and database design; Can not waste memory space, reduce the exploitation operation cost; Solved present account resource and be difficult to expansion, perhaps problem that can only limited expansion under with the cost of waste memory space.
Description of drawings
Fig. 1 represents the schematic diagram of resource type with the fixed field of account information;
Fig. 2 is the schematic diagram in reserved part territory in account formation data;
Fig. 3 is the storage mode schematic diagram of account formation data on storage medium in the structure of embodiment of device of the present invention and this device;
Fig. 4 is the process chart of the embodiment of the method to managing user account resource of the present invention;
Fig. 5 is the principle schematic of external entity inquiring user account's resource information;
Fig. 6 is the principle schematic of the resource information data of external entity operation user account;
Fig. 7 is that the external entity and the system of accounts are carried out the mutual schematic diagram of message in the process of resource information of externally entity inquiry, operation user account.
Embodiment
The invention provides a kind of method and apparatus to managing user account resource, core of the present invention is: definition of user account resource type and account resource use are separated, account resource is stored by vertical table mode, and resource type ID represents a kind of resource uniquely.
Describe the present invention in detail below in conjunction with accompanying drawing, the device to managing user account resource of the present invention comprises three modules: essential information maintenance module, resource information maintenance module and resource type maintenance module.The storage mode of account formation data on storage medium as shown in Figure 3 in the structure of the embodiment of device of the present invention and this device.
The essential information maintenance module: main maintenance is the essential information data of the user account of index with the identification information of user account.Such as the account number of user account, place batch, sequence number, password, Account Status etc.These information datas are relatively stable, generally change less.This number of the account refer to can unique expression user account number.Account number and resource information maintenance module by described user account are associated.
Resource information maintenance module: mainly safeguard to be the resource information data of the user account of index with the identification information of user account, the identification information of resource type.These resource information data comprise at least: the ID of the account number of user account, the employed resource type of user account and the quantitative value of this type resource.Identification information and essential information maintenance module by described user account are associated, and identification information and resource type maintenance module by described resource type are associated.Account according to the user account in this module can be inquired about in the essential information maintenance module, obtains the essential information data of user account.
The resource type maintenance module: main maintenance is the resource type list information of index with the identification information of resource type.Information such as ID number of each resource type, title, unit and descriptor have been described, the ID of resource type number and the unique correspondence of resource type in the resource type tabulation.It is mutual to be used for internal system, and by described resource type ID number and resource information maintenance module are associated, and can inquire about in the resource information maintenance module according to ID number of the resource type in this module, obtains the resource information data of this resource type.Descriptor in the resource type tabulation is used for user interface and shows.
The handling process of the embodiment of the method to managing user account resource of the present invention comprises the steps: as shown in Figure 4
Step 4-1: resource type information, resource information and the essential information of in system, setting up mutual independent user account respectively.It is essential information, resource information and resource type information that the present invention at first needs the information decomposition in the user account, each several part information separate, stored.In actual applications, system can manage separately by different modules above-mentioned resource type information, resource information and essential information respectively as required.
The account number, place of storage user account batch, sequence number, password and Account Status in the described essential information, the account number of described user account is represented a kind of user account uniquely.
Account number, the sign ID of the employed resource type of user account and the quantitative value of this type resource of storage user account in the described resource information, every kind of resource of each user account number is a record in the described resource information.
ID, title, unit and the descriptor of each resource type of storage in the described resource type information, the ID of resource type represents a kind of resource type uniquely, each resource type is a record in the described resource type information.
Described essential information and described resource information are associated by the account number of user account, described resource information and described resource type information are associated by the ID of resource type, and described essential information, described resource information and described resource type information are formed the user account system.Above-mentioned resource information and resource type information are stored by vertical table mode in corresponding module.
Step 4-2: according to resource type information, resource information and the essential information set up, to the resource of user account increase, operations such as deletion, inquiry.
After having set up mutual independent user account's resource type information, resource information and essential information, just can be according to resource type information, resource information and the essential information set up, user account carried out resource type increases, deletion action, the resource data of user account is supplemented with money, deducted fees and operation such as inquiry.
Such as, the process that increases a kind of resource type in user account is: at first, distribute ID number of this kind of unique identification resource type for the resource type that needs to increase in above-mentioned resource type information.And, increase other relevant information such as unit, description of this resource type according to user definition.
Carried out behind the aforesaid operations in above-mentioned resource type information, the resource information of described separate, stored just can be quoted in the account resource information data and use this resource type ID, carries out the bookkeeping of corresponding resource quantity.
Such as, the process of a kind of resource type of deletion is in user account: the ID of the resource type of deleting as required in above-mentioned resource information, in the account resource information data, all delete the data of this resource ID of all references.Simultaneously, in described resource type information in the deletion resource type tabulation about the definition information such as ID, unit and descriptor of this type resource.In the reality operation, can not delete the resource type definition of preserving in the resource type information generally speaking.
Such as, the principle of external entity inquiring user account's resource information as shown in Figure 5, concrete processing procedure is: external entity sends and carries the query requests of user account to the system of accounts, after the system of accounts receives this query requests, in described resource information, inquire account's resource information data, comprise all resource type ID of account and its corresponding resource quantity information in these resource information data according to described user account.External entity also can only be inquired about a kind of resource type ID corresponding resource information.
The system of accounts returns to external entity by the above-mentioned resource information data that external interface will inquire.External entity is analyzed resource type ID and the resource information data that the system of accounts is returned, and parses the corresponding relation of resource type ID and real resource title, draws the resource information that the account has, and finishes account resource information inquiry operation.
Such as, the principle of the resource information data of external entity operation user account as shown in Figure 6, concrete processing procedure is: the system of accounts is given in external entity transmit operation request, needs to carry operation informations such as action type, number of the account, the resource type ID that will operate and quantity in the aforesaid operations request.Wherein action type comprises and supplements with money, deducts fees etc., and action type, resource type ID and quantity can be multipacket message, promptly can operate one or more resource data of user account.
After the system of accounts received described operation requests, the corresponding resource data of one or more resource type ID to respective account in described resource information increased, reduces operation.Finish operation to account's resource information data.
In the process of the resource information of said external entity inquiry, operation user account, the mutual schematic diagram that the external entity and the system of accounts are carried out message as shown in Figure 7.
Such as, Zhang San has an account, and account number is 12345, and wherein remaining sum is 50 yuan, and free text message bar number is 300.The resource ID of remaining sum is defined as 1000 in the system of accounts, and the resource ID of free text message is defined as 2000.
After the system of accounts receives the query requests of Zhang San by the inquiry system transmission, the inquiry account number is 12345 account information in the resource information in the system of accounts, inquiring resource type ID and be 1000 resource quantity is 50, resource type is that 2000 resource quantity is 300, then, the system of accounts sends to inquiry system with Query Result.Inquiry system parses the resource type ID in the Query Result and the corresponding relation of real resource title, afterwards, Query Result is reported to Zhang San.
After Zhang San had sent a free text message, the system of accounts was given in charging center transmit operation request, carried action type in the operation requests and was " minimizing ", and account number is 12345, and resource type ID is 2000, and resource quantity is 1.According to operation information, be that the quantity of 2000 resource reduces 1 with the resource type ID of account number 12345 in the resource information in the system of accounts, finish the operation of deducting fees.
The above; only for the preferable embodiment of the present invention, but protection scope of the present invention is not limited thereto, and anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; the variation that can expect easily or replacement all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of claim.