Summary of the invention
In view of this, the purpose of the embodiment of the invention is to provide a kind of service based Componentized service control method and system, fundamentally solves database overload even Deadlock.
For achieving the above object, the embodiment of the invention provides following technical scheme:
A kind of service based Componentized application software is carried out the method for Service control, comprising:
Obtain a data buffer according to the service connection request that channel sends, carry the business function sign in the described service connection request, described business comprises kernel business of bank; Wherein, channel refers to the external system that is associated at business function with application software, is used for initiating the business function request to application software;
Obtain professional corresponding sequence of movement table according to described business function sign;
Obtain the first business datum according to described sequence of movement table from channel, and from database, obtain the second business datum;
Deposit described the first business datum and described the second business datum in described data buffer;
Utilize first business datum and the second business datum execution related service function of described data buffer storage at described professional each corresponding Service Component after, according to described sequence of movement table the first business datum and the second business datum that content in the described data buffer changes fed back to channel, and write into Databasce.
Alternatively, said method also comprises:
Discharge described data buffer, for other professional uses.
Described data buffer comprises sub-buffer zone, cushioning element array and data element chained list, wherein,
Record traffic Function Identification in the described sub-buffer zone, the cushioning element number that takies with and the position of cushioning element in described cushioning element array of using;
What described cushioning element array recorded is the indication information of each data element chain table access address;
Described data element chain table record be described the first business datum and the second business datum.
Described professional each corresponding Service Component utilizes the first business datum of described data buffer storage and the second business datum execution related service to comprise:
Each Service Component of described professional correspondence reads and/or write operation the first business datum and second business datum of storing in the described data buffer by the interface of described data buffer.
Obtaining the second business datum according to described sequence of movement table from database is specially:
According to disposable second business datum of from database, obtaining of described sequence of movement table.
The second business datum write into Databasce according to described sequence of movement table will change is specially:
The second business datum one-time write database that will change according to described sequence of movement table.
A kind of service based Componentized application software is carried out the system of Service control, comprising:
The first acquiring unit is used for obtaining a data buffer according to the service connection request that channel sends, and carries the business function sign in the described service connection request, and described business comprises kernel business of bank;
Second acquisition unit is used for obtaining professional corresponding sequence of movement table according to described business function sign;
The 3rd acquiring unit is used for obtaining the first business datum according to described sequence of movement table from channel, and obtains the second business datum from database;
The first writing unit is used for depositing described the first business datum and described the second business datum in described data buffer;
The second writing unit, utilize first business datum and the second business datum execution related service of described data buffer storage at described professional each corresponding Service Component after, the first business datum and the second business datum that change are fed back to channel, and write into Databasce.
Alternatively, said system also comprises:
Releasing unit is used for discharging the described data buffer that described the first acquiring unit obtains, for other professional uses.
Described data buffer comprises sub-buffer zone, cushioning element array and data element chained list, wherein,
Record traffic Function Identification in the described sub-buffer zone, the cushioning element number that takies with and the position of cushioning element in described cushioning element array occupied;
What described cushioning element array recorded is the indication information of each data element chain table access address;
Described the first business datum of described data element chain table record and the second business datum.
As seen, in embodiments of the present invention, obtain the action sequence table according to the business function sign, to carry out the required business datum of this business according to described action sequence table all deposits in the data buffer that obtains, the Service Component of this business correspondence data in carrying out when professional directly to this data buffer operate, simultaneously, after business is finished, the business datum that has changed is write to database or feeds back to channel, fundamentally avoid the direct access of each Service Component to database, thereby fundamentally solved database overload even Deadlock.
Embodiment
The embodiment of the invention discloses service based Componentized application software and carry out the method and system of Service control, for making purpose of the present invention, technical scheme and advantage clearer, referring to the accompanying drawing embodiment that develops simultaneously, the present invention is described in further detail.
Fig. 1 is the method that one embodiment of the invention provides, and comprising:
S101 obtains a data buffer according to the service connection request that channel sends, and carries the business function sign in the described service connection request.
Wherein, channel refers to the external system that is associated at business function with current application software, is used for initiating service connection request to application software.Take the kernel business of bank system as example, the channel of initiating the individual deposit business function can be the operating personnel of cabinet face before the bank, also can be the bank ATM cash dispenser, can also be bank system of web.
The structure of data buffer can be referring to Fig. 2.The data buffer comprises sub-buffer zone, cushioning element array and data element chained list.Wherein, sub-buffer zone comprises sub-buffer zone title, the position indication in the cushioning element array of the cushioning element number that this sub-buffer zone comprises and each cushioning element.What the cushioning element array recorded is the indication information of each data element chain table access address; The data element chain table record be the first business datum and the second business datum.
General sub-buffer zone title is identical with the business function sign of this sub-buffer stores, is used for indicating the business function that this sub-buffer zone records.The effect of business function sign namely is used for distinguishing different business functions, can be business function numbering or business function title.Use the different business function of business function number-mark among Fig. 2.
With the business of withdrawing the money of the personal account in the financial industry, be numbered 1131 and for example data buffer zone various piece be illustrated among Fig. 2.The name of sub-buffer zone 1 is called 1131, and what this sub-buffer records then was described is that business function is numbered 1131 business function.The cushioning element number is 2, this business function corresponding two cushioning elements in the cushioning element array of this buffer zone are described, 1 and 10 illustrates that first reference address in aforementioned two cushioning elements is pointed by the 1st that is positioned at the cushioning element array, and another reference address is pointed by the 10th that is positioned at the cushioning element array.
S102 obtains sequence of movement table corresponding to business function according to described business function sign.
Different business function sign is corresponding different business function, each business function have a with it corresponding sequence of movement table.This sequence of movement table is pre-stored in local system, can be identified at by business function and search acquisition in the local system.
Comprise a business function in the sequence of movement table in the performed action step time of running, and routine interface corresponding to each step.So can obtain according to described sequence of movement table and to finish the needed external data of current business function and internal data.
Be numbered 1131 personal account take business function and withdraw the money business as example, the action step of appointment comprises in sequence of movement table corresponding to this business function: call 1131 read data bags, call 1131 read data storehouses, call 1131 business procedure, call 1131 data packets, call 1131 and write database.
S103 obtains the first business datum according to described sequence of movement table from channel, and obtains the second business datum from database.
Wherein, identify the relevant data of the realization with the current business function that from channel and database, obtain with the first business datum and the second business datum respectively.
Still be numbered 1131 personal account take business function and withdraw the money business as example, at this moment, obtain the first business datum by " calling 1131 read data bags " step in the execution action sequence list from channel, comprise the information such as account, password, the amount of money; From local data base, obtain the second business datum by " calling 1131 read data storehouses " step in the execution action sequence list, comprise the information such as account, name in an account book, account balance, Currency Type, password.In the sequence of movement table, different steps corresponding to business function sign relate to different business datums.
S104 deposits described the first business datum and described the second business datum in described data buffer.
S105, each Service Component that described business function is corresponding utilize the first business datum of described data buffer storage and the second business datum to carry out the related service function.
S106 feeds back to channel according to described sequence of movement table with the first business datum and the second business datum that content in the described buffer zone changes, and write into Databasce.
After the Service Component that this business function is relevant utilizes the first business datum in the data buffer area and the second business datum to execute associative operation, may change described the first business datum or the second business datum, so the first business datum and second business datum that content in the described buffer zone need to be changed feed back to channel, and write into Databasce, the like this synchronism of guarantee channel data's consistency and database data.
Still be numbered 1131 personal account take business function and withdraw the money business as example, suppose that this business function is for to withdraw the money 1000 yuan from personal account, the account balance of the account can change, " calling 1131 data packets " step in the execution action sequence list feeds back to channel with the account balance information after changing at this moment; " call 1131 and write database " step in the execution action sequence list, according to account with the account balance information write into Databasce.
Alternatively, be disabled for fear of buffer area and take, improve the utilization factor of buffer area, the method that the embodiment of the invention provides also comprises:
S107 discharges described data buffer, uses for other business functions.
The method that the embodiment of the invention provides, obtain the action sequence table according to the business function sign, to carry out the required business datum of this business function according to described action sequence table all deposits in the data buffer that obtains, Service Component corresponding to this business function when carrying out business function directly to this data buffer in data operate, simultaneously, after business function is finished, the business datum that has changed is write to database or feeds back to channel, fundamentally avoid the direct access of each Service Component to database, thereby fundamentally solved database overload even Deadlock.
In addition, the method that the embodiment of the invention provides, before carrying out, business function all deposits required business datum in data buffer, the business datum write into Databasce that after business function is carried out, will change or return to channel, each Service Component that business function is relevant directly operates described data buffer, avoid between each Service Component and the database frequently reciprocal process, thereby further improved the efficient of business processing.
More clear for the method that the embodiment of the invention is provided, the below's personal account in the financial industry is withdrawn the money business (business function is numbered 1131) as example, and the method that the invention process is provided describes.
Fig. 3 is the synoptic diagram of the applied scene of the embodiment of the invention, wherein, the executive agent of the method that operational support system 301 provides for the embodiment of the invention, business function program 302 is the business function entity of current application software, wherein comprises a plurality of Service Component.Database 303 is internal data store management systems of current application software application.304 of channels are the external systems that current application software is associated at business function, and in the personal account that the embodiment of the invention provides was withdrawn the money business, this channel can be the ATM ATM (automatic teller machine).
Alternatively, for concrete business function is realized being separated with interface, channel, database and business function program can provide respectively access interface, respectively channel interface 304-I/O, database interface 303-I/O and business function routine interface 302-I/O, these three interfaces are at application programming interface (API conceptive and that field of software engineering is general, Application Programming Interface) be consistent, under this tactic pattern, operational support system is by realizing access and control to entity with the interface communication of these entities.
Referring to Fig. 4, in scene shown in Figure 3, the method that the embodiment of the invention provides comprises:
S401, the personal account that operational support system sends according to the channel service connection request of withdrawing the money is obtained a data buffer, carries business function numbering 1131 in the described service connection request.
Operational support system is in the monitoring connection status always, and when channel was initiated a business function, back-up system was initiated service connection request during to operation by the channel interface, and the back-up system response connects during operation, starts working.Specifically comprise according to this service connection request and obtain a blank, available data buffer.
S402, operational support system obtains sequence of movement table corresponding to business function according to described business function numbering 1131.
In this operational support system calling system level initialize routine, finish some basic system initialization functions after, search according to this business function sign, find the sequence of movement table of its correspondence.
S403, " calling 1131 read data bags " step in the operational support system execution action sequence list obtains the first business datum from channel, and " calling 1131 read data storehouses " step in the execution action sequence list obtains the second business datum from local data base.
Particularly, operational support system obtains needed the first business datum of current business function according to this sequence of movement table from channel (such as the ATM cash dispenser), comprises the information such as account, password, the amount of money; Disposable needed relevant the second business datum of current business function of obtaining comprises the information such as account balance, Currency Type, password from the database that the current business back-up system connects.
S404, operational support system deposits described the first business datum and described the second business datum in described data buffer.
The concrete structure of data buffer is referring to Fig. 2, and as can be seen from Figure 2, the first business datum comprises: account: 1234; The amount of money of withdrawing the money: 1000.00 and password.The second business datum then comprises: remaining sum: 16050.00; Currency Type: Renminbi and name in an account book: Zhang Chunli.
Need to prove that in the practical application, business function may be corresponding to a plurality of sub-buffer zones, but no matter the number of the sub-buffer zone that comprises of business function is what, the structure of every individual sub-buffer zone all is identical.
S405, the operational support system scheduled for executing personal account business procedure of withdrawing the money, each Service Component of this business procedure utilize the first business datum of described data buffer storage and the second business datum to carry out the related service function.
S406, " calling 1131 data packets " step in the operational support system execution action sequence list feeds back to channel with account balance; And by " call 1131 and the write database " step in the execution action sequence list, according to account with the account balance information write into Databasce.
After executing the related service function, account balance has become 15050.00, the second business datums by 16050.00 and has changed, and needs this business datum write into Databasce.Because variation has occured in the second business datum, keep synchronously in order to make these data, the second business datum that also needs to change feeds back to channel (ATM ATM (automatic teller machine)), for operating personnel or user's reading.
In the practical application, operational support system is determined the business datum that changes to feed back to channel and/or write into Databasce according to the execution result of concrete business function.
S407, operational support system discharge the data buffer that the personal account business of withdrawing the money is used.
The buffer zone of system is limited, in order to improve the utilization factor of buffer zone, needs to discharge the data buffer that this business function uses after a business function is finished, so that other business function application is used.
The method that the embodiment of the invention provides, obtain the action sequence table according to the business function sign, to carry out the required business datum of this business function according to described action sequence table all deposits in the data buffer that obtains, Service Component corresponding to this business function when carrying out business function directly to this data buffer in data operate, simultaneously, after business function is finished, the business datum that has changed is write to database or feeds back to channel, fundamentally avoid the direct access of each Service Component to database, thereby fundamentally solved database overload even Deadlock.
Referring to Fig. 5, the embodiment of the invention also provides a kind of service based Componentized application software to carry out the system of Service control, comprising:
The first acquiring unit 501 is used for obtaining a data buffer according to the service connection request that channel sends, and carries the business function sign in the described service connection request;
Described data buffer comprises sub-buffer zone, cushioning element array and data element chained list, wherein,
Record traffic Function Identification in the described sub-buffer zone, the cushioning element number that takies with and the position of cushioning element in described cushioning element array occupied;
What described cushioning element array recorded is the indication information of each data element chain table access address;
Described data element chain table record be described the first business datum and the second business datum.
Second acquisition unit 502 is used for obtaining sequence of movement table corresponding to business function according to described business function sign;
The 3rd acquiring unit 503 is used for obtaining the first business datum according to described sequence of movement table from channel, and obtains the second business datum from database;
The first writing unit 504 is used for depositing described the first business datum and described the second business datum in described data buffer;
The second writing unit 505, utilize first business datum and the second business datum execution related service function of described data buffer storage at each Service Component corresponding to described business function after, the first business datum and the second business datum that change are fed back to channel, and write into Databasce.
Alternatively, in order to improve the utilization factor of buffer zone, the system that the embodiment of the invention provides also comprises:
Releasing unit is used for discharging the described data buffer that described the first acquiring unit obtains, and uses for other business functions.
In the practical application, described service control system can be the operational support system in the scene shown in Figure 3, and this service control system can be described referring to method corresponding to Fig. 4 alternately with the peripheral equipment entity.
The system that the embodiment of the invention provides, obtain the action sequence table according to the business function sign, to carry out the required business datum of this business function according to described action sequence table all deposits in the data buffer that obtains, Service Component corresponding to this business function when carrying out business function directly to this data buffer in data operate, simultaneously, after business function is finished, the business datum that has changed is write to database or feeds back to channel, fundamentally avoid the direct access of each Service Component to database, thereby fundamentally solved database overload even Deadlock.
In addition, the method that the embodiment of the invention provides, before carrying out, business function all deposits required business datum in data buffer, the business datum write into Databasce that after business function is carried out, will change or return to channel, each Service Component that business function is relevant directly operates described data buffer, avoid between each Service Component and the database frequently reciprocal process, thereby further improved the efficient that business function is processed.
The present invention can describe in the general context of the computer executable instructions of being carried out by computing machine, for example program module.Usually, program module comprises the routine carrying out particular task or realize particular abstract data type, program, object, assembly, data structure etc.Also can in distributed computing environment, put into practice the present invention, in these distributed computing environment, be executed the task by the teleprocessing equipment that is connected by communication network.In distributed computing environment, program module can be arranged in the local and remote computer-readable storage medium that comprises memory device.
The above only is preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.