CN110826307A - Method and device for creating business object - Google Patents

Method and device for creating business object Download PDF

Info

Publication number
CN110826307A
CN110826307A CN201911050372.4A CN201911050372A CN110826307A CN 110826307 A CN110826307 A CN 110826307A CN 201911050372 A CN201911050372 A CN 201911050372A CN 110826307 A CN110826307 A CN 110826307A
Authority
CN
China
Prior art keywords
field
business object
mapping rule
creating
business
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911050372.4A
Other languages
Chinese (zh)
Inventor
郑海波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201911050372.4A priority Critical patent/CN110826307A/en
Publication of CN110826307A publication Critical patent/CN110826307A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0633Lists, e.g. purchase orders, compilation or processing
    • G06Q30/0635Processing of requisition or of purchase orders

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the disclosure provides a method and a device for creating a business object, wherein the method comprises the following steps: the method comprises the steps of receiving a creating request of a first business object, obtaining an object mapping rule of at least one field of the first business object according to the creating request, and creating the first business object according to the object mapping rule.

Description

Method and device for creating business object
Technical Field
The embodiment of the disclosure relates to the technical field of data processing, in particular to a method and equipment for creating a business object.
Background
In a real service scene, there are dependencies and associations between services, and after a service is finished, the service will continue to the next service scene, for example, after a contract is made, an order is placed, and then payment is made for the order, and then delivery is performed.
In the prior art, a logical relationship between an upstream service and a downstream service is created in a hard coding manner, so as to generate data of a relevant field in the downstream service according to data of the upstream service.
However, the above method has problems that when the service changes, which causes the mapping logic of the field to change, a large amount of code needs to be modified to implement the new field mapping logic, which is labor-intensive and error-prone.
Disclosure of Invention
The embodiment of the disclosure provides a method and a device for creating a business object, so as to overcome the problems of large workload and high error probability in creating the business object in the prior art, thereby improving the working efficiency and reducing the error rate.
In a first aspect, an embodiment of the present disclosure provides a method for creating a business object, including:
receiving a creating request of a first business object; the creation request comprises field information of the first business object;
acquiring an object mapping rule of at least one field of the first service object according to the creation request;
and creating the first business object according to the object mapping rule.
In a second aspect, an embodiment of the present disclosure provides a device for creating a business object, including:
the receiving module is used for receiving a creating request of a first business object; the creation request comprises field information of the first business object;
an obtaining module, configured to obtain an object mapping rule of at least one field of the first service object according to the creation request;
and the creating module is used for creating the first business object according to the object mapping rule.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executes computer-executable instructions stored by the memory to cause the at least one processor to perform the method of creating a business object as set forth in the first aspect and various possible designs of the first aspect above.
In a fourth aspect, the present disclosure provides a computer-readable storage medium, where computer-executable instructions are stored, and when a processor executes the computer-executable instructions, the method for creating a business object according to the first aspect and various possible designs of the first aspect is implemented.
The method for creating the business object and the device thereof provided by the embodiment of the disclosure include that a creating request of a first business object is received, an object mapping rule of at least one field of the first business object is obtained according to the creating request, and the first business object is created according to the object mapping rule.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present disclosure, and for those skilled in the art, other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is an application scenario provided by an embodiment of the present disclosure;
fig. 2 is a first flowchart illustrating a method for creating a business object according to an embodiment of the present disclosure;
fig. 3 is a schematic flow chart of a method for creating a business object according to an embodiment of the present disclosure;
fig. 4 is a block diagram of a service object creating device according to an embodiment of the present disclosure;
fig. 5 is a schematic hardware structure diagram of a business object creating device according to an embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some, but not all embodiments of the present disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
Referring to fig. 1, fig. 1 is an application scenario provided in the embodiment of the present disclosure. In a real-life business scenario, there are dependencies and associations between businesses. As shown in fig. 1, there is an association between the two services of ordering and shipping. Some or all of the fields of the invoice 102 may be generated from the data of the order 101. Specifically, after the user completes the order, the shipment service is performed, that is, the order service and the shipment service are related to the upstream and downstream services. The order form 101 generated in the order service and the shipment form 102 generated in the shipment service may have the same fields. For example, the order form 101 and the invoice 102 may each include fields for unit price of the item, name of the item, supplier, etc.
When generating a data table (e.g., the invoice 102) of a downstream service (e.g., a downstream service of which the shipment service is an order service) based on the correlation between different services, in the prior art, an operation of copying and pasting data of the data table of the upstream service may be adopted. And filling the content in the upstream service data table into the corresponding field in the downstream service data table. For example, fields such as unit price of the item, item name, and supplier in the order form 101 are copied and pasted to corresponding fields in the out-manifest 102. Specifically, the code may use a get statement to read data from a certain field in the order form 101, and use a set statement to write the read data into a corresponding field in the invoice 102. However, the copy and paste method is heavy in workload, low in efficiency and easy to make mistakes; by adopting a hard coding mode, when the service is changed or more fields are added during system upgrading, the mapping relation between the fields of the associated service is changed, the code needs to be modified, and the fields are relocated and then on-line, so that the workload is large and the efficiency is low. Based on this, the embodiments of the present disclosure provide a method for creating a business object, which can reduce workload and improve work efficiency and accuracy.
Referring to fig. 2, fig. 2 is a first flowchart illustrating a method for creating a business object according to an embodiment of the present disclosure. The method of the embodiment of the disclosure can be applied to terminal equipment or a server, and the method for creating the service object comprises the following steps:
201. receiving a creating request of a first business object; the create request includes field information for the first business object.
In an embodiment of the present disclosure, the request for creating the first business object includes field identifications of fields of the first business object. The field identifier may be a sequence number or a field name. The present disclosure is not intended to be limiting in any way.
For example, the shipment list includes fields of unit price of the product, product name and supplier, and the field identifications of the three fields may be 0001, 0002 and 0003, respectively, and also may be unit price of the product, product name and supplier, respectively.
202. And acquiring an object mapping rule of at least one field of the first service object according to the creation request.
In the embodiment of the present disclosure, the object mapping rule refers to a mapping relationship between different fields. The different fields may be between one field and another field, or between one field and another plurality of fields. The sources of the different fields may be from different business objects respectively, or from the same business object. The present disclosure is not limited in any way.
Optionally, the object mapping rule may be stored in an object mapping rule table, and the object mapping rule table may record mapping relationships between fields among all services having an association relationship according to user requirements.
For example, taking the first business object as the shipment order as an example, as shown in table 1, the shipment order includes a shipment unit price field, as shown in table 2, the order includes a unit price field, and it can be understood that the shipment unit price is the same as the unit price of the product. That is, there is a mapping relationship between the shipment unit price field of the shipment order and the unit price field of the goods in the order form. The object mapping rule of the shipment unit price field of the shipment order may be recorded such that the value of the shipment unit price field of the shipment order is equal to the value of the item unit price field of the order. I.e. the invoice after the data filling shown in table 3.
TABLE 1 delivery order
Serial number Name of commodity Delivery unit price Number of shipment Amount of shipment
1
2
3
TABLE 2 order form
Serial number Name of commodity Price per unit of goods Number of commodities
1 First commodity 10 2
2 Second commodity 20 3
3 Third merchandise item 30 2
TABLE 3 delivery order
Serial number Name of commodity Delivery unit price Number of shipment Amount of shipment
1 10
2 20
3 30
203. And creating the first business object according to the object mapping rule.
In the embodiments of the present disclosure, the object mapping rule may include various forms of mapping relationships.
In a possible implementation manner, the object mapping rule includes a mapping relationship between a first field of the first business object and a second field of a second business object; the creating the first business object according to the object mapping rule includes:
and acquiring the numerical value of the second field, and taking the numerical value of the second field as the numerical value of the first field.
Specifically, the following are illustrated in table 1 and table 2. Assume that the first business object is the shipment order shown in table 1, the first field is the shipment quantity field of the shipment order, the second business object is the order shown in table 2, and the second field is the commodity quantity field of the order. It is understood that the shipment quantity of the shipment order is the same as the commodity quantity of the order, i.e. the mapping relationship between the first field and the second field is an equal relationship. For example, the mapping relationship between the commodity quantity and the shipment quantity may be expressed as: order form, quantity of goods → delivery form, quantity of delivery. Thus, the numerical value of the shipment quantity of the shipment order can be directly read and written into the numerical value of the top quantity of the order. As shown in the table 4 below, the following examples,
TABLE 4 delivery order
Serial number Name of commodity Delivery unit price Number of shipment Amount of shipment
1 2
2 3
3 2
In another possible implementation manner, the object mapping rule includes a mapping relationship between a third field of the first business object and at least one field of a second business object; the creating the first business object according to the object mapping rule includes:
obtaining a numerical value of the at least one field;
and generating the numerical value of the third field according to the relation between the third field and the at least one field and the numerical value of the at least one field.
Specifically, there is a case where a relational expression exists between a third field of the first service object and a field of the second service object, for example, the value of the third four segments is a result of an operation performed on the field of the second service object and a constant. The operation may be different operations such as addition, subtraction, multiplication, division, and exponentiation.
For example, the shipment unit price of the shipment order and the commodity cost price of the shipment order are 1.8 times in relation to each other. That is, the shipment unit price of the shipment order is the product cost price of the shipment order multiplied by 1.8.
In another case, there is a relation between the third field of the first business object and the two fields of the second business object, that is, the value of the third field is the result of the operations of addition, subtraction, multiplication, division and the like performed on the two fields of the second business object. For example, the following are illustrated in table 1 and table 2. It is assumed that the first business object is a shipment order shown in table 1, the third field is a shipment amount field of the shipment order, the second business object is an order shown in table 2, and at least one field of the second business object is two fields of a unit price of goods and a quantity of goods. It is understood that the shipping amount of the shipping manifest is the product of the unit price of the goods and the number of the goods in the order form. For example, the mapping relationship between the shipping amount field of the shipping order and the quantity of goods and shipping amount field of the order may be expressed as: order sheet, number of products, order sheet, unit price of product → delivery sheet, number of products delivered. Therefore, the shipment quantity of the shipment order may be a value obtained by multiplying the product of the number of commodities and the unit price of the commodity read from the order in accordance with the object mapping rule. As shown in the table 5 below, the following examples,
TABLE 5 delivery order
Serial number Name of commodity Delivery unit price Number of shipment Amount of shipment
1 20
2 60
3 60
Of course, if the shipping unit price and the shipping quantity field exist in the shipping bill at the same time, the value of the shipping amount can also be obtained by multiplying the shipping unit price and the shipping quantity.
It will be appreciated that there is also a case where there is a relationship between the third field of the first business object and three or more fields of the second business object. And will not be described in detail herein.
In another possible implementation manner, the object mapping rule includes a mapping relationship between a fourth field of the first business object and a system variable; the creating the first business object according to the object mapping rule includes:
and acquiring the numerical value of the system variable, and taking the current numerical value of the system variable as the numerical value of the fourth field.
In practice, there are fields associated with system variables in the business object, for example, the order time field of the order form may be assigned a current time of the system time. That is, the object mapping rule of the order time is obtained before the order time of the order is written, and the object mapping rule indicates that the current time of the system time is assigned to the order time field of the order.
In another possible implementation manner, the object mapping rule includes a mapping relationship between a fifth field of the first business object and a constant; the creating the first business object according to the object mapping rule includes:
and acquiring the value of the system variable, and taking the value of the constant as the value of the fifth field.
In practice, there are some fields associated with the constants in the business object, for example, the operator of the order is a fixed worker, and then the operator field of the order can be fixed as the name of the worker. For another example, the generation types of the order are distinguished, wherein 1 represents that the order is automatically generated by the system, and 0 represents that the order is manually filled and generated. That is, the generation type of the order sheet is given 1 or 0 according to the actual situation.
The object mapping rules in various forms can completely replace a hard-coded implementation mode, automatically created logic codes for new business objects in common business order generation services are abstracted into the object mapping rules, the codes are not required to be modified, and the matching of new business logic can be completed only by modifying the mapping rules on line.
As can be seen from the above description, in the embodiment of the present disclosure, a creation request of a first business object is received, an object mapping rule of at least one field of the first business object is obtained according to the creation request, and the first business object is created according to the object mapping rule. The business association between the business objects can be reflected according to the object mapping rule, and when the business association changes, the object mapping rule is updated without modifying codes, so that the workload is saved, the working efficiency is improved, and the flexibility of creating the business objects is enhanced.
In an embodiment of the present disclosure, on the basis of the embodiment of fig. 2, in order to flexibly implement different business logics of multiple tenants, in the embodiment of the present disclosure, a solution is provided for a multi-tenant system, and a set of object mapping rule sets is established for each tenant, specifically, the method specifically includes:
in a multi-tenant system, each object mapping rule is subordinate to a single tenant.
Alternatively, in a multi-tenant system, one object mapping rule table may be established for each tenant.
In practical applications, the Software system in the cloud Service may include a plurality of tenants for use, such as a Software-as-a-Service (SaaS) system. All tenants in the system are supplied with a set of hard codes. For newly added tenants, the hard code needs to be modified to meet the requirements of the newly added tenants, so the maintenance of the code generates a large workload, and frequent modification of the code is highly prone to errors. Based on this, the method for creating a service object provided by the embodiment of the present disclosure provides a set of object mapping rules for each tenant, that is, each tenant maintains a set of object mapping rules, and when a service logic changes, only the object mapping rules need to be modified, and operations of modifying, redeploying, and online of hard codes are not required. Isolation among the tenants is achieved, workload is reduced, and accuracy is improved.
In a multi-tenant SaaS system, a set of codes serves all tenants, code modification can affect all the tenants, bug easily occurs, an object mapping rule configured by an administrator is subordinate to the tenant, no influence is caused on other tenants, and the mode of the mapping rule is more reliable.
As can be seen from the above description, the service object creation method and the hard code provided in the embodiment of the present disclosure are different, a specific object mapping rule is subordinate to a certain tenant, in a multi-tenant SaaS system, different tenants can freely configure their own object mapping rules without affecting other tenants, the same set of codes is provided for all tenants in the SaaS system, and modifying the codes affects all tenants. Thus, the approach by employing object mapping rules is far more flexible than hard coding.
Referring to fig. 3, fig. 3 is a schematic flowchart of a second method for creating a business object according to an embodiment of the present disclosure. The establishment of the object mapping rule is explained in detail in the embodiment of the disclosure, and the method for creating the service object comprises the following steps:
301. establishing an object mapping rule table; the object mapping rule table includes an object mapping rule between at least one field in the first business object and at least one field of a second business object.
In the embodiment of the present disclosure, the object mapping rule table may include a relational expression representing a mapping relationship between fields, that is, a value is assigned to a field of a service object to be created through a formula. Optionally, the language for writing the formula may be a scripting language such as JavaScript, Groovy, Python, Ruby, and the like, and the program is internally provided with a script parsing service to calculate the formula.
The logic of automatically creating a new object through the business association relation is abstracted into a configurable rule, the problem that codes are frequently modified due to a traditional hard coding mode is solved, the mode of mapping the rule is more flexible, the new business is matched through the configuration rule, the new business takes effect in time after configuration, the traditional hard coding mode needs links of development, testing, online and verification, the process is long and uncontrollable, and the mode of mapping the rule is more timely.
302. Receiving a creating request of a first business object; the create request includes field information for the first business object.
303. And acquiring an object mapping rule of at least one field of the first service object according to the creation request.
304. And creating the first business object according to the object mapping rule.
Steps 302 to 304 in the present disclosure embodiment are similar to steps 201 to 203 in the above disclosure embodiment, and are not described again here.
As can be seen from the above description, the method for creating a business object provided in this embodiment of the disclosure, by pre-establishing an object mapping rule table indicating mapping relationships between different fields, when creating a business object, can obtain appropriate data from a related business object according to a field of the business object to be created and assign a value to the field, and when a business relationship changes, can be implemented conveniently by modifying a corresponding object mapping rule in the object mapping rule table without modifying a code.
Corresponding to the method for creating a business object in the foregoing embodiment, fig. 4 is a block diagram of a business object creating device provided in the embodiment of the present disclosure. For ease of illustration, only portions that are relevant to embodiments of the present disclosure are shown. Referring to fig. 4, the apparatus 40 includes: a receiving module 401, an obtaining module 402 and a creating module 403.
The receiving module 401 is configured to receive a request for creating a first business object; the creation request comprises field information of the first business object;
an obtaining module 402, configured to obtain an object mapping rule of at least one field of the first service object according to the creation request;
a creating module 403, configured to create the first business object according to the object mapping rule.
In one embodiment of the present disclosure, the object mapping rule includes a mapping relationship between a first field of the first business object and a second field of a second business object; the creating module 403 is specifically configured to:
and acquiring the numerical value of the second field, and taking the numerical value of the second field as the numerical value of the first field.
In one embodiment of the present disclosure, the object mapping rule includes a mapping relationship between a third field of the first business object and at least one field of a second business object; the creating module 403 is specifically configured to:
obtaining a numerical value of the at least one field;
and generating the numerical value of the third field according to the relation between the third field and the at least one field and the numerical value of the at least one field.
In one embodiment of the present disclosure, the object mapping rule includes a mapping relationship between a fourth field of the first business object and a system variable; the creating module 403 is specifically configured to:
and acquiring the numerical value of the system variable, and taking the current numerical value of the system variable as the numerical value of the fourth field.
In one embodiment of the present disclosure, the object mapping rule includes a mapping relationship between a fifth field of the first business object and a constant; the creating module 403 is specifically configured to:
and acquiring the value of the system variable, and taking the value of the constant as the value of the fifth field.
In one embodiment of the present disclosure, the apparatus further comprises: an establishing module 404, configured to establish an object mapping rule table before the object mapping rule of each field of the first service object is obtained according to the creating request; the object mapping rule table includes an object mapping rule between at least one field in the first business object and at least one field of a second business object.
Correspondingly, the obtaining module 402 is specifically configured to search, according to the creation request, an object mapping rule of at least one field of the first service object from the object mapping rule table.
In one embodiment of the present disclosure, in a multi-tenant system, each object mapping rule is subject to a single tenant.
The device provided by the embodiment of the present disclosure may be used to implement the technical solution of the above method embodiment, and the implementation principle and technical effect are similar, which are not described herein again in the embodiment of the present disclosure.
Referring to fig. 5, a schematic structural diagram of an electronic device 500 suitable for implementing the embodiment of the present disclosure is shown, where the electronic device 500 may be a terminal device or a server. Among them, the terminal Device may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a Digital broadcast receiver, a Personal Digital Assistant (PDA), a tablet computer (PAD), a Portable Multimedia Player (PMP), a car terminal (e.g., car navigation terminal), etc., and a fixed terminal such as a Digital TV, a desktop computer, etc. The electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 5, the electronic device 500 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 501 that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the electronic apparatus 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
Generally, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 507 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 508 including, for example, magnetic tape, hard disk, etc.; and a communication device 509. The communication means 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. While fig. 5 illustrates an electronic device 500 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 509, or installed from the storage means 508, or installed from the ROM 502. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing device 501.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to perform the methods shown in the above embodiments.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of Network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the first retrieving unit may also be described as a "unit for retrieving at least two internet protocol addresses".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
In a first aspect, according to one or more embodiments of the present disclosure, a method for creating a business object is provided, including:
receiving a creating request of a first business object; the creation request comprises field information of the first business object;
acquiring an object mapping rule of at least one field of the first service object according to the creation request;
and creating the first business object according to the object mapping rule.
According to one or more embodiments of the present disclosure, the object mapping rule includes a mapping relationship between a first field of the first business object and a second field of a second business object; the creating the first business object according to the object mapping rule includes: and acquiring the numerical value of the second field, and taking the numerical value of the second field as the numerical value of the first field.
According to one or more embodiments of the present disclosure, the object mapping rule includes a mapping relationship between a third field of the first business object and at least one field of a second business object; the creating the first business object according to the object mapping rule includes: obtaining a numerical value of the at least one field; and generating the numerical value of the third field according to the relation between the third field and the at least one field and the numerical value of the at least one field.
According to one or more embodiments of the present disclosure, the object mapping rule includes a mapping relationship between a fourth field of the first business object and a system variable; the creating the first business object according to the object mapping rule includes: and acquiring the numerical value of the system variable, and taking the current numerical value of the system variable as the numerical value of the fourth field.
According to one or more embodiments of the present disclosure, the object mapping rule includes a mapping relationship between a fifth field of the first business object and a constant; the creating the first business object according to the object mapping rule includes: and acquiring the value of the system variable, and taking the value of the constant as the value of the fifth field.
According to one or more embodiments of the present disclosure, before the obtaining, according to the creation request, the object mapping rule of each field of the first service object, the method further includes:
establishing an object mapping rule table; the object mapping rule table comprises an object mapping rule between at least one field in the first business object and at least one field of a second business object;
correspondingly, the obtaining an object mapping rule of at least one field of the first service object according to the creation request includes:
and according to the creation request, searching an object mapping rule of at least one field of the first business object from the object mapping rule table.
According to one or more embodiments of the present disclosure, in a multi-tenant system, each object mapping rule is subordinate to a single tenant.
In a second aspect, according to one or more embodiments of the present disclosure, there is provided a business object creating apparatus, including:
a receiving module 401, configured to receive a request for creating a first business object; the creation request comprises field information of the first business object;
an obtaining module 402, configured to obtain an object mapping rule of at least one field of the first service object according to the creation request;
a creating module 403, configured to create the first business object according to the object mapping rule.
According to one or more embodiments of the present disclosure, the object mapping rule includes a mapping relationship between a first field of the first business object and a second field of a second business object; the creating module 403 is specifically configured to: and acquiring the numerical value of the second field, and taking the numerical value of the second field as the numerical value of the first field.
According to one or more embodiments of the present disclosure, the object mapping rule includes a mapping relationship between a third field of the first business object and at least one field of a second business object; the creating module 403 is specifically configured to:
obtaining a numerical value of the at least one field;
and generating the numerical value of the third field according to the relation between the third field and the at least one field and the numerical value of the at least one field.
According to one or more embodiments of the present disclosure, the object mapping rule includes a mapping relationship between a fourth field of the first business object and a system variable; the creating module 403 is specifically configured to:
and acquiring the numerical value of the system variable, and taking the current numerical value of the system variable as the numerical value of the fourth field.
According to one or more embodiments of the present disclosure, the object mapping rule includes a mapping relationship between a fifth field of the first business object and a constant; the creating module 403 is specifically configured to:
and acquiring the value of the system variable, and taking the value of the constant as the value of the fifth field.
According to one or more embodiments of the present disclosure, the apparatus further comprises: an establishing module 404, configured to establish an object mapping rule table before the object mapping rule of each field of the first service object is obtained according to the creating request; the object mapping rule table includes an object mapping rule between at least one field in the first business object and at least one field of a second business object.
Correspondingly, the obtaining module 402 is specifically configured to search, according to the creation request, an object mapping rule of at least one field of the first service object from the object mapping rule table.
According to one or more embodiments of the present disclosure, in a multi-tenant system, each object mapping rule is subordinate to a single tenant.
In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device including: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executes computer-executable instructions stored by the memory to cause the at least one processor to perform the method of creating a business object as set forth in the first aspect and various possible designs of the first aspect above.
In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, the method for creating a business object according to the first aspect and various possible designs of the first aspect is implemented.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (10)

1. A method for creating a business object, comprising:
receiving a creating request of a first business object; the creation request comprises field information of the first business object;
acquiring an object mapping rule of at least one field of the first service object according to the creation request;
and creating the first business object according to the object mapping rule.
2. The method of claim 1, wherein the object mapping rule comprises a mapping relationship between a first field of the first business object and a second field of a second business object; the creating the first business object according to the object mapping rule includes:
and acquiring the numerical value of the second field, and taking the numerical value of the second field as the numerical value of the first field.
3. The method of claim 1, wherein the object mapping rule comprises a mapping relationship between a third field of the first business object and at least one field of a second business object; the creating the first business object according to the object mapping rule includes:
obtaining a numerical value of the at least one field;
and generating the numerical value of the third field according to the relation between the third field and the at least one field and the numerical value of the at least one field.
4. The method of claim 1, wherein the object mapping rule comprises a mapping relationship between a fourth field of the first business object and a system variable; the creating the first business object according to the object mapping rule includes:
and acquiring the numerical value of the system variable, and taking the current numerical value of the system variable as the numerical value of the fourth field.
5. The method of claim 1, wherein the object mapping rule comprises a mapping relationship between a fifth field of the first business object and a constant; the creating the first business object according to the object mapping rule includes:
and acquiring the value of the system variable, and taking the value of the constant as the value of the fifth field.
6. The method according to any one of claims 1 to 5, wherein before obtaining the object mapping rule of each field of the first business object according to the creation request, the method further comprises:
establishing an object mapping rule table; the object mapping rule table comprises an object mapping rule between at least one field in the first business object and at least one field of a second business object;
the obtaining, according to the creation request, an object mapping rule of at least one field of the first business object includes:
and according to the creation request, searching an object mapping rule of at least one field of the first business object from the object mapping rule table.
7. The method according to any one of claims 1-5, wherein each object mapping rule is subject to a single tenant in a multi-tenant system.
8. A business object creation apparatus, comprising:
the receiving module is used for receiving a creating request of a first business object; the creation request comprises field information of the first business object;
an obtaining module, configured to obtain an object mapping rule of at least one field of the first service object according to the creation request;
and the creating module is used for creating the first business object according to the object mapping rule.
9. An electronic device, comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the method of creating a business object of any of claims 1 to 7.
10. A computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, which when executed by a processor, implement the method for creating a business object according to any one of claims 1 to 7.
CN201911050372.4A 2019-10-31 2019-10-31 Method and device for creating business object Pending CN110826307A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911050372.4A CN110826307A (en) 2019-10-31 2019-10-31 Method and device for creating business object

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911050372.4A CN110826307A (en) 2019-10-31 2019-10-31 Method and device for creating business object

Publications (1)

Publication Number Publication Date
CN110826307A true CN110826307A (en) 2020-02-21

Family

ID=69551765

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911050372.4A Pending CN110826307A (en) 2019-10-31 2019-10-31 Method and device for creating business object

Country Status (1)

Country Link
CN (1) CN110826307A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112199416A (en) * 2020-09-30 2021-01-08 支付宝(杭州)信息技术有限公司 Data rule generation method and device
CN112486991A (en) * 2020-11-26 2021-03-12 北京字跳网络技术有限公司 Database report processing method and device and electronic equipment
CN113765868A (en) * 2020-08-17 2021-12-07 北京沃东天骏信息技术有限公司 Service processing method and device
CN116562783A (en) * 2023-02-17 2023-08-08 和创(北京)科技股份有限公司 Metadata-based data aggregation method and device and storage medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1864159A (en) * 2003-06-12 2006-11-15 国际商业机器公司 Iterative data analysis process via query result augmentation and result data feedback
US20120310996A1 (en) * 2011-06-06 2012-12-06 International Business Machines Corporation Rapidly deploying virtual database applications using data model analysis
CN104348724A (en) * 2013-07-31 2015-02-11 华为技术有限公司 Multi-tenant supporting data forwarding method and device
CN104657430A (en) * 2015-01-28 2015-05-27 武汉烽火众智数字技术有限责任公司 Method and system for data acquisition
CN105930502A (en) * 2012-10-22 2016-09-07 北京奇虎科技有限公司 System, client terminal and method for collecting data
CN107465757A (en) * 2017-08-24 2017-12-12 金蝶软件(中国)有限公司 The processing method and related service system of a kind of document
CN107817971A (en) * 2016-09-12 2018-03-20 南京中兴新软件有限责任公司 The implementation method and ORM systems of ORM systems
CN108933774A (en) * 2018-05-04 2018-12-04 北京明朝万达科技股份有限公司 Data interaction system and method
CN109213584A (en) * 2018-07-27 2019-01-15 阿里巴巴集团控股有限公司 Task executing method, device, electronic equipment and computer readable storage medium
CN110196889A (en) * 2019-05-30 2019-09-03 北京字节跳动网络技术有限公司 Data processing method, device, electronic equipment and storage medium
CN110297823A (en) * 2019-05-22 2019-10-01 深圳壹账通智能科技有限公司 Field management method, device, computer equipment and storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1864159A (en) * 2003-06-12 2006-11-15 国际商业机器公司 Iterative data analysis process via query result augmentation and result data feedback
US20120310996A1 (en) * 2011-06-06 2012-12-06 International Business Machines Corporation Rapidly deploying virtual database applications using data model analysis
CN105930502A (en) * 2012-10-22 2016-09-07 北京奇虎科技有限公司 System, client terminal and method for collecting data
CN104348724A (en) * 2013-07-31 2015-02-11 华为技术有限公司 Multi-tenant supporting data forwarding method and device
CN104657430A (en) * 2015-01-28 2015-05-27 武汉烽火众智数字技术有限责任公司 Method and system for data acquisition
CN107817971A (en) * 2016-09-12 2018-03-20 南京中兴新软件有限责任公司 The implementation method and ORM systems of ORM systems
CN107465757A (en) * 2017-08-24 2017-12-12 金蝶软件(中国)有限公司 The processing method and related service system of a kind of document
CN108933774A (en) * 2018-05-04 2018-12-04 北京明朝万达科技股份有限公司 Data interaction system and method
CN109213584A (en) * 2018-07-27 2019-01-15 阿里巴巴集团控股有限公司 Task executing method, device, electronic equipment and computer readable storage medium
CN110297823A (en) * 2019-05-22 2019-10-01 深圳壹账通智能科技有限公司 Field management method, device, computer equipment and storage medium
CN110196889A (en) * 2019-05-30 2019-09-03 北京字节跳动网络技术有限公司 Data processing method, device, electronic equipment and storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113765868A (en) * 2020-08-17 2021-12-07 北京沃东天骏信息技术有限公司 Service processing method and device
CN113765868B (en) * 2020-08-17 2023-08-08 北京沃东天骏信息技术有限公司 Service processing method and device
CN112199416A (en) * 2020-09-30 2021-01-08 支付宝(杭州)信息技术有限公司 Data rule generation method and device
CN112486991A (en) * 2020-11-26 2021-03-12 北京字跳网络技术有限公司 Database report processing method and device and electronic equipment
CN112486991B (en) * 2020-11-26 2024-03-01 北京字跳网络技术有限公司 Database report processing method and device and electronic equipment
CN116562783A (en) * 2023-02-17 2023-08-08 和创(北京)科技股份有限公司 Metadata-based data aggregation method and device and storage medium

Similar Documents

Publication Publication Date Title
CN110826307A (en) Method and device for creating business object
CN109299348B (en) Data query method and device, electronic equipment and storage medium
US8533720B2 (en) Offloading work from one type to another type of processor based on the count of each type of service call instructions in the work unit
US20190340113A1 (en) Test manager to coordinate testing across multiple test tools
CN110020231A (en) Webpage capture method and device thereof
CN110704833A (en) Data permission configuration method, device, electronic device and storage medium
CN111258998A (en) Data verification method, device, medium and electronic equipment
US20220269504A1 (en) Client-side enrichment and transformation via dynamic logic for analytics
CN113515271A (en) Service code generation method and device, electronic equipment and readable storage medium
CN112306447A (en) Interface navigation method, device, terminal and storage medium
CN112926008A (en) Method and device for generating form page, electronic equipment and storage medium
CN115509522A (en) Interface arranging method and system for low-code scene and electronic equipment
CN114064172A (en) Data rendering method and device
CN108536715B (en) Preview page generation method, device, equipment and storage medium
CN116225886A (en) Test case generation method, device, equipment, storage medium and program product
CN110688295A (en) Data testing method and device
CN111666098B (en) Method and system for creating ToB project based on service component
CN112348427A (en) Order processing method, device, computer system and readable storage medium
CN116542585A (en) Method, device, electronic equipment and readable medium for generating commodity circulation value certificate
CN116185806A (en) Digital currency system testing method and device
CN109710497A (en) Collecting method and system
CN113515332A (en) Data generation method, device, equipment and storage medium
CN113485890A (en) Flight inquiry system service monitoring method, device, equipment and storage medium
CN113448578A (en) Page data processing method, processing system, electronic device and readable storage medium
CN109669668B (en) Method and device for realizing simulated transaction execution in system performance test

Legal Events

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

Application publication date: 20200221

RJ01 Rejection of invention patent application after publication