WO2011012003A1 - Method and system for controlling service based on service componentized application software - Google Patents
Method and system for controlling service based on service componentized application software Download PDFInfo
- Publication number
- WO2011012003A1 WO2011012003A1 PCT/CN2010/072553 CN2010072553W WO2011012003A1 WO 2011012003 A1 WO2011012003 A1 WO 2011012003A1 CN 2010072553 W CN2010072553 W CN 2010072553W WO 2011012003 A1 WO2011012003 A1 WO 2011012003A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- service
- data
- buffer
- database
- service data
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2308—Concurrency control
Definitions
- the present invention relates to the field of software engineering, and more particularly to a method and system for service control based on application software of business componentization.
- the basic implementation process of the method is to determine a business process topology corresponding to the function according to the function to be implemented by the application software, and determine a service component and each service component required by the current business process according to the service process topology. After the service components required by the current business process are acquired, the service components are assembled according to the connection relationship to form an application software corresponding to the to-be-implemented function.
- the business components have business meanings, which can directly express business concepts and meet the business needs of the application software.
- the business components constituting the application software are independent in function and have no direct business connection.
- the static business logic relationship between the business components of the application software is determined by the business process topology.
- the timing relationship between the business components needs to be scheduled by the scheduling capability system.
- the inventors found through research that since the business components constituting the application software are functionally independent, their access to the database is random, and multiple business components frequently access the same database concurrently during the execution of the business, so that Causes multiple business components running in parallel to compete for the same resource, which can easily cause database overload or even deadlock.
- the purpose of the embodiments of the present invention is to provide a service control method and system based on service componentization, which fundamentally solves the problem of database overload and even deadlock.
- the embodiment of the present invention provides the following technical solutions:
- a method for business control based on business componentized application software comprising:
- the channel refers to an external system associated with the application software on the business function, and is used to initiate a service function request to the application software.
- the respective service components corresponding to the service perform the related service functions by using the first service data and the second service data stored in the data buffer
- the content in the data buffer is changed according to the action sequence table.
- the first business data and the second business data are fed back to the channel and written to the database.
- the foregoing method further includes:
- the data buffer is released for other services. use.
- the data buffer includes a sub-buffer, a buffer element array, and a data element linked list, where the sub-buffer records the service function identifier, the number of buffer elements occupied by the service function, and the service. The position of the buffer element occupied by the function in the buffer element array;
- the buffer element array records indication information of an access address of each data element linked list
- the data element linked list records the first service data and the second service data.
- each service component corresponding to the service performs related service functions by using the first service data and the second service data stored in the data buffer, including:
- Each service component corresponding to the service performs a read and/or write operation on the first service data and the second service data stored in the data buffer through an interface of the data buffer.
- obtaining the second service data from the database according to the action sequence table is specifically: acquiring the second service data from the database at one time according to the action sequence table.
- the changed second service data is written into the database according to the action sequence table, which is:
- the changed second service data is written to the database at one time according to the action sequence table.
- a system for business control based on business componentized application software comprising: a first acquiring unit, configured to acquire a data buffer according to the service connection request sent by the channel, where the service connection request carries a service function identifier;
- a second acquiring unit configured to acquire, according to the service function identifier, an action sequence table corresponding to the service; the third acquiring unit, configured to acquire the first service data from the channel according to the action sequence table, and obtain the second service from the database Data
- a first writing unit configured to store the first service data and the second service data into the data buffer
- a second writing unit after the respective service components corresponding to the service perform related services by using the first service data and the second service data stored in the data buffer, the first service data and the second service that are to be changed Data is fed back to the channel and written to the database.
- the above system further includes:
- a releasing unit configured to: after the first service data and the second service data that change content in the data buffer are fed back to the channel according to the action sequence table, and are written into the database, release the first acquiring unit
- the data buffer is obtained for use by other businesses.
- the data buffer includes a sub-buffer, a buffer element array, and a data element linked list, where the sub-buffer records the service function identifier, the number of buffer elements occupied by the service function, and the service. The position of the buffer element occupied by the function in the buffer element array;
- the buffer element array records indication information of an access address of each data element linked list
- the data element linked list records the first service data and the second service data.
- the action sequence table is obtained according to the service function identifier, and the service data required to execute the service is stored in the acquired data buffer according to the action sequence table, and the service component corresponding to the service
- the data in the data buffer is directly operated.
- the changed business data is written into the database or fed back to the channel, thereby fundamentally avoiding the business component to the database. Direct access to solve database overload and even deadlock issues.
- FIG. 1 is a flow chart of a method according to an embodiment of the present invention.
- FIG. 2 is a schematic diagram of a data buffer provided by an embodiment of the present invention.
- FIG. 3 is a schematic diagram of a scenario according to an embodiment of the present invention
- FIG. 4 is a flowchart of a method according to another embodiment of the present invention
- FIG. 5 is a schematic structural diagram of a system according to an embodiment of the present invention.
- FIG. 1 is a schematic diagram of a method according to an embodiment of the present invention, including:
- the channel refers to an external system associated with the current application software on the business function, and is used to initiate a service connection request to the application software.
- the channel for launching the function of the personal deposit business may be the operator who refuses to face the bank front desk, or the bank ATM machine, or the online banking system.
- the structure of the data buffer can be seen in Figure 2.
- the data buffer includes a sub-buffer, a buffer meta-array, and a data element linked list.
- the sub-buffer includes a sub-buffer name, a number of buffer elements included in the sub-buffer, and a position indication of each buffer element in the buffer element array.
- the buffer element array records indication information of the access addresses of the respective data element linked lists; the data element linked list records the first service data and the second service data.
- the general sub-buffer name is the same as the service function identifier stored in the sub-buffer, and is used to indicate the service function recorded in the sub-buffer.
- the function of the service function identifier is used to distinguish different service functions, which can be the service function number or the service function name.
- the business function numbers are used to identify different business functions.
- the personal account withdrawal service in the financial industry is numbered 1131 as an example to illustrate the various parts of the data buffer area.
- the name of sub-buffer 1 is 1131, which indicates that the sub-buffer records the business function with service function number 1131.
- the number of buffer elements is 2, indicating that the service function corresponds to two buffer elements in the buffer element array of the buffer, and 1 and 10 indicate that the first access address of the two buffer elements is located by The first bit of the buffer meta array is pointed to, and the other access address is pointed to by the 10th bit in the buffer meta array.
- S102 Obtain an action sequence table corresponding to the service function according to the service function identifier.
- Different service function identifiers correspond to different business functions, and each business function has a corresponding action sequence table.
- the action sequence table is pre-stored in the local system and can be found in the local system through the service function identifier.
- the action sequence table contains the action steps performed by a business function at runtime and the program interface corresponding to each step. Therefore, according to the action sequence table, external data and internal data required to complete the current service function can be obtained.
- the action steps specified in the action sequence table corresponding to the service function include: calling 1131 to read the data packet, calling 1131 to read the database, calling the 1131 business program, and calling 1131 to write the data packet. , call 1131 to write the database.
- the first service data and the second service data are respectively used to identify data related to the implementation of the current business function obtained from the channel and the database.
- the personal account withdrawal service with service function number 1131 is taken as an example.
- the step obtains the first service data from the channel, including the account number, password, amount, and the like.
- the second service data is obtained from the local database by executing the "call 1131 read database" step in the action sequence table, including account number, account name, account balance, currency, password, etc.
- different business functions The steps corresponding to the identification involve different business data.
- S104 The first service data and the second service data are stored in the data buffer.
- Each service component corresponding to the service function performs related service functions by using the first service data and the second service data stored in the data buffer.
- the first service data and the second service data whose contents in the buffer are changed are fed back to the channel according to the action sequence table, and are written into the database.
- the first service data or the second service data may be changed, so the buffer needs to be
- the first service data and the second service data whose contents change in the area are fed back to the channel and written into the database, so as to ensure the consistency of the channel data and the synchronization of the database data.
- the personal account withdrawal service with service function number 1131 is taken as an example.
- the account balance of the account will change.
- the "call 1131 write data packet" step in the action sequence table is executed, and the changed account balance information is fed back to the channel;
- the "call 1131 write database” step the account balance information is written into the database according to the account number.
- the method provided by the embodiment of the present invention further includes:
- the action sequence table is obtained according to the service function identifier, and the service data required to execute the service function is stored in the acquired data buffer according to the action sequence table, and the service function corresponds to The business component directly operates the data in the data buffer when performing the business function.
- the changed business data is written into the database or fed back to the channel, thereby fundamentally avoiding each The direct access of the business components to the database solves the problem of database overload and even deadlock.
- the method provided by the embodiment of the present invention stores the required service data in the data buffer before the execution of the service function, and writes the changed service data into the database or returns to the channel after the execution of the service function.
- Each service component related to the function directly operates on the data buffer, thereby avoiding frequent interaction processes between various service components and the database, thereby further improving the efficiency of business processing.
- FIG. 3 is a schematic diagram of a scenario applied by an embodiment of the present invention, where the service support system 301 is an execution entity of a method provided by an embodiment of the present invention, and the service function 302 is a service function entity of a current application software, where multiple Business component.
- Database 303 is an internal data storage management system used by current application software.
- the channel 304 is an external system in which the current application software is associated with the service function. In the personal account withdrawal service provided by the embodiment of the present invention, the channel may be an ATM automatic teller machine.
- the channel, the database, and the service function program respectively provide access interfaces, respectively, channel interface 304-I/O, database interface 303-I/O And business function program interface 302-I/O, these three interfaces are conceptually consistent with the application programming interface (API) in the software engineering field.
- API application programming interface
- the business support system passes Interfaces with these entities enable access and control of entities.
- the method provided by the embodiment of the present invention includes:
- the service support system obtains a data buffer according to the personal account withdrawal service connection request sent by the channel, where the service connection request carries the service function number 1131.
- the service support system is always in the listening connection state.
- the channel initiates a service function, it initiates a service connection request to the runtime support system through the channel interface, and the runtime supports the system to respond to the connection and start working.
- the method includes obtaining a blank, available data buffer according to the service connection request.
- the service support system obtains an action sequence table corresponding to the service function according to the service function number 1131.
- the service support system After the service support system calls the system level initialization program and completes some basic system initialization functions, it searches according to the service function identifier and finds its corresponding action sequence table.
- the “call 1131 read data packet” step in the action support system execution action sequence table obtains the first service data from the channel, and executes “call 1131 to read the database in the action sequence table, and the step obtains the second service data from the local database. .
- the service support system acquires, according to the action sequence table, the first service data required by the current service function, such as an account number, a password, and an amount, from a channel (such as an ATM); from the database connected to the current service support system.
- the related second service data required for the current business function including account balance, currency, password, and the like.
- the service support system stores the first service data and the second service data in the data buffer.
- the specific structure of the data buffer is shown in Figure 2.
- the first service data includes: Account number: 1234; Withdrawal amount: 1000.00 and password.
- the second business data includes: Balance: 16050.00; Currency: Renminbi and account name: Zhang Chunli.
- a service function may correspond to multiple sub-buffers, but the structure of each sub-buffer is the same regardless of the number of sub-buffers included in one service function. . S405.
- the service support system schedules and executes a personal account withdrawal service program, where each service component of the service program performs related business functions by using the first service data and the second service data stored in the data buffer.
- the service support system executes the "call 1131 write data packet" step in the action sequence table to feed back the account balance to the channel; and by executing the "call 1131 write database” step in the action sequence table, the account balance information is written according to the account number. database.
- the account balance is changed from 16050.00 to 15050.00.
- the second business data changes, and the business data needs to be written into the database. Since the second service data has changed, in order to keep the data in sync, the changed second service data needs to be fed back to the channel (ATM automatic teller machine) for viewing by the operator or the user.
- ATM automatic teller machine the channel for viewing by the operator or the user.
- the service support system determines the changed service data according to the execution result of the specific service function, and feeds back to the channel and/or writes to the database.
- the business support system releases the data buffer used by the personal account withdrawal service.
- the buffer of the system is limited.
- the data buffer used by the service function needs to be released after the execution of a service function, so that other service functions can be used for application.
- the action sequence table is obtained according to the service function identifier, and the service data required to execute the service function is stored in the acquired data buffer according to the action sequence table, and the service function corresponds to The business component directly operates the data in the data buffer when performing the business function.
- the changed business data is written into the database or fed back to the channel, thereby fundamentally avoiding each The direct access of the business components to the database solves the problem of database overload and even deadlock.
- an embodiment of the present invention further provides a system for performing service control based on service componentized application software, including:
- the first obtaining unit 501 is configured to obtain a data buffer according to the service connection request sent by the channel, where the service connection request carries a service function identifier;
- the data buffer includes a sub-buffer, a buffer element array, and a data element linked list, wherein the sub-buffer records the service function identifier, the number of buffer elements occupied, and the buffer element it occupies in a location in the buffer element array;
- the buffer element array records indication information of an access address of each data element linked list;
- the data element linked list records the first service data and the second service data.
- the second obtaining unit 502 is configured to obtain an action sequence table corresponding to the service function according to the service function identifier;
- a third obtaining unit 503, configured to acquire first service data from a channel according to the action sequence table, and obtain second service data from a database;
- a first writing unit 504 configured to store the first service data and the second service data into the data buffer
- the second writing unit 505 after the respective service components corresponding to the service function perform the related service functions by using the first service data and the second service data stored in the data buffer, the changed first service data and The second business data is fed back to the channel and written to the database.
- the system provided by the embodiment of the present invention further includes: a release unit, configured to release the data buffer acquired by the first acquiring unit, for other service functions. use.
- the service control system may be a service support system in the scenario shown in FIG. 3, and the interaction between the service control system and the peripheral device entity may be described in the method corresponding to FIG. 4.
- the action sequence table is obtained according to the service function identifier, and the service data required to execute the service function is stored in the acquired data buffer according to the action sequence table, and the service function corresponds to The business component directly operates the data in the data buffer when performing the business function.
- the changed business data is written into the database or fed back to the channel, thereby fundamentally avoiding each The direct access of the business components to the database solves the problem of database overload and even deadlock.
- the method provided by the embodiment of the present invention stores the required service data in the data buffer before the execution of the service function, and writes the changed service data into the database or returns to the channel after the execution of the service function.
- Each service component related to the function directly operates on the data buffer, thereby avoiding a frequent interaction process between each service component and the database, thereby further improving the efficiency of business function processing.
- the invention may be described in the general context of computer-executable instructions executed by a computer, such as a program module.
- program modules include routines, programs, objects, components, data structures, and the like that perform particular tasks or implement particular abstract data types. You can also practice this in a distributed computing environment.
- Invention in these distributed computing environments, tasks are performed by remote processing devices that are connected through a communication network.
- program modules can be located in both local and remote computer storage media including storage devices.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
A method and system for controlling a service based on service componentized application software are disclosed. The method comprises: acquiring a data buffer according to a service connecting request transmitted by a channel, wherein the service connecting request carries a service function identification; acquiring an action sequence list corresponding to the service according to the service function identification; acquiring the first service data from the channel according to the action sequence list and acquiring the second service data from a database; storing the first service data and the second service data into the data buffer; after all the service components corresponding to the service execute the relevant services, feeding the first service data and the second service data with changed contents in the data buffer back to the channel, and writing them into the database. With such solutions, they can prevent all the service components in the application software from directly accessing the database, thereby solving the problem of database overloading and even deadlock.
Description
基于业务组件化的应用软件进行业务控制的方法和系统 本申请要求于 2009 年 7 月 28 日提交中国专利局、 申请号为 200910161673.4、 发明名称为"基于业务组件化的应用软件进行业务控制的方 法和系统"的中国专利申请的优先权, 其全部内容通过引用结合在本申请中。 技术领域 Method and system for business control based on business componentized application software This application claims to be submitted to the Chinese Patent Office on July 28, 2009, application number 200910161673.4, and the invention name is "business component-based application software for business control method" The priority of the Chinese Patent Application, the entire disclosure of which is incorporated herein by reference. Technical field
本发明涉及软件工程领域,尤其涉及基于业务组件化的应用软件进行业务 控制的方法和系统。 The present invention relates to the field of software engineering, and more particularly to a method and system for service control based on application software of business componentization.
背景技术 法,这种方法的基本实施过程是根据应用软件待实现功能确定所述功能对应的 业务流程拓朴;根据所述业务流程拓朴确定当前业务流程所需的业务组件及各 个业务组件之间的连接关系; 在获取当前业务流程所需的业务组件后,根据所 述连接关系组装所述业务组件以形成与所述待实现功能对应的应用软件。 这 里, 业务组件具有业务含义, 可以直接表达业务概念, 满足了应用软件的业务 需求。 The basic implementation process of the method is to determine a business process topology corresponding to the function according to the function to be implemented by the application software, and determine a service component and each service component required by the current business process according to the service process topology. After the service components required by the current business process are acquired, the service components are assembled according to the connection relationship to form an application software corresponding to the to-be-implemented function. Here, the business components have business meanings, which can directly express business concepts and meet the business needs of the application software.
基于业务组件化开发方法进行应用软件开发时,构成应用软件的业务组件 之间功能独立, 没有直接的业务联系。应用软件的业务组件之间静态业务逻辑 关系通过业务流程拓朴确定,在应用软件运行时业务组件之间执行时序关系需 要通过具有调度能力的系统来调度。 When the application software is developed based on the business component development method, the business components constituting the application software are independent in function and have no direct business connection. The static business logic relationship between the business components of the application software is determined by the business process topology. When the application software runs, the timing relationship between the business components needs to be scheduled by the scheduling capability system.
发明人通过研究发现,由于构成应用软件的业务组件之间在功能上是独立 的, 所以它们对于数据库的访问是随机的, 多个业务组件在业务执行过程中会 频繁并发访问同一数据库,这样就造成多个并行运行的业务组件竟争访问同一 资源的情况, 极易造成数据库过载甚至死锁。 The inventors found through research that since the business components constituting the application software are functionally independent, their access to the database is random, and multiple business components frequently access the same database concurrently during the execution of the business, so that Causes multiple business components running in parallel to compete for the same resource, which can easily cause database overload or even deadlock.
发明内容 Summary of the invention
有鉴于此,本发明实施例的目的在于提供一种基于业务组件化的业务控制 方法和系统, 从根本上解决数据库过载甚至死锁问题。 In view of this, the purpose of the embodiments of the present invention is to provide a service control method and system based on service componentization, which fundamentally solves the problem of database overload and even deadlock.
为实现上述目的, 本发明实施例提供了如下技术方案: To achieve the above objective, the embodiment of the present invention provides the following technical solutions:
一种基于业务组件化的应用软件进行业务控制的方法, 包括: A method for business control based on business componentized application software, comprising:
根据渠道发送的业务连接请求获取一数据緩冲区,所述业务连接请求中携
带有业务功能标识; 其中, 渠道是指与应用软件在业务功能上相关联的外部系 统, 用于向应用软件发起业务功能请求。 Obtaining a data buffer according to the service connection request sent by the channel, where the service connection request carries With the service function identifier; wherein, the channel refers to an external system associated with the application software on the business function, and is used to initiate a service function request to the application software.
根据所述业务功能标识获取业务对应的动作顺序表; Obtaining an action sequence table corresponding to the service according to the service function identifier;
根据所述动作顺序表从渠道获取第一业务数据,并从数据库中获取第二业 务数据; Obtaining first service data from the channel according to the action sequence table, and acquiring second service data from the database;
将所述第一业务数据和所述第二业务数据存入所述数据緩冲区; Depositing the first service data and the second service data into the data buffer;
在所述业务对应的各个业务组件利用所述数据緩冲区存储的第一业务数 据和第二业务数据执行相关业务功能后,根据所述动作顺序表将所述数据緩冲 区中内容发生变化的第一业务数据和第二业务数据反馈给渠道, 并写入数据 库。 After the respective service components corresponding to the service perform the related service functions by using the first service data and the second service data stored in the data buffer, the content in the data buffer is changed according to the action sequence table. The first business data and the second business data are fed back to the channel and written to the database.
可选地, 上述方法还包括: Optionally, the foregoing method further includes:
在根据所述动作顺序表将所述数据緩冲区中内容发生变化的第一业务数 据和第二业务数据反馈给渠道, 并写入数据库后, 释放所述数据緩冲区, 以供 其他业务使用。 After the first service data and the second service data whose contents in the data buffer are changed are fed back to the channel according to the action sequence table, and written into the database, the data buffer is released for other services. use.
可选地,所述数据緩冲区包括子緩冲区、緩冲元数组和数据元链表,其中, 所述子緩冲区中记录业务功能标识,业务功能占用的緩冲元个数以及业务 功能占用的緩冲元在所述緩冲元数组中的位置; Optionally, the data buffer includes a sub-buffer, a buffer element array, and a data element linked list, where the sub-buffer records the service function identifier, the number of buffer elements occupied by the service function, and the service. The position of the buffer element occupied by the function in the buffer element array;
所述緩冲元数组记录的是各个数据元链表访问地址的指示信息; The buffer element array records indication information of an access address of each data element linked list;
所述数据元链表记录的是所述的第一业务数据和第二业务数据。 The data element linked list records the first service data and the second service data.
可选地,所述业务对应的各个业务组件利用所述数据緩冲区存储的第一业 务数据和第二业务数据执行相关业务功能包括: Optionally, each service component corresponding to the service performs related service functions by using the first service data and the second service data stored in the data buffer, including:
所述业务对应的各个业务组件通过所述数据緩冲区的接口对所述数据緩 冲区中存储的第一业务数据和第二业务数据进行读取和 /或写入操作。 Each service component corresponding to the service performs a read and/or write operation on the first service data and the second service data stored in the data buffer through an interface of the data buffer.
可选地, 根据所述动作顺序表从数据库中获取第二业务数据具体为: 根据所述动作顺序表一次性从数据库中获取第二业务数据。 Optionally, obtaining the second service data from the database according to the action sequence table is specifically: acquiring the second service data from the database at one time according to the action sequence table.
可选地,根据所述动作顺序表将发生变化的第二业务数据写入数据库, 具 体为: Optionally, the changed second service data is written into the database according to the action sequence table, which is:
根据所述动作顺序表将发生变化的第二业务数据一次性写入数据库。 The changed second service data is written to the database at one time according to the action sequence table.
一种基于业务组件化的应用软件进行业务控制的系统, 包括:
第一获取单元, 用于根据渠道发送的业务连接请求获取一数据緩冲区, 所 述业务连接请求中携带有业务功能标识; A system for business control based on business componentized application software, comprising: a first acquiring unit, configured to acquire a data buffer according to the service connection request sent by the channel, where the service connection request carries a service function identifier;
第二获取单元, 用于根据所述业务功能标识获取业务对应的动作顺序表; 第三获取单元, 用于根据所述动作顺序表从渠道获取第一业务数据, 并从 数据库中获取第二业务数据; a second acquiring unit, configured to acquire, according to the service function identifier, an action sequence table corresponding to the service; the third acquiring unit, configured to acquire the first service data from the channel according to the action sequence table, and obtain the second service from the database Data
第一写入单元,用于将所述第一业务数据和所述第二业务数据存入所述数 据緩冲区; a first writing unit, configured to store the first service data and the second service data into the data buffer;
第二写入单元,在所述业务对应的各个业务组件利用所述数据緩冲区存储 的第一业务数据和第二业务数据执行相关业务后 ,将发生变化的第一业务数据 和第二业务数据反馈给渠道, 并写入数据库。 a second writing unit, after the respective service components corresponding to the service perform related services by using the first service data and the second service data stored in the data buffer, the first service data and the second service that are to be changed Data is fed back to the channel and written to the database.
可选地, 上述系统还包括: Optionally, the above system further includes:
释放单元,用于在根据所述动作顺序表将所述数据緩冲区中内容发生变化 的第一业务数据和第二业务数据反馈给渠道, 并写入数据库后,释放所述第一 获取单元获取的所述数据緩冲区, 以供其他业务使用。 a releasing unit, configured to: after the first service data and the second service data that change content in the data buffer are fed back to the channel according to the action sequence table, and are written into the database, release the first acquiring unit The data buffer is obtained for use by other businesses.
可选地,所述数据緩冲区包括子緩冲区、緩冲元数组和数据元链表,其中, 所述子緩冲区中记录业务功能标识,业务功能占用的緩冲元个数以及业务 功能占有的緩冲元在所述緩冲元数组中的位置; Optionally, the data buffer includes a sub-buffer, a buffer element array, and a data element linked list, where the sub-buffer records the service function identifier, the number of buffer elements occupied by the service function, and the service. The position of the buffer element occupied by the function in the buffer element array;
所述緩冲元数组记录的是各个数据元链表访问地址的指示信息; The buffer element array records indication information of an access address of each data element linked list;
所述数据元链表记录所述的第一业务数据和第二业务数据。 The data element linked list records the first service data and the second service data.
可见, 在本发明实施例中, 根据业务功能标识获取动作序列表, 根据所述 动作序列表将执行该业务所需的业务数据都存入获取的数据緩冲区中,该业务 对应的业务组件在执行业务时直接对该数据緩冲区中数据进行操作, 同时,在 业务执行完毕后, 将发生变化了的业务数据写入至数据库或者反馈给渠道,从 根本上避免了各个业务组件对数据库的直接访问,从而解决了数据库过载甚至 死锁问题。 It can be seen that, in the embodiment of the present invention, the action sequence table is obtained according to the service function identifier, and the service data required to execute the service is stored in the acquired data buffer according to the action sequence table, and the service component corresponding to the service When the business is executed, the data in the data buffer is directly operated. At the same time, after the business execution is completed, the changed business data is written into the database or fed back to the channel, thereby fundamentally avoiding the business component to the database. Direct access to solve database overload and even deadlock issues.
附图说明 DRAWINGS
图 1为本发明一实施例所提供的方法的流程图; 1 is a flow chart of a method according to an embodiment of the present invention;
图 2为本发明实施例所提供的数据緩冲区的示意图; 2 is a schematic diagram of a data buffer provided by an embodiment of the present invention;
图 3为本发明一实施例所提供的场景的示意图;
图 4为本发明另一实施例所提供的方法的流程图; FIG. 3 is a schematic diagram of a scenario according to an embodiment of the present invention; FIG. 4 is a flowchart of a method according to another embodiment of the present invention;
图 5为本发明一实施例所提供的系统的结构示意图。 FIG. 5 is a schematic structural diagram of a system according to an embodiment of the present invention.
具体实施方式 detailed description
本发明实施例公开了基于业务组件化的应用软件进行业务控制的方法和 系统, 为使本发明的目的、 技术方案及优点更加清楚明白, 以下参照附图并举 实施例, 对本发明作进一步详细说明。 The embodiments of the present invention disclose a method and a system for performing service control based on service componentized application software. To better clarify the objects, technical solutions, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings. .
图 1为本发明一实施例所提供的方法, 包括: FIG. 1 is a schematic diagram of a method according to an embodiment of the present invention, including:
5101 ,根据渠道发送的业务连接请求获取一数据緩冲区, 所述业务连接请 求中携带有业务功能标识。 5101. Acquire a data buffer according to the service connection request sent by the channel, where the service connection request carries a service function identifier.
其中, 渠道是指与当前应用软件在业务功能上相关联的外部系统, 用于向 应用软件发起业务连接请求。 以银行核心业务系统为例,发起个人存款业务功 能的渠道可以是银行前台拒面的操作人员, 也可以是银行 ATM取款机, 还可 以是网上银行系统。 The channel refers to an external system associated with the current application software on the business function, and is used to initiate a service connection request to the application software. Taking the core business system of the bank as an example, the channel for launching the function of the personal deposit business may be the operator who refuses to face the bank front desk, or the bank ATM machine, or the online banking system.
数据緩冲区的结构可以参见图 2。 数据緩冲区包括子緩冲区、 緩冲元数组 以及数据元链表。 其中, 子緩冲区包括子緩冲区名称, 该子緩冲区包含的緩冲 元个数以及各个緩冲元在緩冲元数组中的位置指示。緩冲元数组记录的是各个 数据元链表访问地址的指示信息;数据元链表记录的是第一业务数据和第二业 务数据。 The structure of the data buffer can be seen in Figure 2. The data buffer includes a sub-buffer, a buffer meta-array, and a data element linked list. The sub-buffer includes a sub-buffer name, a number of buffer elements included in the sub-buffer, and a position indication of each buffer element in the buffer element array. The buffer element array records indication information of the access addresses of the respective data element linked lists; the data element linked list records the first service data and the second service data.
一般子緩冲区名称与该子緩冲区存储的业务功能标识相同,用来标明该子 緩冲区所记录的业务功能。 业务功能标识的作用即用来区别不同的业务功能, 可以是业务功能编号或者业务功能名称。图 2中用业务功能编号标识不同的业 务功能。 The general sub-buffer name is the same as the service function identifier stored in the sub-buffer, and is used to indicate the service function recorded in the sub-buffer. The function of the service function identifier is used to distinguish different service functions, which can be the service function number or the service function name. In Figure 2, the business function numbers are used to identify different business functions.
图 2中以金融行业中的个人账户取款业务, 编号为 1131为例对数据緩冲 区各个部分进行了说明。 子緩冲区 1 的名称为 1131 , 则说明该子緩冲区记录 的是业务功能编号为 1131 的业务功能。 緩冲元个数为 2, 说明该业务功能在 该緩冲区的緩冲元数组中对应两个緩冲元, 1和 10则说明前述两个緩冲元中 的第一个访问地址由位于緩冲元数组的第 1位所指向,另一个的访问地址由位 于緩冲元数组的第 10位所指向。 In Figure 2, the personal account withdrawal service in the financial industry is numbered 1131 as an example to illustrate the various parts of the data buffer area. The name of sub-buffer 1 is 1131, which indicates that the sub-buffer records the business function with service function number 1131. The number of buffer elements is 2, indicating that the service function corresponds to two buffer elements in the buffer element array of the buffer, and 1 and 10 indicate that the first access address of the two buffer elements is located by The first bit of the buffer meta array is pointed to, and the other access address is pointed to by the 10th bit in the buffer meta array.
5102, 根据所述业务功能标识获取业务功能对应的动作顺序表。
不同的业务功能标识对应了不同的业务功能,每一个业务功能都有一个与 之对应的动作顺序表。该动作顺序表预先存储在本地系统中, 可以通过业务功 能标识在本地系统中查找获得。 S102: Obtain an action sequence table corresponding to the service function according to the service function identifier. Different service function identifiers correspond to different business functions, and each business function has a corresponding action sequence table. The action sequence table is pre-stored in the local system and can be found in the local system through the service function identifier.
动作顺序表中包含一个业务功能在运行时刻所执行的动作步骤,以及每一 个步骤对应的程序接口。 所以,根据所述动作顺序表可以获取完成当前业务功 能所需要的外部数据和内部数据。 The action sequence table contains the action steps performed by a business function at runtime and the program interface corresponding to each step. Therefore, according to the action sequence table, external data and internal data required to complete the current service function can be obtained.
以业务功能编号为 1131的个人账户取款业务为例, 该业务功能对应的动 作顺序表中指定的动作步骤包括: 调用 1131读数据包, 调用 1131读数据库, 调用 1131业务程序, 调用 1131写数据包, 调用 1131写数据库。 Taking the personal account withdrawal service with service function number 1131 as an example, the action steps specified in the action sequence table corresponding to the service function include: calling 1131 to read the data packet, calling 1131 to read the database, calling the 1131 business program, and calling 1131 to write the data packet. , call 1131 to write the database.
5103,根据所述动作顺序表从渠道获取第一业务数据, 并从数据库中获取 第二业务数据。 5103. Acquire first service data from a channel according to the action sequence table, and obtain second service data from a database.
其中,分别用第一业务数据和第二业务数据来标识从渠道和数据库中获得 的与当前业务功能的实现相关的数据。 The first service data and the second service data are respectively used to identify data related to the implementation of the current business function obtained from the channel and the database.
仍然以业务功能编号为 1131的个人账户取款业务为例, 此时, 通过执行 动作顺序表中的"调用 1131读数据包,,步骤从渠道获得第一业务数据, 包括账 号、 密码、 金额等信息; 通过执行动作顺序表中的"调用 1131读数据库"步骤 从本地数据库中获得第二业务数据, 包括账号、 户名、 账户余额、 币种、 密码 等信息。动作顺序表中 ,不同的业务功能标识对应的步骤涉及不同的业务数据。 For example, the personal account withdrawal service with service function number 1131 is taken as an example. At this time, by executing the call 1131 to read the data packet in the action sequence table, the step obtains the first service data from the channel, including the account number, password, amount, and the like. The second service data is obtained from the local database by executing the "call 1131 read database" step in the action sequence table, including account number, account name, account balance, currency, password, etc. In the action sequence table, different business functions The steps corresponding to the identification involve different business data.
5104, 将所述第一业务数据和所述第二业务数据存入所述数据緩冲区。 S104: The first service data and the second service data are stored in the data buffer.
5105 ,所述业务功能对应的各个业务组件利用所述数据緩冲区存储的第一 业务数据和第二业务数据执行相关业务功能。 5105. Each service component corresponding to the service function performs related service functions by using the first service data and the second service data stored in the data buffer.
5106,根据所述动作顺序表将所述緩冲区中内容发生变化的第一业务数据 和第二业务数据反馈给渠道, 并写入数据库。 5106. The first service data and the second service data whose contents in the buffer are changed are fed back to the channel according to the action sequence table, and are written into the database.
该业务功能相关的业务组件利用数据緩存区中的第一业务数据和第二业 务数据执行完相关操作后, 可能会改变所述第一业务数据或者第二业务数据, 所以需要将所述緩冲区中内容发生变化的第一业务数据和第二业务数据反馈 给渠道, 并写入数据库, 这样才能保证渠道数据的一致性和数据库数据的同步 性。 After the service component related to the service function performs the related operation by using the first service data and the second service data in the data cache area, the first service data or the second service data may be changed, so the buffer needs to be The first service data and the second service data whose contents change in the area are fed back to the channel and written into the database, so as to ensure the consistency of the channel data and the synchronization of the database data.
仍然以业务功能编号为 1131的个人账户取款业务为例, 假设该业务功能
为从个人账户中取款 1000元, 该账户的账户余额会发生变化, 此时执行动作 顺序表中的"调用 1131写数据包"步骤,将变化后的账户余额信息反馈给渠道; 执行动作顺序表中的 "调用 1131写数据库"步骤, 根据账号将账户余额信息写 入数据库。 For example, the personal account withdrawal service with service function number 1131 is taken as an example. In order to withdraw 1000 yuan from the personal account, the account balance of the account will change. At this time, the "call 1131 write data packet" step in the action sequence table is executed, and the changed account balance information is fed back to the channel; In the "call 1131 write database" step, the account balance information is written into the database according to the account number.
可选地, 为了避免緩存区被无效占用, 提高緩存区的利用率, 本发明实施 例所提供的方法还包括: Optionally, the method provided by the embodiment of the present invention further includes:
S107, 释放所述数据緩冲区, 以供其他业务功能使用。 S107. Release the data buffer for use by other business functions.
本发明实施例所提供的方法,根据业务功能标识获取动作序列表,根据所 述动作序列表将执行该业务功能所需的业务数据都存入获取的数据緩冲区中, 该业务功能对应的业务组件在执行业务功能时直接对该数据緩冲区中数据进 行操作, 同时, 在业务功能执行完毕后, 将发生变化了的业务数据写入至数据 库或者反馈给渠道,从根本上避免了各个业务组件对数据库的直接访问,从而 解决了数据库过载甚至死锁问题。 According to the method provided by the embodiment of the present invention, the action sequence table is obtained according to the service function identifier, and the service data required to execute the service function is stored in the acquired data buffer according to the action sequence table, and the service function corresponds to The business component directly operates the data in the data buffer when performing the business function. At the same time, after the business function is executed, the changed business data is written into the database or fed back to the channel, thereby fundamentally avoiding each The direct access of the business components to the database solves the problem of database overload and even deadlock.
此外, 本发明实施例所提供的方法,在业务功能执行前将所需的业务数据 都存入数据緩冲区,在业务功能执行后将变化了的业务数据写入数据库或者返 回给渠道, 业务功能相关的各个业务组件直接对所述数据緩冲区进行操作,避 免了各个业务组件与数据库之间频繁的交互过程,从而进一步提高了业务处理 的效率。 In addition, the method provided by the embodiment of the present invention stores the required service data in the data buffer before the execution of the service function, and writes the changed service data into the database or returns to the channel after the execution of the service function. Each service component related to the function directly operates on the data buffer, thereby avoiding frequent interaction processes between various service components and the database, thereby further improving the efficiency of business processing.
为使本发明实施例所提供的方法更加清晰明了,下面以金融行业中个人账 户取款业务(业务功能编号为 1131 ) 为例, 对本发明实施所提供的方法进行 说明。 In order to make the method provided by the embodiment of the present invention more clear, the following provides a description of the method provided by the implementation of the present invention by taking the personal account withdrawal service (service function number 1131) in the financial industry as an example.
图 3 为本发明实施例所应用的场景的示意图, 其中, 业务支持系统 301 为本发明实施例所提供的方法的执行主体,业务功能程序 302为当前应用软件 的业务功能实体, 其中包含多个业务组件。数据库 303是当前应用软件使用的 内部数据存储管理系统。渠道 304则是当前应用软件在业务功能上相关联的外 部系统, 在本发明实施例提供的个人账户取款业务中, 该渠道可以为 ATM自 动取款机。 FIG. 3 is a schematic diagram of a scenario applied by an embodiment of the present invention, where the service support system 301 is an execution entity of a method provided by an embodiment of the present invention, and the service function 302 is a service function entity of a current application software, where multiple Business component. Database 303 is an internal data storage management system used by current application software. The channel 304 is an external system in which the current application software is associated with the service function. In the personal account withdrawal service provided by the embodiment of the present invention, the channel may be an ATM automatic teller machine.
可选地, 为了将具体的业务功能实现与接口相分离, 渠道、 数据库和业务 功能程序可以分别提供访问接口,分别是渠道接口 304-I/O、数据库接口 303-I/O
和业务功能程序接口 302-I/O, 这三个接口在概念上与软件工程领域通用的应 用程序编程接口 (API, Application Programming Interface )是一致的, 在这种 结构模式下,业务支持系统通过与这些实体的接口通讯实现对实体的访问和控 制。 Optionally, in order to separate the specific service function from the interface, the channel, the database, and the service function program respectively provide access interfaces, respectively, channel interface 304-I/O, database interface 303-I/O And business function program interface 302-I/O, these three interfaces are conceptually consistent with the application programming interface (API) in the software engineering field. In this structural mode, the business support system passes Interfaces with these entities enable access and control of entities.
参见图 4, 在图 3所示的场景中, 本发明实施例所提供的方法包括: Referring to FIG. 4, in the scenario shown in FIG. 3, the method provided by the embodiment of the present invention includes:
5401 ,业务支持系统根据渠道发送的个人账户取款业务连接请求获取一数 据緩冲区, 所述业务连接请求中携带有业务功能编号 1131。 The service support system obtains a data buffer according to the personal account withdrawal service connection request sent by the channel, where the service connection request carries the service function number 1131.
业务支持系统一直处于监听连接状态, 当渠道发起一个业务功能时,通过 渠道接口向运行时支持系统发起业务连接请求,运行时支持系统响应连接, 开 始工作。 具体包括根据该业务连接请求获取一个空白的, 可用的数据緩冲区。 The service support system is always in the listening connection state. When the channel initiates a service function, it initiates a service connection request to the runtime support system through the channel interface, and the runtime supports the system to respond to the connection and start working. Specifically, the method includes obtaining a blank, available data buffer according to the service connection request.
5402, 业务支持系统根据所述业务功能编号 1131获取业务功能对应的动 作顺序表。 The service support system obtains an action sequence table corresponding to the service function according to the service function number 1131.
在该业务支持系统调用系统级初始化程序,完成一些基本的系统初始化功 能后, 根据该业务功能标识进行查找, 找到它对应的动作顺序表。 After the service support system calls the system level initialization program and completes some basic system initialization functions, it searches according to the service function identifier and finds its corresponding action sequence table.
5403 , 业务支持系统执行动作顺序表中的 "调用 1131读数据包"步骤从渠 道获得第一业务数据, 执行动作顺序表中的 "调用 1131读数据库,,步骤从本地 数据库中获得第二业务数据。 5403. The “call 1131 read data packet” step in the action support system execution action sequence table obtains the first service data from the channel, and executes “call 1131 to read the database in the action sequence table, and the step obtains the second service data from the local database. .
具体地, 业务支持系统根据该动作顺序表从渠道(如 ATM取款机)获取 当前业务功能所需要的第一业务数据, 包括账号、 密码、 金额等信息; 从当前 业务支持系统所连接的数据库中一次性获取当前业务功能所需要的相关第二 业务数据, 包括账户余额、 币种、 密码等信息。 Specifically, the service support system acquires, according to the action sequence table, the first service data required by the current service function, such as an account number, a password, and an amount, from a channel (such as an ATM); from the database connected to the current service support system. The related second service data required for the current business function, including account balance, currency, password, and the like.
5404 ,业务支持系统将所述第一业务数据和所述第二业务数据存入所述数 据緩冲区。 S404: The service support system stores the first service data and the second service data in the data buffer.
数据緩冲区的具体结构参见图 2,从图 2中可以看出,第一业务数据包括: 账号: 1234; 取款金额: 1000.00 以及密码。 第二业务数据则包括: 余额: 16050.00; 币种: 人民币以及户名: 张春礼。 The specific structure of the data buffer is shown in Figure 2. As can be seen from Figure 2, the first service data includes: Account number: 1234; Withdrawal amount: 1000.00 and password. The second business data includes: Balance: 16050.00; Currency: Renminbi and account name: Zhang Chunli.
需要说明的是, 实际应用中, 一个业务功能可能对应于多个子緩冲区, 但 是无论一个业务功能所包含的子緩冲区的个数是多少,每个子緩冲区的结构都 是相同的。
5405 , 业务支持系统调度执行个人账户取款业务程序,该业务程序的各业 务组件利用所述数据緩冲区存储的第一业务数据和第二业务数据执行相关业 务功能。 It should be noted that, in practical applications, a service function may correspond to multiple sub-buffers, but the structure of each sub-buffer is the same regardless of the number of sub-buffers included in one service function. . S405. The service support system schedules and executes a personal account withdrawal service program, where each service component of the service program performs related business functions by using the first service data and the second service data stored in the data buffer.
5406, 业务支持系统执行动作顺序表中的 "调用 1131写数据包"步骤将账 户余额反馈给渠道; 并通过执行动作顺序表中的"调用 1131写数据库"步骤, 根据账号将账户余额信息写入数据库。 5406, the service support system executes the "call 1131 write data packet" step in the action sequence table to feed back the account balance to the channel; and by executing the "call 1131 write database" step in the action sequence table, the account balance information is written according to the account number. database.
执行完相关业务功能后, 账户余额由 16050.00变成了 15050.00, 第二业 务数据有变化,需要将该业务数据写入数据库。因为第二业务数据发生了变化, 为了使该数据保持同步, 还需要将变化的第二业务数据反馈给渠道(ATM 自 动取款机 ), 供操作人员或者用户阅览。 After the relevant business functions are executed, the account balance is changed from 16050.00 to 15050.00. The second business data changes, and the business data needs to be written into the database. Since the second service data has changed, in order to keep the data in sync, the changed second service data needs to be fed back to the channel (ATM automatic teller machine) for viewing by the operator or the user.
实际应用中,业务支持系统根据具体业务功能的执行结果确定发生变化的 业务数据, 反馈给渠道和 /或写入数据库。 In practical applications, the service support system determines the changed service data according to the execution result of the specific service function, and feeds back to the channel and/or writes to the database.
5407 , 业务支持系统释放个人账户取款业务使用的数据緩冲区。 5407, the business support system releases the data buffer used by the personal account withdrawal service.
系统的緩冲区是有限的, 为了提高緩冲区的利用率, 当一业务功能执行完 毕后需要释放该业务功能使用的数据緩冲区, 以便其他的业务功能申请使用。 The buffer of the system is limited. In order to improve the buffer utilization, the data buffer used by the service function needs to be released after the execution of a service function, so that other service functions can be used for application.
本发明实施例所提供的方法,根据业务功能标识获取动作序列表,根据所 述动作序列表将执行该业务功能所需的业务数据都存入获取的数据緩冲区中, 该业务功能对应的业务组件在执行业务功能时直接对该数据緩冲区中数据进 行操作, 同时, 在业务功能执行完毕后, 将发生变化了的业务数据写入至数据 库或者反馈给渠道,从根本上避免了各个业务组件对数据库的直接访问,从而 解决了数据库过载甚至死锁问题。 According to the method provided by the embodiment of the present invention, the action sequence table is obtained according to the service function identifier, and the service data required to execute the service function is stored in the acquired data buffer according to the action sequence table, and the service function corresponds to The business component directly operates the data in the data buffer when performing the business function. At the same time, after the business function is executed, the changed business data is written into the database or fed back to the channel, thereby fundamentally avoiding each The direct access of the business components to the database solves the problem of database overload and even deadlock.
参见图 5 , 本发明实施例还提供一种基于业务组件化的应用软件进行业务 控制的系统, 包括: Referring to FIG. 5, an embodiment of the present invention further provides a system for performing service control based on service componentized application software, including:
第一获取单元 501 ,用于根据渠道发送的业务连接请求获取一数据緩冲区, 所述业务连接请求中携带有业务功能标识; The first obtaining unit 501 is configured to obtain a data buffer according to the service connection request sent by the channel, where the service connection request carries a service function identifier;
所述数据緩冲区包括子緩冲区、 緩冲元数组和数据元链表, 其中, 所述子緩冲区中记录业务功能标识,占用的緩冲元个数以及其占有的緩冲 元在所述緩冲元数组中的位置; The data buffer includes a sub-buffer, a buffer element array, and a data element linked list, wherein the sub-buffer records the service function identifier, the number of buffer elements occupied, and the buffer element it occupies in a location in the buffer element array;
所述緩冲元数组记录的是各个数据元链表访问地址的指示信息;
所述数据元链表记录的是所述的第一业务数据和第二业务数据。 第二获取单元 502, 用于根据所述业务功能标识获取业务功能对应的动作 顺序表; The buffer element array records indication information of an access address of each data element linked list; The data element linked list records the first service data and the second service data. The second obtaining unit 502 is configured to obtain an action sequence table corresponding to the service function according to the service function identifier;
第三获取单元 503 , 用于根据所述动作顺序表从渠道获取第一业务数据, 并从数据库中获取第二业务数据; a third obtaining unit 503, configured to acquire first service data from a channel according to the action sequence table, and obtain second service data from a database;
第一写入单元 504, 用于将所述第一业务数据和所述第二业务数据存入所 述数据緩冲区; a first writing unit 504, configured to store the first service data and the second service data into the data buffer;
第二写入单元 505 , 在所述业务功能对应的各个业务组件利用所述数据緩 冲区存储的第一业务数据和第二业务数据执行相关业务功能后 ,将发生变化的 第一业务数据和第二业务数据反馈给渠道, 并写入数据库。 The second writing unit 505, after the respective service components corresponding to the service function perform the related service functions by using the first service data and the second service data stored in the data buffer, the changed first service data and The second business data is fed back to the channel and written to the database.
可选地, 为了提高緩冲区的利用率, 本发明实施例所提供的系统还包括: 释放单元, 用于释放所述第一获取单元获取的所述数据緩冲区, 以供其他 业务功能使用。 Optionally, in order to improve the utilization of the buffer, the system provided by the embodiment of the present invention further includes: a release unit, configured to release the data buffer acquired by the first acquiring unit, for other service functions. use.
实际应用中, 所述业务控制系统可以是图 3所示场景中的业务支持系统, 该业务控制系统与周边设备实体的交互可以参见图 4对应的方法描述。 In an actual application, the service control system may be a service support system in the scenario shown in FIG. 3, and the interaction between the service control system and the peripheral device entity may be described in the method corresponding to FIG. 4.
本发明实施例所提供的系统,根据业务功能标识获取动作序列表,根据所 述动作序列表将执行该业务功能所需的业务数据都存入获取的数据緩冲区中, 该业务功能对应的业务组件在执行业务功能时直接对该数据緩冲区中数据进 行操作, 同时, 在业务功能执行完毕后, 将发生变化了的业务数据写入至数据 库或者反馈给渠道,从根本上避免了各个业务组件对数据库的直接访问,从而 解决了数据库过载甚至死锁问题。 According to the embodiment of the present invention, the action sequence table is obtained according to the service function identifier, and the service data required to execute the service function is stored in the acquired data buffer according to the action sequence table, and the service function corresponds to The business component directly operates the data in the data buffer when performing the business function. At the same time, after the business function is executed, the changed business data is written into the database or fed back to the channel, thereby fundamentally avoiding each The direct access of the business components to the database solves the problem of database overload and even deadlock.
此外, 本发明实施例所提供的方法,在业务功能执行前将所需的业务数据 都存入数据緩冲区,在业务功能执行后将变化了的业务数据写入数据库或者返 回给渠道, 业务功能相关的各个业务组件直接对所述数据緩冲区进行操作,避 免了各个业务组件与数据库之间频繁的交互过程,从而进一步提高了业务功能 处理的效率。 In addition, the method provided by the embodiment of the present invention stores the required service data in the data buffer before the execution of the service function, and writes the changed service data into the database or returns to the channel after the execution of the service function. Each service component related to the function directly operates on the data buffer, thereby avoiding a frequent interaction process between each service component and the database, thereby further improving the efficiency of business function processing.
本发明可以在由计算机执行的计算机可执行指令的一般上下文中描述,例 如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的 例程、 程序、 对象、 组件、 数据结构等等。 也可以在分布式计算环境中实践本
发明,在这些分布式计算环境中, 由通过通信网络而被连接的远程处理设备来 执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地 和远程计算机存储介质中。 The invention may be described in the general context of computer-executable instructions executed by a computer, such as a program module. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform particular tasks or implement particular abstract data types. You can also practice this in a distributed computing environment. Invention, in these distributed computing environments, tasks are performed by remote processing devices that are connected through a communication network. In a distributed computing environment, program modules can be located in both local and remote computer storage media including storage devices.
以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通 技术人员来说, 在不脱离本发明原理的前提下, 还可以做出若干改进和润饰, 这些改进和润饰也应视为本发明的保护范围。
The above is only a preferred embodiment of the present invention, and it should be noted that those skilled in the art can also make several improvements and retouchings without departing from the principles of the present invention. It should be considered as the scope of protection of the present invention.
Claims
1、 一种基于业务组件化的应用软件进行业务控制的方法, 其特征在于, 包括: A method for performing business control based on business componentized application software, comprising:
根据渠道发送的业务连接请求获取一数据緩冲区,所述业务连接请求中携 带有业务功能标识; 其中, 渠道是指与应用软件在业务功能上相关联的外部系 统, 用于向应用软件发起业务功能请求。 Obtaining a data buffer according to the service connection request sent by the channel, where the service connection request carries a service function identifier; wherein, the channel refers to an external system associated with the application software on the service function, and is used to initiate the application to the application software. Business function request.
根据所述业务功能标识获取业务对应的动作顺序表; Obtaining an action sequence table corresponding to the service according to the service function identifier;
根据所述动作顺序表从渠道获取第一业务数据,并从数据库中获取第二业 务数据; Obtaining first service data from the channel according to the action sequence table, and acquiring second service data from the database;
将所述第一业务数据和所述第二业务数据存入所述数据緩冲区; 在所述业务对应的各个业务组件利用所述数据緩冲区存储的第一业务数 据和第二业务数据执行相关业务功能后,根据所述动作顺序表将所述数据緩冲 区中内容发生变化的第一业务数据和第二业务数据反馈给渠道, 并写入数据 库。 Depositing the first service data and the second service data into the data buffer; using the first service data and the second service data stored by the data buffer in each service component corresponding to the service After performing the related service function, the first service data and the second service data whose contents are changed in the data buffer are fed back to the channel according to the action sequence table, and are written into the database.
2、 根据权利要求 1所述的方法, 其特征在于, 还包括: 2. The method according to claim 1, further comprising:
在根据所述动作顺序表将所述数据緩冲区中内容发生变化的第一业务数 据和第二业务数据反馈给渠道, 并写入数据库后, 释放所述数据緩冲区, 以供 其他业务使用。 After the first service data and the second service data whose contents in the data buffer are changed are fed back to the channel according to the action sequence table, and written into the database, the data buffer is released for other services. use.
3、 根据权利要求 1所述的方法, 其特征在于, 所述数据緩冲区包括子緩 冲区、 緩冲元数组和数据元链表, 其中, The method according to claim 1, wherein the data buffer includes a sub-buffer, a buffer element array, and a data element linked list, where
所述子緩冲区中记录业务功能标识,业务功能占用的緩冲元个数以及业务 功能占用的緩冲元在所述緩冲元数组中的位置; The sub-buffer records the service function identifier, the number of buffer elements occupied by the service function, and the location of the buffer element occupied by the service function in the buffer element array;
所述緩冲元数组记录的是各个数据元链表访问地址的指示信息; 所述数据元链表记录的是所述的第一业务数据和第二业务数据。 The buffer element array records indication information of each data element linked list access address; the data element linked list records the first service data and the second service data.
4、 根据权利要求 1所述的方法, 其特征在于, 所述业务对应的各个业务 组件利用所述数据緩冲区存储的第一业务数据和第二业务数据执行相关业务 功能包括: The method according to claim 1, wherein each service component corresponding to the service performs related service functions by using the first service data and the second service data stored in the data buffer, including:
所述业务对应的各个业务组件通过所述数据緩冲区的接口对所述数据緩 冲区中存储的第一业务数据和第二业务数据进行读取和 /或写入操作。
Each service component corresponding to the service performs a read and/or write operation on the first service data and the second service data stored in the data buffer through an interface of the data buffer.
5、 根据权利要求 1所述的方法, 其特征在于, 根据所述动作顺序表从数 据库中获取第二业务数据具体为: The method according to claim 1, wherein the obtaining the second service data from the database according to the action sequence table is specifically:
根据所述动作顺序表一次性从数据库中获取第二业务数据。 The second service data is obtained from the database at one time according to the action sequence table.
6、 根据权利要求 1所述的方法, 其特征在于, 根据所述动作顺序表将发 生变化的第二业务数据写入数据库, 具体为: The method according to claim 1, wherein the changed second service data is written into the database according to the action sequence table, specifically:
根据所述动作顺序表将发生变化的第二业务数据一次性写入数据库。 The changed second service data is written to the database at one time according to the action sequence table.
7、 一种基于业务组件化的应用软件进行业务控制的系统, 其特征在于, 包括: 7. A system for business control based on business componentized application software, characterized in that:
第一获取单元, 用于根据渠道发送的业务连接请求获取一数据緩冲区, 所 述业务连接请求中携带有业务功能标识; a first acquiring unit, configured to acquire a data buffer according to the service connection request sent by the channel, where the service connection request carries a service function identifier;
第二获取单元, 用于根据所述业务功能标识获取业务对应的动作顺序表; 第三获取单元, 用于根据所述动作顺序表从渠道获取第一业务数据, 并从 数据库中获取第二业务数据; a second acquiring unit, configured to acquire, according to the service function identifier, an action sequence table corresponding to the service; the third acquiring unit, configured to acquire the first service data from the channel according to the action sequence table, and obtain the second service from the database Data
第一写入单元,用于将所述第一业务数据和所述第二业务数据存入所述数 据緩冲区; a first writing unit, configured to store the first service data and the second service data into the data buffer;
第二写入单元,在所述业务对应的各个业务组件利用所述数据緩冲区存储 的第一业务数据和第二业务数据执行相关业务后 ,将发生变化的第一业务数据 和第二业务数据反馈给渠道, 并写入数据库。 a second writing unit, after the respective service components corresponding to the service perform related services by using the first service data and the second service data stored in the data buffer, the first service data and the second service that are to be changed Data is fed back to the channel and written to the database.
8、 根据权利要求 7所述的系统, 其特征在于, 还包括: 8. The system according to claim 7, further comprising:
释放单元,用于在根据所述动作顺序表将所述数据緩冲区中内容发生变化 的第一业务数据和第二业务数据反馈给渠道, 并写入数据库后,释放所述第一 获取单元获取的所述数据緩冲区, 以供其他业务使用。 a releasing unit, configured to: after the first service data and the second service data that change content in the data buffer are fed back to the channel according to the action sequence table, and are written into the database, release the first acquiring unit The data buffer is obtained for use by other businesses.
9、 根据权利要求 7所述的系统, 其特征在于, 所述数据緩冲区包括子緩 冲区、 緩冲元数组和数据元链表, 其中, The system according to claim 7, wherein the data buffer includes a sub-buffer, a buffer element array, and a data element linked list, where
所述子緩冲区中记录业务功能标识,业务功能占用的緩冲元个数以及业务 功能占有的緩冲元在所述緩冲元数组中的位置; Recording, in the sub-buffer, the service function identifier, the number of buffer elements occupied by the service function, and the location of the buffer element occupied by the service function in the buffer element array;
所述緩冲元数组记录的是各个数据元链表访问地址的指示信息; 所述数据元链表记录所述的第一业务数据和第二业务数据。
The buffer element array records indication information of an access address of each data element linked list; the data element linked list records the first service data and the second service data.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200910161673.4 | 2009-07-28 | ||
CN2009101616734A CN101625699B (en) | 2009-07-28 | 2009-07-28 | Application software business control method and system based on business componentization |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2011012003A1 true WO2011012003A1 (en) | 2011-02-03 |
Family
ID=41521548
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2010/072553 WO2011012003A1 (en) | 2009-07-28 | 2010-05-10 | Method and system for controlling service based on service componentized application software |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN101625699B (en) |
WO (1) | WO2011012003A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11911480B2 (en) | 2015-01-21 | 2024-02-27 | Mochida Pharmaceutical Co., Ltd. | Self-emulsifying composition of ω-3 fatty acid |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101625699B (en) * | 2009-07-28 | 2013-01-09 | 大连新中连软件集团有限公司 | Application software business control method and system based on business componentization |
CN104639280B (en) * | 2013-11-11 | 2019-09-13 | 深圳市中兴微电子技术有限公司 | A kind of method and device for transmitting time division multiplexed business |
CN106357791A (en) * | 2016-09-30 | 2017-01-25 | 华为技术有限公司 | Method, device and system for processing services |
CN106776753B (en) * | 2016-11-14 | 2020-08-21 | 平安科技(深圳)有限公司 | Service data processing method and device |
TWI725110B (en) * | 2017-01-19 | 2021-04-21 | 香港商阿里巴巴集團服務有限公司 | Database operation method and device |
CN107423358B (en) | 2017-06-13 | 2020-08-07 | 阿里巴巴集团控股有限公司 | Data storage and calling method and device |
CN109901933B (en) * | 2019-01-18 | 2022-02-25 | 口碑(上海)信息技术有限公司 | Operation method and device of business system, storage medium and electronic device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2003023656A1 (en) * | 2001-09-13 | 2003-03-20 | Jda Software Group, Inc | Database interface architecture with time-based load balancing in a real-time environment |
CN101127041A (en) * | 2007-08-28 | 2008-02-20 | 激动集团股份有限公司 | Business rule basic data buffer method |
CN101216855A (en) * | 2008-01-16 | 2008-07-09 | 中兴通讯股份有限公司 | Message kind business accumulated data caching method and system |
US20090187534A1 (en) * | 2008-01-21 | 2009-07-23 | International Business Machines Corporation | Transaction prediction modeling method |
CN101625699A (en) * | 2009-07-28 | 2010-01-13 | 大连新中连软件集团有限公司 | Application software business control method and system based on business componentization |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1549164A (en) * | 2003-05-16 | 2004-11-24 | 北京法海信息咨询有限公司 | Data bank system and data access method thereof |
-
2009
- 2009-07-28 CN CN2009101616734A patent/CN101625699B/en not_active Expired - Fee Related
-
2010
- 2010-05-10 WO PCT/CN2010/072553 patent/WO2011012003A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2003023656A1 (en) * | 2001-09-13 | 2003-03-20 | Jda Software Group, Inc | Database interface architecture with time-based load balancing in a real-time environment |
CN101127041A (en) * | 2007-08-28 | 2008-02-20 | 激动集团股份有限公司 | Business rule basic data buffer method |
CN101216855A (en) * | 2008-01-16 | 2008-07-09 | 中兴通讯股份有限公司 | Message kind business accumulated data caching method and system |
US20090187534A1 (en) * | 2008-01-21 | 2009-07-23 | International Business Machines Corporation | Transaction prediction modeling method |
CN101625699A (en) * | 2009-07-28 | 2010-01-13 | 大连新中连软件集团有限公司 | Application software business control method and system based on business componentization |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11911480B2 (en) | 2015-01-21 | 2024-02-27 | Mochida Pharmaceutical Co., Ltd. | Self-emulsifying composition of ω-3 fatty acid |
Also Published As
Publication number | Publication date |
---|---|
CN101625699B (en) | 2013-01-09 |
CN101625699A (en) | 2010-01-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2011012003A1 (en) | Method and system for controlling service based on service componentized application software | |
US11892957B2 (en) | SSD architecture for FPGA based acceleration | |
CN101996098B (en) | Managing message queues | |
WO2015169145A1 (en) | Memory management method and device | |
US9178839B2 (en) | Sharing buffer space in link aggregation configurations | |
CN108763099A (en) | Startup method, apparatus, electronic equipment and the storage medium of system | |
CN106161537A (en) | The processing method of remote procedure call, device, system and electronic equipment | |
WO2014090008A1 (en) | Task processing method and virtual machine | |
US8806168B2 (en) | Producer-consumer data transfer using piecewise circular queue | |
WO2016015583A1 (en) | Memory management method and device, and memory controller | |
US9069592B2 (en) | Generic transport layer mechanism for firmware communication | |
US20070239890A1 (en) | Method, system and program storage device for preventing a real-time application from running out of free threads when the real-time application receives a device interface request | |
CN101576912A (en) | System and reading and writing method for realizing asynchronous input and output interface of distributed file system | |
CN103986585A (en) | Message preprocessing method and device | |
CN102567225A (en) | Method and device for managing system memory | |
CN103810139A (en) | Data exchange method and device for multiple processors | |
CN108958903B (en) | Embedded multi-core central processor task scheduling method and device | |
CN101196851B (en) | Data management method of flash memory | |
JP4734348B2 (en) | Asynchronous remote procedure call method, asynchronous remote procedure call program and recording medium in shared memory multiprocessor | |
JP2013015990A (en) | Information processing system, information processing program and information processing method | |
JP6059360B2 (en) | Buffer processing method and apparatus | |
CN109426562A (en) | Priority weighted robin scheduling device | |
US20100250507A1 (en) | Enumeration of a concurrent data structure | |
JP4286481B2 (en) | Clustering system | |
JP2009151816A (en) | Clustering system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 10803836 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 10803836 Country of ref document: EP Kind code of ref document: A1 |