Method and device for operating business objects in service system corresponding to database

By defining the mapping between data entities and business objects and using business operation plans for operations, the problems of database operation complexity and maintenance difficulty in the service system are solved, and efficient database operation and maintenance are achieved.

CN119166728BActive Publication Date: 2025-03-21HANGZHOU YILINGERSI INFORMATION TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411668826.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-03-21
Estimated Expiration
2044-11-20

AI Technical Summary

Technical Problem

In a service system, business operations may involve a large number of data entities and complex entity relationships, resulting in complex codes for operating the database, prone to errors, high testing costs, and difficulty in later maintenance.

Method used

By defining business objects mapped to several data entities and business operation plans for business operations on business objects, users only need to select the target business operation plan according to their needs and enter corresponding operating parameters to realize business operations on several sub-objects in the business object, thereby realizing operations on data entities mapped to business objects in the database.

Benefits of technology

It greatly reduces the complexity of users' database operations, improves the operation efficiency and maintenance efficiency of the database, and reduces the need for code writing and debugging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166728B_ABST
    Figure CN119166728B_ABST
Patent Text Reader

Abstract

One or more embodiments of the present specification provide a method and device for operating business objects in a service system corresponding to a database, wherein the method is applied to the service system, and the service system maintains at least one business object and a business operation scheme for performing business operations on the business object; the method includes: obtaining parameter values ​​of operation parameters corresponding to a target business operation scheme for performing business operations on the target business object; determining a target business object instance based on the parameter values ​​of the operation parameters corresponding to the target business operation scheme and the operation type, and performing a business operation corresponding to the operation type on the target business object instance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of the present specification relate to the field of terminal technology, and more particularly, to a method and device for operating a business object in a service system corresponding to a database. Background Art

[0002] In related technologies, business operations in service systems usually need to be completed by operating data; data operations can be divided into "storage" and "retrieval". "Storage" means saving data related to business operations in the database corresponding to the service system, and "retrieval" means reading data from the database into the service system to display the process and related data of business operations for use by business personnel. In a typical service system, its storage is mainly based on a relational database (RDB). In the development process of the business system, the data related to business operations is first analyzed through the requirements document, and a database model including data entities (Entity) and entity relationships (Entity Relationship, ER) between each data entity is formed through a data modeling language, such as the Unified Modeling Language (UML). After the modeling is completed, user use cases can be extracted and translated according to the requirements document, and finally the database can be operated through code to realize the operation of data entities in the database.

[0003] Since business operations may involve a large number of data entities and complex entity relationships, the code generated to operate the database is complex, prone to errors, has high testing costs, and is difficult to maintain later. Summary of the invention

[0004] In view of this, one or more embodiments of this specification provide the following technical solutions:

[0005] According to a first aspect of one or more embodiments of the present specification, a method for operating a business object in a service system corresponding to a database is proposed, which is applied to the service system, wherein the service system maintains at least one business object and a business operation scheme for performing business operations on the business object; wherein the business object is an object created based on a number of data entities contained in the database and the entity relationship between the data entities; the data entity includes a number of attributes; the data entities mapped by the business object include a main entity and other attribute entities, the main entity and the attribute entity are directly or indirectly connected through a foreign key relationship, and each data entity maps a sub-object in the business object; wherein the sub-object mapped by the main entity is a root sub-object, and the sub-object mapped by the attribute entity is a non-root sub-object; the root sub-object is a sub-object corresponding to a root node in a tree representation of the business object; the business operation scheme includes a set of operation types and corresponding operation parameters for performing business operations on a number of sub-objects in the business object, wherein each operation type and corresponding operation parameter acts on a sub-object contained in the business object; the method includes:

[0006] Obtaining parameter values ​​of operation parameters corresponding to a target business operation solution for performing a business operation on a target business object;

[0007] Based on the parameter value of the operation parameter corresponding to the target business operation scheme and the operation type, a target business object instance is determined, and a business operation corresponding to the operation type is performed on the target business object instance.

[0008] According to the second aspect of one or more embodiments of the present specification, an operation device for a business object in a service system corresponding to a database is proposed, comprising: a parameter input module for obtaining parameter values ​​of operation parameters corresponding to a target business operation scheme for performing business operations on the target business object; a business operation module for determining a target business object instance based on the parameter values ​​of the operation parameters corresponding to the target business operation scheme and the operation type, and performing a business operation corresponding to the operation type on the target business object instance.

[0009] It can be seen from the above embodiments that this specification predefines business objects mapped by several data entities and business operation plans for performing business operations on business objects, which is equivalent to mapping operations on data entities in the database to business operations on business objects. Users only need to select the target business operation plan according to their own needs and enter the parameter values ​​of the operation parameters corresponding to the target business operation plan to implement business operations on several sub-objects in the business object, that is, to implement operations on the data entities corresponding to the sub-objects. During the whole process, users do not need to perform too many operations on the code, which greatly reduces the complexity of operating the database and improves the efficiency of operating the database. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 It is a flowchart of an operation method for a business object in a service system corresponding to a database provided by an exemplary embodiment.

[0011] Figure 2 It is a schematic diagram of an operation method for a business object in a service system corresponding to a database provided by an exemplary embodiment.

[0012] Figure 3 It is a schematic diagram of an operation method for a business object in a service system corresponding to a database provided by an exemplary embodiment.

[0013] Figure 4 It is a schematic diagram of an operation method for a business object in a service system corresponding to a database provided by an exemplary embodiment.

[0014] Figure 5 It is a schematic diagram of an operation method for a business object in a service system corresponding to a database provided by an exemplary embodiment.

[0015] Figure 6 It is a schematic diagram of an operation method for a business object in a service system corresponding to a database provided by an exemplary embodiment.

[0016] Figure 7 It is a structural schematic diagram of a device provided by an exemplary embodiment.

[0017] Figure 8 It is a block diagram of an operating device for a business object in a service system corresponding to a database provided by an exemplary embodiment.

[0018] Fig. 9 It is a structural diagram of a service system corresponding to a database provided by an exemplary embodiment. DETAILED DESCRIPTION

[0019] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this manual are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0020] Business operations in service systems usually need to be completed by operating data; data operations can be divided into "storage" and "retrieval". "Storage" means saving the data related to business operations in the database corresponding to the service system, and "retrieval" means reading data from the database into the service system to display the process and related data of business operations for use by business personnel. In a typical service system, its storage is mainly based on a relational database (RDB). In the development process of the business system, the data related to business operations are first analyzed through the requirements document, and the database modeling including data entities (Entity) and entity relationships (Entity Relationship, ER) between each data entity is formed through a data modeling language, such as the Unified Modeling Language (UML). After the modeling is completed, user use cases can be extracted from the requirements document, translated, and finally the database can be operated through code to realize the operation of data entities in the database. Since the business operation may involve a large number of data entities and the entity relationships are complex, the code for operating the database is complex, prone to errors, high testing costs, and difficult to maintain later.

[0021] For the above problems, related technologies provide two solutions: 1. For people, through the idea of ​​software engineering and the formulation of standardized development processes, systematic training for R&D personnel, implementation of standard R&D processes, and maintenance of standardized documents. 2. For things, better tools and platforms can be used, such as the Spring application development framework using processes to divide code levels; using the MyBatis database mapping framework to reduce the direct manual writing of structured query language (SQL). However, the above methods have high requirements for business operators, who need to be able to quickly understand and maintain the code. In addition, some dynamic solutions have been proposed, such as GraphQL Mutation, which is equivalent to developing the application programming interface (API) of the database for the front end. However, in this dynamic solution, the API has security risks, the front end can arbitrarily combine operations, over-open the server semantics, and is easy to be attacked, and the API is difficult to customize.

[0022] In view of this, this specification proposes an operation method for business objects in a service system corresponding to a database. By defining business objects mapped to several data entities and business operation schemes for performing business operations on business objects, wherein the business operation schemes set the operation types and operation parameters for performing business operations on several sub-objects in the business objects; in response to a target business operation scheme selected by a user and the parameter values ​​of the operation parameters corresponding to the target business operation scheme obtained, the business operation can be performed on the target business object corresponding to the target business operation scheme based on the parameter values ​​of the operation parameters obtained and the corresponding operation type.

[0023] During implementation, the parameter value of the operation parameter corresponding to the target business operation scheme for performing business operations on the target business object can be obtained; based on the parameter value of the operation parameter corresponding to the target business operation scheme and the operation type, the target business object instance is determined, and the business operation corresponding to the operation type is performed on the target business object instance.

[0024] In the above technical scheme, by defining business objects mapped to several data entities and business operation schemes for performing business operations on business objects, users only need to select business operation schemes according to their needs and input parameter values ​​of corresponding operation parameters to implement business operations on business objects, thereby realizing operations on data entities mapped to business objects in the database, greatly reducing the complexity of user operations and improving the efficiency of database maintenance.

[0025] In order to enable those skilled in the art to better understand the technical solutions in the present application, the technical solutions in this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0026] See also Figure 1 , Figure 1 It is a flowchart of an operation method for a business object in a service system corresponding to a database provided by an exemplary embodiment. The method can be applied to a service system corresponding to a database.

[0027] The database can maintain a large number of data entities (Entity), each data entity can include several attributes; there can be certain entity relationships (Entity Relation) between data entities, and the entity relationships between data entities can be represented by foreign key (Foreign key, FK) relationships. The database can be a relational database, and the data entity is a data table (DB Schema), and the data tables can be associated by foreign key relationships. The entity relationships between data entities can include: 1:1, 1:N.

[0028] The service system predefines at least one business object (BO), which is an object created based on several data entities contained in the database and the entity relationships between several data entities; the several data entities mapped by the business object may include a main entity and other attribute entities, and the main entity and the attribute entities may be directly or indirectly connected through the foreign key relationship between the data entities. For example, if the business object BO1 is composed of sub-objects D1, D2, D3, and D4 corresponding to the data entities E1, E2, E3, and E4, respectively, E1 is the main entity, and E2, E3, and E4 are attribute entities. E1 is directly connected to E2 and E3 through a foreign key relationship, and E3 is directly connected to E4 through a foreign key relationship, which is equivalent to E1 and E4 being indirectly connected through a foreign key relationship. D1 corresponds to the root node in the tree expression of BO1, that is, it is the root sub-object, and D2, D3, and D4 are non-root sub-objects.

[0029] In the business objects mapped by several data entities, each data entity can be mapped to a sub-object in the business object; wherein the sub-object mapped by the main entity is a root sub-object, and the sub-object mapped by the attribute entity is a non-root sub-object.

[0030] For example, Figure 2As shown, several data entities mapped by the user business object UserBO include: user data entity User, driver card data entity DriverLicense, car data entity Car, and vehicle driving card data entity VehicleLicense, wherein the user data entity User includes four attributes: identification id, name, gender, and identity card idCard; the driver card data entity DriverLicense includes three attributes: identification id, user identification UserId, and driver card number number; the car data entity Car includes three attributes: identification id, user identification UserId, and brand brand; the vehicle driving card data entity VehicleLicense includes three attributes: identification id, car identification CarId, and expiration time dueTime. The data entity also points out the data type of each attribute: long integer Long, string String, enumeration Enum, date Date, etc.; the attributes of the data entity may include: attributes as primary key (PK), attributes as unique key (UK), and attributes as foreign key (FK); as shown Figure 2 As shown, the user data entity User is the main entity of the user business object UserBO, and the driver card data entity DriverLicense, the car data entity Car, and the vehicle driving card data entity VehicleLicense are the attribute entities of the user business object UserBO. The user data entity User and the driver card data entity DriverLicense and the vehicle data entity Car are connected through the user identifier UserId as the foreign key FK, that is, the attribute value corresponding to the UserId in the driver card data entity DriverLicense and the vehicle data entity Car is the same as the attribute value corresponding to the identifier id in the user data entity User. The car data entity Car and the vehicle driving card data entity VehicleLicense are connected through the car identifier CarId as the foreign key FK, which is equivalent to an indirect connection between the user data entity User and the vehicle driving card data entity VehicleLicense through the car data entity Car. There is a 1:1 relationship between the user data entity User and the driver license data entity DriverLicense, indicating that one user can have one driver license; there is a 1:N relationship between the user data entity User and the car data entity Car, indicating that one user can have multiple cars; there is a 1:1 relationship between the car data entity Car and the vehicle driving card data entity VehicleLicense, indicating that one car has one vehicle driving card. Based on the Java language business object, it can be expressed as follows:

[0031] class VehicleLicenseBo {

[0032] Long id;

[0033] Long carId;

[0034] Date dueTime;

[0035] }

[0036] class CarBo {

[0037] Long id;

[0038] Long userId;

[0039] String brand;

[0040] VehicleLicenseBo VehicleLicense;

[0041] }

[0042] class DriverLicenseBo {

[0043] Long id;

[0044] String number;

[0045] Long userId;

[0046] }

[0047] class UserBo{ / / 构成一个业务对象

[0048] Long id;

[0049] String name;

[0050] Strings gender;

[0051] String idCard;

[0052] List <carbo>carList; / / indicates that a user owns multiple cars

[0053] DriverLicenseBo DriverLicense; / / Indicates that a user has a driver's license

[0054] }

[0055] Business objects can be represented in a variety of ways, including but not limited to Java classes, other programming language structures, Json, DSL languages, etc. In addition to the attributes of the main entity User, the user business object UserBO also includes the attributes of the attribute entity Car and the attribute entity VehicleLicense through carList. Since the entity relationship between the main entity User and the attribute entity Car can be 1:N, a user business object UserBO can contain multiple Car data entities. Figure 2 As shown in the figure, for the user business object UserBO, the User sub-object mapped by the user data entity User is the root sub-object, and the Car sub-object mapped by the car data entity Car, the VehicleLicense sub-object mapped by the vehicle driving card data entity VehicleLicense, and the DriverLicense sub-object mapped by the driver card data entity DriverLicense are non-root sub-objects. The user business object UserBO can be abstracted as follows Figure 3 The tree-like expression structure shown may include a root node corresponding to the main object and child nodes corresponding to the attribute objects.

[0056] The service system may also pre-set a business operation plan for business operations on the business object. The business operation plan may include a set of operation types and corresponding operation parameters for business operations on several sub-objects in the business object. In the business operation plan, corresponding operation types and corresponding operation parameters may be set for different sub-objects. In the same business operation plan, the same operation type or different operation types may be set for different sub-objects. For example, for Figure 2 For the user business object UserBO shown, the service system may be provided with a business operation plan F1 and a second business operation plan F2 for performing business operations on the User sub-object of the user business object UserBO; a business operation plan F3 and a business operation plan F4 may also be provided for performing business operations on the Car sub-object of the user business object UserBO; a business operation plan F5 and a business operation plan F6 may also be provided for performing business operations on the User sub-object and the Car sub-object of the user business object UserBO, wherein different operation types may correspond to the business operation plans F1 and F2, between F3 and F4, and between F5 and F6, and different sub-objects in the business operation plans F5 and F6 may also correspond to different operation types.

[0057] The operation parameters may include: attributes contained in the data entity of the sub-object mapping, positioning parameters for positioning the data entity of the sub-object mapping, and the like.

[0058] In one embodiment, the service system may provide the user with an operation interface for creating a business operation plan, and obtain business operation information for performing business operations on a business object input by the user through a client corresponding to the service system in the operation interface to create a business operation plan. The business operation information input by the user may include several sub-objects selected by the user from the sub-objects contained in the business object, and a set of operation types and corresponding operation parameters for performing business operations on the several sub-objects. In the business operation information, a corresponding operation type is set for each of the several sub-objects, and corresponding operation parameters may be set as needed. The service system may create a business operation plan for performing business operations on several sub-objects in the business object based on the business operation information input by the user.

[0059] In one embodiment, the operation type can be set according to actual needs, and can include: create operation, delete operation, update operation and merge operation. Among them, the create operation can be used to generate a new data entity record corresponding to the sub-object instance in the database, the delete operation can be used to delete the data entity record corresponding to the sub-object instance from the database, the update operation can be used to update the attributes of the data entity record corresponding to the sub-object instance in the database; the merge operation can be used to create or update the data entity record corresponding to the sub-object instance in the database.

[0060] It should be noted that the system described in this document may include an input device for a business operation plan and an operation device for a business object in a service system corresponding to a database. The user sets the business operation plan through the input device for the business operation plan, persists the business operation plan, and converts the business operation plan into executable code. Finally, the executable code is run and the business operation is completed through the operation device for the business object in the service system corresponding to the database.

[0061] S101: Acquire parameter values ​​of operation parameters corresponding to a target business operation solution for performing a business operation on a target business object.

[0062] In one implementation, the user can select a target business operation scheme for performing business operations on a target business object from the business operation schemes maintained by the service system through a client corresponding to the service system, and input parameter values ​​of operation parameters corresponding to the target business operation scheme in the interactive interface.

[0063] In one implementation, the service system obtains the target business operation scheme selected by the user and the parameter values ​​of the operation parameters corresponding to the target business operation scheme input by the user in response to the user's operation.

[0064] In one implementation, the parameter value of the operation parameter input by the user may include parameter values ​​of the operation parameters corresponding to several sub-objects in the target business object targeted by the target business operation solution.

[0065] In one implementation, the service system may maintain an application program interface (API) corresponding to each business operation scheme. A user may select a target API corresponding to a target business operation scheme through a client corresponding to the service system, and input parameter values ​​of operation parameters required by the target API.

[0066] S102: Determine a target business object instance based on parameter values ​​of operation parameters corresponding to the target business operation scheme and the operation type, and perform a business operation corresponding to the operation type on the target business object instance.

[0067] After determining the target business operation plan selected by the user and obtaining the parameter values ​​of the operation parameters input by the user corresponding to the target business operation plan, the service system can determine the target business object instance based on the operation type in the target business operation plan and the parameter values ​​of the corresponding operation parameters, and perform the business operation corresponding to the operation type on the target business object instance.

[0068] The determined target business object instance may be a business object instance created based on the parameter value of the operation parameter input by the user, or may be a business object instance extracted from a database based on the parameter value of the operation parameter input by the user.

[0069] like Figure 4 As shown, it is assumed that the service system can maintain business objects based on data entities E1, E2, E3, and E4 mapping and business operation schemes for performing business operations on the business objects; data entities E1, E2, E3, and E4 are respectively mapped to sub-objects D1, D2, D3, and D4, where D1 is a root sub-object and D2, D3, and D4 are non-root sub-objects. The parameter values ​​of the operation parameters corresponding to the business operation scheme input by the user can include the parameter values ​​of the operation parameters C1, C2, C3, and C4 corresponding to the sub-objects D1, D2, D3, and D4, respectively. According to the parameter values ​​of the operation parameters obtained, the records of the corresponding data entities E1, E2, E3, and E4 are obtained from the database to obtain the business object instance, and the business operation is performed on the instances of the sub-objects D1, D2, D3, and D4 in the business object instance based on the operation type in the business operation scheme.

[0070] Based on the above embodiment, by pre-defining business objects mapped by several data entities and business operation schemes for business objects, it is equivalent to mapping the operations on data entities in the database to the business operations on business objects. Users only need to select the target business operation scheme according to their own needs and input the parameter values ​​of the operation parameters corresponding to the target business operation scheme to implement business operations on several sub-objects in the business object, that is, to implement the operations on the data entities corresponding to the sub-objects, and according to the ER relationship of the data entities, the associated operations of several data entities will be implemented according to the operation scheme. In the whole process, users do not need to perform too many operations on the code, which greatly reduces the complexity of operating the database and improves the efficiency of operating the database.

[0071] In one embodiment, after obtaining the parameter value of the operation parameter corresponding to the target business operation scheme input by the user, the service system can determine the target business object instance based on the parameter value of the operation parameter corresponding to the target business operation scheme and the operation type, and perform the business operation corresponding to the operation type on the target business object instance, and then persist the target business object instance after executing the business operation to the database.

[0072] The service system can build a target business object instance in memory, perform business operations corresponding to the operation type on the target business object instance, and then persist the target business object instance after the business operation is executed in the memory to the database. For example, the data entity record corresponding to the target business object instance can be saved, deleted or updated in the database based on Object Relational Mapping (ORM) and Structured Query Language (SQL).

[0073] In one embodiment, Figure 5 As shown, the service system can obtain the parameter values ​​of the operation parameters corresponding to the target business operation scheme input by the user through the API corresponding to the target business operation scheme; generate an interface definition containing the operation parameters corresponding to the target business operation scheme, and generate code that conforms to the interface definition and is used to implement the target business operation scheme, that is, the operation logic code; determine the business object instance by creating or loading a data entity record corresponding to the target business object instance targeted by the target business operation scheme in the database; perform a business operation corresponding to the operation type included in the target business object on the business object instance based on the code generated for implementing the target business operation scheme; and then persist the business object instance after the business operation to the database, thereby completing the operation on the database.

[0074] Based on the above embodiments, in the process of performing business operations on business objects based on business operation plans, the user only needs to input the parameter values ​​of the corresponding operation parameters, and the service system automatically generates an interface definition of the operation parameters, and generates code based on the interface definition for implementing the business operation plan, without the need for the user to write and debug the code, which greatly reduces the complexity of operating the database and improves the efficiency of database operations.

[0075] In one embodiment, the corresponding operation parameters of the business operation scheme can be set based on different operation types, such as positioning parameters, attribute parameters, etc. Accordingly, the parameter value of the operation parameter input by the user may include a positioning parameter value and an attribute value. Among them, the positioning parameter value is used to obtain a business object instance uniquely corresponding to the positioning parameter value from the database, that is, the data entity record for mapping the business object instance is loaded from the database with the positioning parameter as an index, thereby determining the business object instance. The attribute value is used to indicate the parameter value for updating or generating the corresponding attribute contained in the business object instance.

[0076] In one embodiment, Figure 6 The operation information input by the user for creating a business operation plan obtained through the operation interface may include the following:

[0077] S601 . In response to a business object A1 selected by a user, an operation interface for creating a business operation plan for the business object A1 selected by the user may be output to the user.

[0078] S602. A structure tree corresponding to the business object A1 may be output to the user in the operation interface. The structure tree may include nodes corresponding to each sub-object, including: a root sub-object D1 and non-root sub-objects D2, D3, and D4.

[0079] S603: In response to the user's selection operation on the structure tree, at least one child object targeted by the current business operation solution may be obtained.

[0080] For example, the sub-object corresponding to the node selected by the user can be used as the sub-object targeted by this business operation plan;

[0081] Alternatively, the sub-object corresponding to the node selected by the user and the sub-object corresponding to the sub-node of the selected node can be used as the sub-object targeted by this business operation plan. If the user selects the node corresponding to the root sub-object D1, the root sub-object D1, or one or more sub-objects of D1 and non-root sub-objects D2, D3, and D4 can be used as the sub-object targeted by this business operation plan, that is, it is determined that this business operation plan is used to perform business operations on business object A1; if the user selects the node corresponding to the non-root sub-object D2, the non-root sub-object D2, or the non-root sub-objects D2 and D3 can be used as the sub-object targeted by this business operation plan; if the user selects the node corresponding to the non-root sub-object D3 or D4, it can be determined that this business operation plan is used to perform business operations on non-root sub-objects D3 or D4.

[0082] S604. Obtain operation information input by the user for performing business operations on each sub-object in at least one sub-object. The operation information may include: operation type, for example, create operation (Create), delete operation (Delete), update operation (Update), merge operation (Merge); the operation information may also include: operation parameters, and the operation parameters may include: positioning parameters, attribute parameters of the sub-object, etc.

[0083] The positioning parameters may include object positioning parameters corresponding to the business object A1, and may also include sub-object positioning parameters corresponding to each sub-object.

[0084] In one embodiment, for different sub-objects and / or different operation types, the operation information may include positioning parameters but not attribute parameters; or, the operation information may include attribute parameters but not positioning parameters; or, the operation information may include positioning parameters and attribute parameters.

[0085] In one implementation, based on the database constraint relationship, the object location parameter and each sub-object location parameter may be the same parameter.

[0086] S605: Based on the operation information, a business operation plan F1 for performing a business operation on at least one sub-object in the business object A1 may be created.

[0087] In one implementation, in response to the user selecting the business operation solution F1 as the target business operation solution, parameter values ​​of operation parameters corresponding to the business operation solution F1 input by the user may be acquired, which may include positioning parameter values ​​and / or attribute values.

[0088] Among them, the positioning parameter value may include an object positioning parameter value corresponding to the targeted business object, which is used to obtain a target business object instance uniquely corresponding to the object positioning parameter value from the database; the positioning parameter value may also include: a sub-object positioning parameter value corresponding to each sub-object, and the sub-object positioning parameter value is used to determine a sub-object instance uniquely corresponding to the positioning parameter value from the target business object instance.

[0089] As described above, the operation types may include a create operation (Create), a delete operation (Delete), an update operation (Update), and a merge operation (Merge).

[0090] In the same business operation scheme, business operations of one operation type may be included for the same sub-object, and business operations of the same or different operation types may be included for different sub-objects.

[0091] In the following embodiments, the business operation process of each sub-object is illustrated based on different operation types.

[0092] In order to understand the following embodiments more clearly, we will Figure 2 The four data entities shown are examples, and each embodiment is combined with case data of these data entities to further illustrate the specific operational details of each embodiment. Figure 2 As shown, there are four data entities: user data entity User, driver card data entity DriverLicense, car data entity Car, and vehicle driving card data entity VehicleLicense. Among them, the user data entity User includes four attributes: identification id, name, gender, and identity card idCard; the driver card data entity DriverLicense includes three attributes: identification id, user identification UserId, and driver card number number; the car data entity Car includes three attributes: identification id, user identification UserId, and brand brand; the vehicle driving card data entity VehicleLicense includes three attributes: identification id, car identification CarId, and expiration time dueTime. The data entity also points out the data type of each attribute: long integer Long, string String, enumeration Enum, date Date, etc.; the attributes of the data entity may include: attributes as primary key PK, attributes as unique key UK, and attributes as foreign key FK; such as Figure 2 As shown, the user data entity User is the main entity of the user business object UserBO, and the driving card data entity DriverLicense, the car data entity Car, and the vehicle driving card data entity VehicleLicense are the attribute entities of the user business object UserBO. The user data entity User and the driving card data entity DriverLicense and the car data entity Car are connected through the user identifier UserId as the foreign key FK, that is, the attribute value corresponding to the UserId in the driving card data entity DriverLicense and the car data entity Car is the same as the attribute value corresponding to the identifier id in the user data entity User. An indirect connection is established between the user data entity User and the vehicle driving card data entity VehicleLicense through the car data entity Car. There is a 1:1 relationship between the user data entity User and the driving card data entity DriverLicense, indicating that one user can have one driving card; there is a 1:N relationship between the user data entity User and the car data entity Car, indicating that one user can have multiple cars; there is a 1:1 relationship between the car data entity Car and the vehicle driving card data entity VehicleLicense, indicating that one car has one vehicle driving card. As shown in Figure 2 As shown, for the user business object UserBO, the User sub-object mapped by the user data entity User is the root sub-object, and the Car sub-object mapped by the car data entity Car, the VehicleLicense sub-object mapped by the vehicle driving card data entity VehicleLicense, and the DriverLicense sub-object mapped by the driver card data entity DriverLicense are non-root sub-objects. Figure 2 As shown, assuming Figure 2 The four data entities shown contain the following data respectively:

[0093] User data entity Users:

[0094]

[0095] Driver card data entity DriverLicense:

[0096]

[0097] Car data entity Car:

[0098]

[0099] Vehicle driving card data entity VehicleLicense:

[0100]

[0101] For create operations:

[0102] In one embodiment, a target business operation scheme F11 for a business operation may be defined as a creation operation on a root sub-object D1 of a target business object A1. The service system may obtain parameter values ​​of operation parameters corresponding to the target business operation scheme F11 for performing a business operation on the target business object A1, wherein the target business operation scheme F11 includes a first operation parameter C1 for performing a creation operation on the root sub-object D1 contained in the target business object A1, and the first operation parameter C1 includes a required target attribute S1; the obtained parameter values ​​of the operation parameters corresponding to the target business operation scheme F11 may include attribute values ​​of the target attributes required for the creation operation on D1, that is, the attribute values ​​of C1.

[0103] The service system can construct a target business object instance B1 corresponding to the target business object A1, and assign the attribute value of the target attribute S1 included in the parameter value of the first operation parameter to the target attribute included in the target business object instance B1. Then, optionally, other required modifications can be made to the instance. Then, optionally, the target business object instance B1 can be persisted to the database.

[0104] For example, Figure 2 As shown, the first operation parameter C1 corresponding to the target business operation scheme F11 for performing business operation on the user business object UserBO includes target attributes for creating the user business object UserBO, which may include: name, gender, and identity card; which may be expressed as follows:

[0105] createUser{

[0106] String name;

[0107] String gender;

[0108] String idCard;

[0109] }

[0110] When the service system obtains the parameter value of the first operation parameter; for example, the name is "Wang Wu", the gender is "male", and the ID card is "k9876". The parameter value can be expressed as Json as follows:

[0111] "createUserWangWu":{

[0112] "name":"Wang Wu",

[0113] "gender":"male",

[0114] "idCard":"k9876"

[0115] }

[0116] The service system constructs a new user business object instance and assigns the attribute values ​​corresponding to the name, gender, and ID card to the user business object instance; the generated new user business object instance can be expressed as Json as follows:

[0117] "UserBOWangWu":{

[0118] "name":"Wang Wu",

[0119] "gender":"male",

[0120] "idCard":"k9876"

[0121] "car": []

[0122] }

[0123] Optionally, the system can also persist the new business object instance to the database. If the database user data entity User contains the following data before persistence:

[0124]

[0125] Then after persistence, the database user data entity User contains the following data:

[0126]

[0127] Optionally, the system can also perform other modification operations on the business object instance as needed before persistence, such as adding a unified suffix to the ID card information.

[0128] In one embodiment, the target business operation scheme F12 of the business operation can be defined as a creation operation on the non-root child object D2 of the target business object A1. The service system can obtain the parameter values ​​of the operation parameters corresponding to the target business operation scheme F12 for performing the business operation on the target business object A1, wherein the second operation parameter C2 in the target business operation scheme F12 may include the positioning parameter of the target business object A1 and the target attribute S2 required for the creation operation on the target non-root child object D2 contained in the target business object A1, and the parameter values ​​of the operation parameters corresponding to the target business operation scheme F12 include the positioning parameter value of the target business object A1 and the attribute value of the target attribute S2 required for the creation operation on D2, that is, the attribute value of C2.

[0129] The service system can determine the target business object instance B2, and construct a target non-root sub-object instance B21 corresponding to the target non-root sub-object D2, and assign the corresponding attribute value in the parameter value of the second operation parameter C2 to the target attribute contained in the target non-root sub-object instance B21; then add the target non-root sub-object instance to the target business object instance B2 corresponding to the target non-root sub-object instance; then, optionally, make other modifications to the target business object instance; then, optionally, the target business object instance B2 including the target non-root sub-object instance B21 can be persisted to the database.

[0130] For example, Figure 2 As shown, the second operation parameter C2 corresponding to the target business operation scheme F12 for performing a business operation on the user business object UserBO includes a positioning parameter for performing a positioning operation on UserBO: the id of the User table, and a target attribute S2 for performing a creation operation on the Car sub-object, which may include: brand; which may be expressed as follows:

[0131] createUserCar{

[0132] Long userId; / / Location parameter, corresponding to the id of the User table

[0133] String carBrand; / / Create the brand attributes required for car

[0134] }

[0135] When the service system obtains the parameter value of the second operation parameter; for example: userId is 2, brand is "rr". The parameter value can be expressed as Json as follows:

[0136] "createUser2CarRR":{

[0137] "userId":2,

[0138] "carBrand":"rr",

[0139] }

[0140] The system first locates the userId in the parameter value and constructs the UserBO instance corresponding to id=2 from the database system:

[0141] "userBOID2": {

[0142] "id": 2,

[0143] "name": "Li Si",

[0144] "gender": "female",

[0145] "idCard": "s5678",

[0146] "car": [

[0147] {

[0148] "id": 3,

[0149] "userId": 2,

[0150] "brand": "byd"

[0151] } ]

[0153] }

[0154] Then create an instance of Car using the specific attribute values ​​in the parameter value and add it to the business object instance of UserBO above, and update the object instance to:

[0155] "userBOID2": { / / Modify the user object that has added a new car

[0156] "id": 2,

[0157] "name": "Li Si",

[0158] "gender": "female",

[0159] "idCard": "s5678",

[0160] "car": [

[0161] {

[0162] "id": 3,

[0163] "userId": 2,

[0164] "brand": "byd"

[0165] },

[0166] { / / New car information

[0167] "id": 4,

[0168] "userId": 2,

[0169] "brand": "rr"

[0170] } ]

[0172] }

[0173] Optionally, the system can also persist the new business object instance to the database. If the database user data entity User contains the following data before persistence:

[0174]

[0175] The data entity Car contains the following data:

[0176]

[0177] Then after persistence, the database user data entity User does not change, and the data entity Car contains the following data:

[0178]

[0179] Optionally, the system can also perform other modification operations on the business object instance as needed before persistence.

[0180] For delete operations:

[0181] In one embodiment, the target business operation scheme F13 of the business operation can be defined as a deletion operation on the root child object D1 of the target business object A1. The service system can obtain the parameter values ​​of the operation parameters corresponding to the target business operation scheme F13 for performing the business operation on the target business object A1, wherein the third operation parameter C3 in the target business operation scheme F13 may include the positioning parameter for the target business object A1, and the parameter values ​​of the operation parameters corresponding to the target business operation scheme F13 include the positioning parameter value of the target business object A1, that is, the attribute value of C3.

[0182] The service system can determine the target business object instance B3 and mark the state of the target business object instance B3 as deleted; optionally, the target business object instance B3 can be persisted to the database, which is equivalent to marking the data entity record corresponding to the target business object instance B3 as deleted or deleting it from the database.

[0183] For example, Figure 2 As shown, the third operation parameter C3 corresponding to the target business operation scheme F13 for performing a business operation on the user business object UserBO includes a positioning parameter for performing a positioning operation on UserBO: the id of the User table, which can be expressed as follows:

[0184] deleteUser{

[0185] Long userId; / / Location parameter, corresponding to the id of the User table

[0186] }

[0187] When the service system obtains the parameter value of the third operation parameter, for example, userId is 2. The parameter value can be expressed as Json as follows:

[0188] "deleteUserId2":{

[0189] "userId":2,

[0190] }

[0191] The system can first locate through userId and construct the UserBO instance corresponding to id=2 from the database system and mark it for deletion.

[0192] Optionally, when persisting the instance, the corresponding database record will be deleted. If the database user data entity User contains the following data before persistence:

[0193]

[0194] Then after persistence, the user data entity User contains the following data:

[0195]

[0196] Optionally, the system can also perform other operations on the business object instance as needed before persistence.

[0197] In one embodiment, the target business operation scheme F14 of the business operation can be defined as a deletion operation on the non-root child object D2 of the target business object A1. The service system can obtain the parameter values ​​of the operation parameters corresponding to the target business operation scheme F14 for performing the business operation on the target business object A1, wherein the fourth operation parameter C4 in the target business operation scheme F14 may include a positioning parameter for the target business object A1 and a positioning parameter for the target non-root child object D2, and the parameter values ​​of the operation parameters corresponding to the target business operation scheme F14 include the positioning parameter value for A1 and the positioning parameter value for the target non-root child object D2, that is, the attribute value of C4.

[0198] The service system can determine the target business object instance B4, and locate the target sub-object instance B41 corresponding to D2 in the target business object instance B4 through the positioning parameter value of the non-root sub-object D2, and mark the status of B41 as deleted; optionally, the target business object instance B4 can be persisted to the database after the business operation is completed, which is equivalent to marking the data entity record corresponding to the target sub-object instance B41 as deleted or deleting it from the database.

[0199] Under some database constraints, the positioning parameter of A1 and the positioning parameter of D2 may be the same parameter.

[0200] For example, Figure 2 As shown, the fourth operation parameter C4 corresponding to the target business operation scheme F14 for performing a business operation on the user business object UserBO includes a parameter for performing a positioning operation on User and Car: the id of the Car table, which can be expressed as follows:

[0201] deleteUserCar{

[0202] Long carId; / / Location parameter, corresponding to the id of the Car table

[0203] }

[0204] Since a car belongs to only one user, carId can also be used as a positioning parameter of the User table, that is, a carId will only belong to one User data entity record.

[0205] When the service system obtains the specific value of the fourth operation parameter, for example, carId is 3. The parameter value can be expressed as Json as follows:

[0206] "deleteUserCarId3":{

[0207] "carId":3,

[0208] }

[0209] The system first locates the business object instance corresponding to id 2 in the User data entity through carId as follows:

[0210] "userBOID2": {

[0211] "id": 2,

[0212] "name": "Li Si",

[0213] "gender": "female",

[0214] "idCard": "s5678",

[0215] "car": [

[0216] {

[0217] "id": 3,

[0218] "userId": 2,

[0219] "brand": "byd"

[0220] } ]

[0222] }

[0223] Then use carId 3 to locate the specific Car sub-object, perform the mark deletion operation, and update it to:

[0224] "userBOID2": {

[0225] "id": 2,

[0226] "name": "Li Si",

[0227] "gender": "female",

[0228] "idCard": "s5678",

[0229] "car": []

[0230] }

[0231] Optionally, the system can also persist the new business object instance to the database. If the database user data entity User contains the following data before persistence:

[0232]

[0233] The data entity Car contains the following data:

[0234]

[0235] Then after persistence, the database user data entity User does not change, and the data entity Car contains the following data:

[0236]

[0237] Optionally, the system can also perform other operations on the business object instance as needed before persistence.

[0238] For update operations:

[0239] In one embodiment, the target business operation scheme F15 of the business operation can be defined as an update operation on the root child object D1 of the target business object A1. The service system can obtain the parameter values ​​of the operation parameters corresponding to the target business operation scheme F15 for performing the business operation on the target business object A1, wherein the fifth operation parameter C5 in the target business operation scheme F15 may include the positioning parameter of the target business object A1 and the target attribute S5 required for the update operation on D1, and the parameter values ​​of the operation parameters corresponding to the target business operation scheme F15 include the positioning parameter value of the target business object A1 and the attribute value of the target attribute S5 required for the update operation on D1, that is, the attribute value of C5.

[0240] The service system can determine the target business object instance B5, and assign the attribute value of the target attribute included in the parameter value of the fifth operation parameter to the target attribute included in the target business object instance B5. Then, optionally, other required modifications can be made to the instance. Then, optionally, the target business object instance B5 can be persisted to the database after the business operation is completed.

[0241] For example, Figure 2 As shown, the fifth operation parameter C5 corresponding to the target business operation scheme F15 for performing business operation on the user business object UserBO includes the parameters for performing positioning operation on UserBO: the id of the User table, and the target attribute for performing operation on the User root child object, which may include: gender; which may be expressed as follows:

[0242] updateUserGender{

[0243] Long userId; / / Location parameter, corresponding to the id of the User table

[0244] String gender; / / Update the gender required by User

[0245] }

[0246] When the service system obtains the parameter value of the fifth operation parameter; for example: userId is 2, gender is "male". The parameter value can be expressed as Json as follows:

[0247] "updateUser2Gender":{

[0248] "userId":2,

[0249] "gender":"male",

[0250] }

[0251] The system first locates the UserBO instance corresponding to id=2 from the database system through userId:

[0252] "userBOID2": {

[0253] "id": 2,

[0254] "name": "Li Si",

[0255] "gender": "female",

[0256] "idCard": "s5678",

[0257] "car": [

[0258] {

[0259] "id": 3,

[0260] "userId": 2,

[0261] "brand": "byd"

[0262] } ]

[0264] }

[0265] Then, the corresponding gender attribute in the instance is updated through the specific attribute in the parameter value, and the object instance is updated to:

[0266] "userBOID2": { / / Modify the user object that has added a new car

[0267] "id": 2,

[0268] "name": "Li Si",

[0269] "gender": "male", / / modified gender

[0270] "idCard": "s5678",

[0271] "car": [

[0272] {

[0273] "id": 3,

[0274] "userId": 2,

[0275] "brand": "byd"

[0276] } ]

[0278] }

[0279] Optionally, the system can also persist the new business object instance to the database. If the database user data entity User contains the following data before persistence:

[0280]

[0281] Then after persistence, the database user data entity User contains the following data:

[0282]

[0283] Optionally, the system can also perform other modification operations on the business object instance as needed before persistence.

[0284] In one embodiment, the target business operation scheme F16 of the business operation can be defined as an update operation on the non-root child object D2 of the target business object A1. The service system can obtain the parameter values ​​of the operation parameters corresponding to the target business operation scheme F16 used to perform the business operation on the target business object A1, wherein the sixth operation parameter C6 in the target business operation scheme F16 may include the positioning parameter for the target business object A1, the positioning parameter for the target non-root child object D2, and the target attribute S6 required for the update operation on D2. The parameter values ​​of the operation parameters corresponding to the target business operation scheme F16 include the positioning parameter value of the target business object A1, the positioning parameter value of the target non-root child object D2, and the attribute value of the target attribute S6 required for the update operation on D2, that is, the attribute value of C6.

[0285] The service system can determine the target business object instance B6, and determine the target business sub-object B61 through the positioning parameter value of D2, and assign the attribute value of the target attribute included in the parameter value of the sixth operation parameter to the target attribute included in the target business object instance B61. Then, optionally, other required modifications can be made to the instance. Then, optionally, the target business object instance B6 can be persisted to the database.

[0286] Under some database constraints, the positioning parameter of A1 and the positioning parameter of D2 may be the same parameter.

[0287] For example, Figure 2 As shown, the sixth operation parameter C6 corresponding to the target business operation scheme F16 for performing business operation on the user business object UserBO includes parameters for performing positioning operation on UserBO and the non-root child object Car: the id of the Car table, and the target attribute for performing operation on the non-root child object Car, which may include: brand; which may be expressed as follows:

[0288] updateUserCarBrand{

[0289] Long carId; / / Location parameter, corresponding to the id of the car table

[0290] String brand; / / Update the brand required by user

[0291] }

[0292] When the service system obtains the parameter value of the sixth operation parameter; for example, carId is 3, and the new brand is "ox". The parameter value can be expressed as Json as follows:

[0293] "updateUserCarBrand":{

[0294] "carId":3,

[0295] "brand":"ox",

[0296] }

[0297] Since a car belongs to only one user, carId can also be used as a positioning parameter of the User table, that is, a carId will only belong to one User data entity record.

[0298] The system first locates the business object instance corresponding to id 2 in the User data entity through carId as follows:

[0299] "userBOID2": {

[0300] "id": 2,

[0301] "name": "Li Si",

[0302] "gender": "female",

[0303] "idCard": "s5678",

[0304] "car": [

[0305] {

[0306] "id": 3,

[0307] "userId": 2,

[0308] "brand": "byd"

[0309] } ]

[0311] }

[0312] Then, the specific Car sub-object is located through carId 3, and the brand attribute of the Car sub-object is updated through the specific attributes in the parameter value, and the business object instance is updated to:

[0313] "userBOID2": { / / Modified the user object of the car brand

[0314] "id": 2,

[0315] "name": "Li Si",

[0316] "gender": "female",

[0317] "idCard": "s5678",

[0318] "car": [

[0319] {

[0320] "id": 3,

[0321] "userId": 2,

[0322] "brand": "ox" / / modified brand

[0323] } ]

[0325] }

[0326] Optionally, the system can also persist the new business object instance to the database. If the database user data entity User contains the following data before persistence:

[0327]

[0328] The data entity Car contains the following data:

[0329]

[0330] Then after persistence, the database user data entity User does not change, and the data entity Car contains the following data:

[0331]

[0332] Optionally, the system can also perform other modification operations on the business object instance as needed before persistence.

[0333] For the merge operation:

[0334] In one embodiment, the target business operation scheme F17 of the business operation can be defined as a merge operation on the root child object D1 of the target business object A1. The service system can obtain the parameter values ​​of the operation parameters corresponding to the target business operation scheme F17 for performing the business operation on the target business object A1, wherein the seventh operation parameter C7 in the target business operation scheme F17 may include the positioning parameter of the target business object A1 and the target attribute S7 required for the merge operation on D1, and the parameter values ​​of the operation parameters corresponding to the target business operation scheme F17 include the positioning parameter value of the target business object A1 and the attribute value of the target attribute S7 required for the merge operation on D1, that is, the attribute value of C7.

[0335] In the merge operation, the service system will determine the target business object instance B7 based on whether the location parameter value of the target business object A1 already exists in the data entity. If the data entity already has a corresponding record, B7 will be located from the data entity, otherwise a new target business object instance B7 will be created. That is, when the data corresponding to the location parameter value already exists in the database, the merge operation is essentially an update operation, otherwise it is a create operation.

[0336] The service system can determine the target business object instance B7, and assign the attribute value of the target attribute S7 included in the parameter value of the seventh operation parameter to the target attribute included in the target business object instance B7. Then, optionally, other required modifications can be made to the instance. Then, optionally, the target business object instance B7 can be persisted to the database after the business operation is completed.

[0337] For example, Figure 2 As shown, the seventh operation parameter C7 corresponding to the target business operation scheme F17 for performing business operation on the user business object UserBO includes the parameters for positioning operation on UserBO: the id of the User table, and the target attributes for merging operation on the User root sub-object, which may include: name, gender, and identity card; which may be expressed as follows:

[0338] mergeUser{

[0339] Long userId; / / Location parameter, corresponding to the id of the User table

[0340] String name; / / Merge the name required by User

[0341] String gender; / / Merge the gender required by User

[0342] String idCard; / / Merge the identity card required by User

[0343] }

[0344] When the service system obtains the parameter value of the seventh operation parameter; for example: userId is 2, name is "Li Si", gender is "male", and ID card is "k9876". The parameter value can be expressed as Json as follows:

[0345] " mergeUser2":{

[0346] "userId":2,

[0347] "name": "Li Si",

[0348] "gender":"male",

[0349] "idCard":" k9876"

[0350] }

[0351] The system first locates the UserBO instance with the corresponding id 2 from the database system through userId:

[0352] "userBOID2": {

[0353] "id": 2,

[0354] "name": "Li Si",

[0355] "gender": "female",

[0356] "idCard": "s5678",

[0357] "car": [

[0358] {

[0359] "id": 3,

[0360] "userId": 2,

[0361] "brand": "byd"

[0362] } ]

[0364] }

[0365] Then, the attribute values ​​in the parameter values ​​are assigned to the corresponding name, gender, and ID card attributes in the business object instance, and the business object instance is merged into:

[0366] "userBOID2": {

[0367] "id": 2,

[0368] "name": "Li Si",

[0369] "gender": "male",

[0370] "idCard": " k9876",

[0371] "car": [

[0372] {

[0373] "id": 3,

[0374] "userId": 2,

[0375] "brand": "byd"

[0376] } ]

[0378] }

[0379] Optionally, the system can also persist the new business object instance to the database. If the database user data entity User contains the following data before persistence:

[0380]

[0381] Then after persistence, the database user data entity User contains the following data:

[0382]

[0383] Optionally, the system can also perform other modification operations on the business object instance as needed before persistence.

[0384] For another example, when the service system obtains the parameter value of the seventh operation parameter; for example: userId is 7, name is "He Qi", gender is "female", and ID card is "s8888". The parameter value can be expressed as Json as follows:

[0385] " mergeUser7":{

[0386] "userId":7,

[0387] "name": "He Qi",

[0388] "gender":"female",

[0389] "idCard":"s8888"

[0390] }

[0391] The system first locates the corresponding record in the data entity by userId, and creates a new UserBO instance with id 7:

[0392] "userBOID7": {

[0393] "id": 7,

[0394] "name": "He Qi",

[0395] "gender": "female",

[0396] "idCard": "s8888",

[0397] "car": []

[0398] }

[0399] Optionally, the system can also persist the new business object instance to the database. If the database user data entity User contains the following data before persistence:

[0400]

[0401] Then after persistence, the database user data entity User contains the following data:

[0402]

[0403] Optionally, the system can also perform other modification operations on the business object instance as needed before persistence.

[0404] In one embodiment, the target business operation scheme F18 of the business operation can be defined as a merge operation on the non-root sub-object D2 of the target business object A1. The service system can obtain the parameter values ​​of the operation parameters corresponding to the target business operation scheme F18 for performing the business operation on the target business object A1, wherein the eighth operation parameter C8 in the target business operation scheme F18 may include the positioning parameter of the target business object A1, the positioning parameter of the target business sub-object D2, and the target attribute S8 required for the merge operation on D2. The parameter values ​​of the operation parameters corresponding to the target business operation scheme F18 include the positioning parameter value of the target business object A1, the positioning parameter value of the target business sub-object D2 and the attribute value of the target attribute S8 required for the merge operation on D2, that is, the attribute value of C8.

[0405] During the merge operation, the service system will locate the target business object instance B8 from the data entity based on the positioning parameter value of the target business object A1, and based on the positioning parameter value of the target business sub-object D2, if the data entity already has a corresponding record, the target non-root sub-object instance B81 will be located from the target business object instance B8, otherwise a new target business non-root sub-object instance B81 will be created and added to B8.

[0406] For the target business non-root sub-object instance B81, the attribute value of the target attribute included in the parameter value of the eighth operation parameter is assigned to the target attribute included in the target business non-root sub-object instance B81. Then, optionally, other required modifications can be made to the business object instance. Then, optionally, the target business object instance B8 can be persisted to the database after the business operation is completed.

[0407] For example, Figure 2 As shown, the eighth operation parameter C8 corresponding to the target business operation scheme F18 for performing business operation on the user business object UserBO includes the parameter for performing positioning operation on the business object UserBO: the id of the User table, and the parameter for performing positioning operation on the Car non-root child object: the id of the Car table, and the target attribute for performing merging operation on the Car non-root child object, which may include: brand; which may be expressed as follows:

[0408] mergeUserCar{

[0409] Long userId; / / Location parameter, corresponding to the id of the User table

[0410] Long carId; / / Location parameter, corresponding to the id of the Car table

[0411] String carBrand; / / Merge the brand required by Car

[0412] }

[0413] When the service system obtains the parameter value of the eighth operation parameter; for example: userId is 2, carId is 3, and brand is "xo". The parameter value can be expressed as Json as follows:

[0414] " mergeUser2Car3 ":{

[0415] "userId":2,

[0416] "carId":3,

[0417] "carBrand": "xo"

[0418] }

[0419] The system first locates the UserBO instance with the corresponding id 2 from the database system through userId:

[0420] "userBOID2": {

[0421] "id": 2,

[0422] "name": "Li Si",

[0423] "gender": "female",

[0424] "idCard": "s5678",

[0425] "car": [

[0426] {

[0427] "id": 3,

[0428] "userId": 2,

[0429] "brand": "byd"

[0430] } ]

[0432] }

[0433] And through the positioning parameter carId, locate the existing Car instance of the child non-root object to be merged, and then assign the attribute value of the target attribute in the parameter value to the corresponding target attribute in the object instance: brand, and merge the object instance into:

[0434] "userBOID2": {

[0435] "id": 2,

[0436] "name": "Li Si",

[0437] "gender": "male",

[0438] "idCard": " k9876",

[0439] "car": [

[0440] {

[0441] "id": 3,

[0442] "userId": 2,

[0443] "brand": "xo"

[0444] } ]

[0446] }

[0447] Optionally, the system can also persist the new business object instance to the database. If the database user data entity User contains the following data before persistence:

[0448]

[0449] The data entity Car contains the following data:

[0450]

[0451] Then after persistence, the database user data entity User does not change, and the data entity Car contains the following data:

[0452]

[0453] Optionally, the system can also perform other modification operations on the business object instance as needed before persistence.

[0454] For another example, when the service system obtains the parameter value of the eighth operation parameter, for example, userId is 2, carId is 6, and brand is "po", the parameter value can be expressed as Json as follows:

[0455] " mergeUser2Car6 ":{

[0456] "userId":2,

[0457] "carId":6,

[0458] "carBrand": "po"

[0459] }

[0460] The system first locates the UserBO instance with the corresponding id 2 from the database system through userId:

[0461] "userBOID2": {

[0462] "id": 2,

[0463] "name": "Li Si",

[0464] "gender": "female",

[0465] "idCard": "s5678",

[0466] "car": [

[0467] {

[0468] "id": 3,

[0469] "userId": 2,

[0470] "brand": "byd"

[0471] } ]

[0473] }

[0474] And through the positioning parameter carId, locate the non-root business sub-object instance of the non-root sub-object Car with carId 6, which does not exist, then create the non-root business sub-object instance, merge the corresponding brand attributes and add the non-root business sub-object instance to the previous UserBO instance, and merge the business object instance into:

[0475] "userBOID2": {

[0476] "id": 2,

[0477] "name": "Li Si",

[0478] "gender": "male",

[0479] "idCard": " k9876",

[0480] "car": [

[0481] {

[0482] "id": 3,

[0483] "userId": 2,

[0484] "brand": "xo"

[0485] },

[0486] {

[0487] "id": 6,

[0488] "userId": 2,

[0489] "brand": "po"

[0490] } ]

[0492] }

[0493] Optionally, the system can also persist the new business object instance to the database. If the database user data entity User contains the following data before persistence:

[0494]

[0495] The data entity Car contains the following data:

[0496]

[0497] Then after persistence, the database user data entity User does not change, and the data entity Car contains the following data:

[0498]

[0499] Optionally, the system can also perform other modification operations on the business object instance as needed before persistence.

[0500] Composite operations on multiple sub-objects:

[0501] It should be noted that the composite operation for multiple sub-objects cannot exhaust all possibilities, and the same business object can perform other different types of operation combinations on its different sub-objects according to actual needs. This embodiment only expresses one possible combination relationship.

[0502] In one embodiment, the target business operation scheme F19 of the business operation may be defined as simultaneously updating the root child object D1 of the target business object A1, updating the non-root child object D2, and creating the non-root child object D3, where D3 is a child object of D2. The service system can obtain the parameter values ​​of the operation parameters corresponding to the target business operation scheme F19 for performing business operations on the target business object A1, wherein the ninth operation parameter C9 in the target business operation scheme F19 may include the positioning parameter (object positioning parameter) of the target business object A1, the positioning parameter (non-root sub-object positioning parameter) of the target business sub-object D2, the target attribute S91 required for the update operation on D1, the target attribute S92 required for the update operation on D2, and the target attribute S93 required for the creation operation on D3, and the parameter values ​​of the operation parameters corresponding to the target business operation scheme F19 include the positioning parameter value (object positioning parameter value) of the target business object A1, the positioning parameter value (non-root sub-object positioning parameter value) of the target business sub-object D2, the attribute value of the target attribute S91 required for the update operation on D1, the attribute value of the target attribute S92 required for the update operation on D2, and the attribute value of the target attribute S93 required for the creation operation on D3, that is, the attribute value of C9.

[0503] In this composite operation, the service system locates the business object instance B9 from the data entity according to the positioning parameter value of the target business object A1, and assigns the attribute value of S91 for the update operation on D1 included in the parameter value of the ninth operation parameter to the business root sub-object instance B91 in the business object instance B9, determines the non-root sub-object instance B92 in B9 according to the positioning parameter value of the target business non-root sub-object D2, and assigns the attribute value of S92 for the update operation on D2 included in the parameter value of the ninth operation parameter to the business non-root sub-object instance B92, creates the non-root sub-object instance B93 corresponding to the non-root sub-object D3, and assigns the attribute value of S93 for the create operation on D3 included in the parameter value of the ninth operation parameter to the business non-root sub-object instance B93. And B93 is added to the business non-root sub-object instance B92 of the business object instance B9.

[0504] Then, optionally, other required modifications may be made to the business object instance. Then, optionally, the business object instance B9 may be persisted to the database.

[0505] For example, Figure 2 As shown, the ninth operation parameter C9 corresponding to the target business operation scheme F19 for performing business operation on the user business object UserBO includes the positioning parameter for performing positioning operation on UserBO: the id of the User table, and the positioning parameter for performing positioning operation on the Car non-root sub-object: the id of the Car table, and the target attribute S91 for performing update operation on the User root sub-object, the target attribute S92 for performing update operation on the Car non-root sub-object, and the target attribute S93 for performing creation operation on the VehicleLicense non-root sub-object. The target attribute S91 for updating the User root sub-object may include: name, the target attribute S92 for updating the Car non-root sub-object may include: brand, and the target attribute S93 for creating the VehicleLicense non-root sub-object may include: expiration time; which can be expressed as follows:

[0506] updateUserMulti{

[0507] Long userId; / / Location parameter, corresponding to the id of the User table

[0508] Long carId; / / Location parameter, corresponding to the id of the Car table

[0509] String userName; / / Update the name required by User

[0510] String carBrand; / / Update the brand required by Car

[0511] Date vehicleLicenseDueTime; / / The expiration time required to create a VehicleLicense

[0512] }

[0513] When the service system obtains the parameter value of the ninth operation parameter; for example: userId is 2, carId is 3, name is "Cao Wu", brand is "xo", expiration time is "2099-09-09". The parameter value can be expressed as Json as follows:

[0514] " mergeUser2Car3 ":{

[0515] "userId":2,

[0516] "carId":3,

[0517] "userName": "Cao Wu"

[0518] "carBrand": "xo"

[0519] "vehicleLicenseDueTime ": "2099-09-09"

[0520] }

[0521] The system first locates the UserBO instance with the corresponding id 2 from the database system through userId:

[0522] "userBOID2": {

[0523] "id": 2,

[0524] "name": "Li Si",

[0525] "gender": "female",

[0526] "idCard": "s5678",

[0527] "car": [

[0528] {

[0529] "id": 3,

[0530] "userId": 2,

[0531] "brand": "byd"

[0532] } ]

[0534] }

[0535] Then update the name attribute value in the UserBO instance, and locate the Car non-root sub-object instance to be updated through the positioning parameter carId of the non-root sub-object, and then update the corresponding brand attribute value in the Car non-root sub-object instance through the specific attribute value in the parameter value, and then create a new VehicleLicense non-root sub-object instance, add the business non-root sub-object instance to the Car non-root sub-object instance, and assign the expiration time attribute value in the parameter value to the VehicleLicense non-root sub-object instance. The UserBO instance after the operation is:

[0536] "userBOID2": {

[0537] "id": 2,

[0538] "name": "Cao Wu", / / The updated name

[0539] "gender": "female",

[0540] "idCard": "s5678",

[0541] "car": [

[0542] {

[0543] "id": 3,

[0544] "userId": 2,

[0545] "brand": "xo", / / The updated brand

[0546] "vehicleLicense": { / / Newly created driving card

[0547] "id": 1,

[0548] "carId": 3,

[0549] "dueTime": "2099-09-09"

[0550] }

[0551] } ]

[0553] }

[0554] Optionally, the system can also persist the business object instance to the database. If the database user data entity User contains the following data before persistence:

[0555]

[0556] The data entity Car contains the following data:

[0557]

[0558] The data entity VehicleLicense contains the following data:

[0559]

[0560] Then after persistence, the database user data entity User contains the following data:

[0561]

[0562] The data entity Car contains the following data:

[0563]

[0564] The data entity VehicleLicense contains the following data:

[0565]

[0566] Optionally, the system can also perform other modification operations on the business object instance as needed before persistence.

[0567] It can be found that this composite operation definition can efficiently complete the definition of various meaningful write operation plans for multiple tables in the database.

[0568] It should be noted that the above embodiments are descriptions of principles and are not exhaustive of all possibilities.

[0569] Figure 7 is a schematic structural diagram of a device provided by an exemplary embodiment. Figure 7 At the hardware level, the device includes a processor 702, an internal bus 704, a network interface 706, a memory 708, and a non-volatile memory 710, and may also include hardware required for other functions. One or more embodiments of this specification may be implemented based on software, such as the processor 702 reading the corresponding computer program from the non-volatile memory 710 into the memory 708 and then running it. Of course, in addition to the software implementation, one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0570] Please refer to Figure 8 The operation device 800 for the business object in the service system corresponding to the database can be applied to Figure 7 The device shown in the figure is used to implement the technical solution of this specification. The operation device 800 for the business object in the service system corresponding to the database may include: a parameter input module 801 and a business operation module 802.

[0571] In one embodiment, the parameter input module 801 is used to obtain the parameter value of the operation parameter corresponding to the target business operation scheme for performing a business operation on the target business object; the business operation module 802 is used to determine the target business object instance based on the parameter value of the operation parameter corresponding to the target business operation scheme and the operation type, and perform a business operation corresponding to the operation type on the target business object instance.

[0572] In one implementation, the operation device may further include a persistence module, which is used to persist the target business object instance after the business operation is executed in the database.

[0573] In one embodiment, the operation device may further include an executable code module, which is used to generate an interface definition including operation parameters corresponding to the target business operation solution, and to generate code that complies with the interface definition and is used to implement the target business operation solution.

[0574] In one embodiment, the operation parameters corresponding to the target business operation scheme include positioning parameters; the parameter values ​​of the operation parameters include positioning parameter values; the positioning parameters include object positioning parameters and / or sub-object positioning parameters; the positioning parameter values ​​include object positioning parameter values ​​and / or sub-object positioning parameter values; the object positioning parameter values ​​are used to obtain from the database a target business object instance that uniquely corresponds to the object positioning parameter values; the sub-object positioning parameter values ​​are used to determine from the target business object instance a sub-object instance that uniquely corresponds to the positioning parameter values.

[0575] In one implementation, the operation types include a create operation, a delete operation, an update operation, and a merge operation.

[0576] In one embodiment, the target business operation scheme includes a first operation parameter for performing a creation operation on a root sub-object included in a target business object, wherein the first operation parameter includes a target attribute required to create the target business object; and a parameter value of the first operation parameter includes an attribute value of the target attribute.

[0577] The business operation module 802 is used to construct a new target business object instance corresponding to the target business object, and assign the attribute value of the target attribute included in the parameter value of the first operation parameter to the target attribute included in the target business object instance.

[0578] In one embodiment, the target business operation scheme includes a second operation parameter for performing a creation operation on a target non-root sub-object included in the target business object, the second operation parameter includes a target attribute required to create the target non-root sub-object; a parameter value of the second operation parameter includes an attribute value of the target attribute;

[0579] The business operation module 802 is used to construct a target non-root sub-object instance corresponding to the target non-root sub-object, assign the attribute value of the target attribute included in the parameter value of the second operation parameter to the target attribute contained in the target non-root sub-object instance; and add the target non-root sub-object instance to the target business object instance corresponding to the target non-root sub-object instance.

[0580] In one embodiment, the target business operation scheme includes a third operation parameter for performing a deletion operation on a root child object included in the target business object; the third operation parameter includes an object location parameter; and the parameter value of the third operation parameter includes an object location parameter value;

[0581] The business operation module 802 is used to obtain a target business object instance corresponding to the object location parameter value from the database according to the object location parameter value, and mark the state of the target business object instance as a deletion state.

[0582] In one embodiment, the target business operation scheme includes a fourth operation parameter for performing a deletion operation on a target non-root sub-object included in the target business object; the fourth operation parameter includes an object location parameter and a non-root sub-object location parameter; the parameter value of the fourth operation parameter includes an object location parameter value and a non-root sub-object location parameter value;

[0583] The business operation module 802 is used to obtain from the database, based on the object location parameter value and the non-root sub-object location parameter value, the target business object instance corresponding to the object location parameter value and the target non-root sub-object instance corresponding to the non-root sub-object location parameter value in the business object instance, and mark the status of the target non-root sub-object instance as a deleted status.

[0584] In one embodiment, the target business operation scheme includes a fifth operation parameter for performing an update operation on a root child object included in the target business object; the fifth operation parameter includes an object location parameter and a target attribute to be updated in the target business object; a parameter value of the fifth operation parameter includes an object location parameter value and an attribute value of the target attribute;

[0585] The business operation module 802 is used to obtain a target business object instance corresponding to the object location parameter value from the database according to the object location parameter value, and assign the attribute value of the target attribute included in the parameter value of the fifth operation parameter to the target attribute included in the target business object instance.

[0586] In one embodiment, the target business operation scheme includes a sixth operation parameter for performing an update operation on a target non-root sub-object included in the target business object; the sixth operation parameter includes an object positioning parameter, a non-root sub-object positioning parameter, and a target attribute to be updated in the target non-root sub-object; a parameter value of the sixth operation parameter includes an object positioning parameter value, a non-root sub-object positioning parameter value, and an attribute value of the target attribute;

[0587] The business operation module 802 is used to obtain from the database, based on the object location parameter value and the non-root sub-object location parameter value, the target business object instance corresponding to the object location parameter value and the target non-root sub-object instance corresponding to the non-root sub-object location parameter value in the target business object instance, and assign the attribute value of the target attribute included in the parameter value of the sixth operation parameter to the target attribute contained in the target non-root sub-object instance.

[0588] In one embodiment, the target business operation scheme includes a seventh operation parameter for performing a merge operation on the root sub-objects included in the target business object; the seventh operation parameter includes an object location parameter and a target attribute to be merged in the target business object; a parameter value of the seventh operation parameter includes an object location parameter value and an attribute value of the target attribute;

[0589] The business operation module 802 is used to determine whether there is a target business object instance corresponding to the object location parameter value in the database based on the object location parameter value; if not, perform the creation operation on the target business object instance based on the seventh operation parameter; if yes, perform the update operation on the target business object instance based on the seventh operation parameter.

[0590] In one embodiment, the target business operation scheme includes an eighth operation parameter for performing a merge operation on a target non-root sub-object included in the target business object; the eighth operation parameter includes an object positioning parameter, a non-root sub-object positioning parameter, and a target attribute to be merged in the target non-root sub-object; a parameter value of the eighth operation parameter includes an object positioning parameter value, a non-root sub-object positioning parameter value, and an attribute value of the target attribute;

[0591] The business operation module 802 is used to determine whether the target business object instance corresponding to the object location parameter value in the database contains the target non-root sub-object instance corresponding to the non-root sub-object location parameter value based on the object location parameter value and the non-root sub-object location parameter value; if not, perform the creation operation on the target non-root sub-object instance based on the eighth operation parameter; if yes, perform the update operation on the target non-root sub-object instance based on the eighth operation parameter.

[0592] Fig. 9 The service system is provided as an exemplary embodiment, and the service system may include: an input device 900 and an operation device 800; wherein the input device 900 may be used to input the business operation scheme for performing business operations on the business object as described above; the operation device 800 may be Figure 8 The operating device shown.

[0593] The input device 900 can also be used to input business objects.

[0594] In one implementation, the persistence module and executable code module in the above embodiments may be located in the operating device 800 or the recording device 900, or may be located in the operating device 800 and the recording device 900 respectively and perform corresponding operations, which is not specifically limited in this application.

[0595] Based on the same concept as the above method, this specification also provides an electronic device, including: a processor; a memory for storing processor executable instructions; wherein the processor implements the steps of the method described in any of the above embodiments by running the executable instructions.

[0596] Based on the same concept as the above method, this specification also provides a computer-readable storage medium on which computer instructions are stored. When the instructions are executed by a processor, the steps of the method described in any of the above embodiments are implemented.

[0597] Based on the same concept as the above method, this specification also provides a computer program product, including a computer program / instruction, which implements the steps of the method described in any of the above embodiments when executed by a processor.< / carbo> It should be noted that there is a possible typo in the original text where "Strings gender;" should probably be "String gender;".

Claims

1. A method for operating a business object in a service system corresponding to a database, characterized in that: Applied to the service system, the service system maintains at least one business object and a business operation scheme for performing business operations on the business object; Wherein, the business object is an object created based on several data entities contained in the database and the entity relationship between the several data entities; the data entity includes several attributes; the several data entities mapped by the business object include a main entity and other attribute entities, the main entity and the attribute entity are directly or indirectly connected through a foreign key relationship, and each data entity maps a sub-object in the business object; wherein the sub-object mapped by the main entity is a root sub-object, and the sub-object mapped by the attribute entity is a non-root sub-object; the root sub-object is the sub-object corresponding to the root node in the tree expression of the business object; the business operation scheme includes a group of operation types and corresponding operation parameters for performing business operations on several sub-objects in the business object, wherein each operation type and corresponding operation parameter acts on a sub-object contained in the business object; in the same business operation scheme, a business operation of one operation type is included for the same sub-object, and business operations of the same or different operation types are included for different sub-objects; The method comprises: Obtaining parameter values ​​of operation parameters corresponding to a target business operation solution for performing a business operation on a target business object; Determine a target business object instance based on a parameter value of an operation parameter corresponding to the target business operation scheme and the operation type, and perform a business operation corresponding to the operation type on the target business object instance; Wherein, based on the parameter value of the operation parameter corresponding to the target business operation scheme and the operation type, determining the target business object instance, and performing the business operation corresponding to the operation type on the target business object instance includes: A target business object instance is constructed in the memory, a mapping relationship exists between the target business object instance and a plurality of data entity records having foreign key relationships in the database, and a business operation corresponding to the operation type is performed on the target business object instance according to the parameter value of the operation parameter and the target business operation scheme, and then the target business object instance after the business operation is executed in the memory is persisted to the database.

2. The method according to claim 1, characterized in that The method further comprises: An interface definition including operation parameters corresponding to the target business operation solution is generated, and a code conforming to the interface definition and used to implement the target business operation solution is generated.

3. The method according to claim 1, characterized in that The operation parameters corresponding to the target business operation scheme include positioning parameters; the parameter values ​​of the operation parameters include positioning parameter values; the positioning parameters include object positioning parameters and / or sub-object positioning parameters; the positioning parameter values ​​include object positioning parameter values ​​and / or sub-object positioning parameter values; the object positioning parameter value is used to obtain from the database a target business object instance that uniquely corresponds to the object positioning parameter value; the sub-object positioning parameter value is used to determine from the target business object instance a sub-object instance that uniquely corresponds to the positioning parameter value.

4. The method according to claim 1, characterized in that The operation types include creation operation, deletion operation, update operation and merge operation.

5. The method according to claim 4, characterized in that The target business operation scheme includes a first operation parameter for performing a creation operation on a root sub-object included in a target business object, wherein the first operation parameter includes a target attribute required to create the target business object; and a parameter value of the first operation parameter includes an attribute value of the target attribute. The determining a target business object instance based on the parameter value of the operation parameter corresponding to the target business operation scheme and the operation type, and performing a business operation corresponding to the operation type on the target business object instance includes: A new target business object instance corresponding to the target business object is constructed, and the attribute value of the target attribute included in the parameter value of the first operation parameter is assigned to the target attribute included in the target business object instance.

6. The method according to claim 4, characterized in that The target business operation scheme includes a second operation parameter for performing a creation operation on a target non-root sub-object included in the target business object, wherein the second operation parameter includes a target attribute required to create the target non-root sub-object; and a parameter value of the second operation parameter includes an attribute value of the target attribute; The determining a target business object instance based on the parameter value of the operation parameter corresponding to the target business operation scheme and the operation type, and performing a business operation corresponding to the operation type on the target business object instance includes: Constructing a target non-root sub-object instance corresponding to the target non-root sub-object, and assigning the attribute value of the target attribute included in the parameter value of the second operation parameter to the target attribute included in the target non-root sub-object instance; The target non-root sub-object instance is added to the target business object instance corresponding to the target non-root sub-object instance.

7. The method according to claim 4, characterized in that The target business operation scheme includes a third operation parameter for performing a deletion operation on a root child object included in the target business object; the third operation parameter includes an object positioning parameter; and the parameter value of the third operation parameter includes an object positioning parameter value; The determining a target business object instance based on the parameter value of the operation parameter corresponding to the target business operation scheme and the operation type, and performing a business operation corresponding to the operation type on the target business object instance includes: According to the object location parameter value, a target business object instance corresponding to the object location parameter value is acquired from the database, and a state of the target business object instance is marked as a deletion state.

8. The method according to claim 4, characterized in that The target business operation scheme includes a fourth operation parameter for performing a deletion operation on a target non-root sub-object included in the target business object; the fourth operation parameter includes an object location parameter and a non-root sub-object location parameter; the parameter value of the fourth operation parameter includes an object location parameter value and a non-root sub-object location parameter value; The determining a target business object instance based on the parameter value of the operation parameter corresponding to the target business operation scheme and the operation type, and performing a business operation corresponding to the operation type on the target business object instance includes: According to the object location parameter value and the non-root sub-object location parameter value, the target business object instance corresponding to the object location parameter value and the target non-root sub-object instance corresponding to the non-root sub-object location parameter value in the business object instance are obtained from the database, and the state of the target non-root sub-object instance is marked as a deleted state.

9. The method according to claim 4, characterized in that The target business operation scheme includes a fifth operation parameter for performing an update operation on a root sub-object included in the target business object; the fifth operation parameter includes an object location parameter and a target attribute to be updated in the target business object; a parameter value of the fifth operation parameter includes an object location parameter value and an attribute value of the target attribute; The determining a target business object instance based on the parameter value of the operation parameter corresponding to the target business operation scheme and the operation type, and performing a business operation corresponding to the operation type on the target business object instance includes: According to the object location parameter value, a target business object instance corresponding to the object location parameter value is acquired from the database, and the attribute value of the target attribute included in the parameter value of the fifth operation parameter is assigned to the target attribute included in the target business object instance.

10. The method according to claim 4, characterized in that The target business operation scheme includes a sixth operation parameter for performing an update operation on a target non-root sub-object included in the target business object; the sixth operation parameter includes an object positioning parameter, a non-root sub-object positioning parameter, and a target attribute to be updated in the target non-root sub-object; a parameter value of the sixth operation parameter includes an object positioning parameter value, a non-root sub-object positioning parameter value, and an attribute value of the target attribute; The determining a target business object instance based on the parameter value of the operation parameter corresponding to the target business operation scheme and the operation type, and performing a business operation corresponding to the operation type on the target business object instance includes: According to the object location parameter value and the non-root sub-object location parameter value, the target business object instance corresponding to the object location parameter value and the target non-root sub-object instance corresponding to the non-root sub-object location parameter value in the target business object instance are obtained from the database, and the attribute value of the target attribute included in the parameter value of the sixth operation parameter is assigned to the target attribute contained in the target non-root sub-object instance.

11. The method according to claim 4, characterized in that The target business operation scheme includes a seventh operation parameter for performing a merging operation on the root sub-objects included in the target business object; the seventh operation parameter includes an object location parameter and a target attribute to be merged in the target business object; The parameter value of the seventh operation parameter includes the object positioning parameter value and the attribute value of the target attribute; The determining a target business object instance based on the parameter value of the operation parameter corresponding to the target business operation scheme and the operation type, and performing a business operation corresponding to the operation type on the target business object instance includes: Determining, according to the object location parameter value, whether there is a target business object instance corresponding to the object location parameter value in the database; If not, the create operation is performed on the target business object instance based on the seventh operation parameter; if so, the update operation is performed on the target business object instance based on the seventh operation parameter.

12. The method according to claim 4, characterized in that The target business operation scheme includes an eighth operation parameter for performing a merge operation on a target non-root sub-object included in the target business object; the eighth operation parameter includes an object positioning parameter, a non-root sub-object positioning parameter, and a target attribute to be merged in the target non-root sub-object; a parameter value of the eighth operation parameter includes an object positioning parameter value, a non-root sub-object positioning parameter value, and an attribute value of the target attribute; The determining a target business object instance based on the parameter value of the operation parameter corresponding to the target business operation scheme and the operation type, and performing a business operation corresponding to the operation type on the target business object instance includes: Based on the object location parameter value and the non-root sub-object location parameter value, determine whether the target business object instance corresponding to the object location parameter value in the database contains the target non-root sub-object instance corresponding to the non-root sub-object location parameter value; if not, perform the creation operation on the target non-root sub-object instance based on the eighth operation parameter; if so, perform the update operation on the target non-root sub-object instance based on the eighth operation parameter.

13. An operating device for a business object in a service system corresponding to a database, characterized in that: include: A parameter input module, used to obtain parameter values ​​of operation parameters corresponding to a target business operation scheme for performing a business operation on a target business object; A business operation module, used to determine a target business object instance based on a parameter value of an operation parameter corresponding to the target business operation scheme and an operation type, and perform a business operation corresponding to the operation type on the target business object instance; The business operation module is used to determine the target business object instance based on the parameter value of the operation parameter corresponding to the target business operation scheme and the operation type, and perform the business operation corresponding to the operation type on the target business object instance, including: Constructing a target business object instance in the memory, wherein a mapping relationship exists between the target business object instance and a plurality of data entity records having a foreign key relationship in the database, and performing a business operation corresponding to the operation type on the target business object instance according to the parameter value of the operation parameter and the target business operation scheme, and then persisting the target business object instance after the business operation is performed in the memory to the database; The business object is an object created based on several data entities contained in the database and the entity relationship between the several data entities; the data entity includes several attributes; the several data entities mapped by the business object include a main entity and other attribute entities, the main entity and the attribute entity are directly or indirectly connected through a foreign key relationship, and each data entity maps a sub-object in the business object; wherein the sub-object mapped by the main entity is a root sub-object, and the sub-object mapped by the attribute entity is a non-root sub-object; the root sub-object is the sub-object corresponding to the root node in the tree expression of the business object; the business operation scheme includes a group of operation types and corresponding operation parameters for performing business operations on several sub-objects in the business object, wherein each operation type and corresponding operation parameter acts on a sub-object contained in the business object; in the same business operation scheme, a business operation of one operation type is included for the same sub-object, and business operations of the same or different operation types are included for different sub-objects.

14. A service system, characterized in that: include: An input device and an operating device as claimed in claim 13; Wherein, the input device is used to input a business operation plan for performing business operations on the business object.

15. An electronic device, characterized in that: include: processor; A memory for storing processor-executable instructions; wherein the processor implements the steps of the method according to any one of claims 1 to 12 by executing the executable instructions.

16. A computer-readable storage medium, characterized in that: Computer instructions are stored thereon, and when the instructions are executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.

17. A computer program product, characterized in that The method comprises a computer program / instruction, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Data operation method and device based on low-code framework, equipment and medium

    CN117632309A