CN117111898A - Construction method and device of business model - Google Patents

Construction method and device of business model Download PDF

Info

Publication number
CN117111898A
CN117111898A CN202311075639.1A CN202311075639A CN117111898A CN 117111898 A CN117111898 A CN 117111898A CN 202311075639 A CN202311075639 A CN 202311075639A CN 117111898 A CN117111898 A CN 117111898A
Authority
CN
China
Prior art keywords
script
target
universal
table information
general operation
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
CN202311075639.1A
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 Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information 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 Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202311075639.1A priority Critical patent/CN117111898A/en
Publication of CN117111898A publication Critical patent/CN117111898A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • G06F8/24Object-oriented
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a method and a device for constructing a service model, and relates to the technical field of computers. One embodiment of the method comprises the following steps: receiving an implementation request of a general operation; the general operation is used for constructing a service model; according to the realization request, determining target table information of a physical table corresponding to the service model and the type of general operation carried out on the physical table; converting a pre-written universal script corresponding to the universal operation according to the type and the target table information to obtain a target script; the target script is executed to implement the generic operation to build the business model. The implementation mode realizes the general operation in the service model by utilizing the pre-written general script, avoids a great deal of repeated coding, testing and publishing work in the model construction, saves the labor cost and shortens the model development period.

Description

Construction method and device of business model
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for constructing a service model.
Background
In most business systems, when a business scenario is newly added, a new physical model corresponding to the newly added business scenario needs to be constructed.
The physical model is generally constructed in a hard coding mode, but because a large number of general service operations exist in different physical models, such as inquiring, deleting, adding and modifying operations of a single table, a large number of repeated coding, testing, publishing and other works are required to be performed when the physical model is constructed, so that a large amount of manpower is wasted, and meanwhile, the model development period is prolonged.
Disclosure of Invention
In view of this, the embodiment of the invention provides a method and a device for constructing a service model, which are implemented by receiving a request for implementing a general operation; the general operation is used for constructing a service model; according to the realization request, determining target table information of a physical table corresponding to the service model and the type of the general operation performed on the physical table; converting a pre-written universal script corresponding to the universal operation according to the type and the target table information to obtain a target script; and executing the target script to realize the general operation so as to construct the service model. Therefore, universal operation in the service model is realized by utilizing a pre-written universal script, a large number of repeated coding, testing and publishing works in model construction are avoided, the labor cost is saved, and the model development period is shortened.
In order to achieve the above object, according to an aspect of an embodiment of the present invention, a method for constructing a service model is provided.
The construction method of the business model comprises the following steps: receiving an implementation request of a general operation; the general operation is used for constructing a service model; according to the realization request, determining target table information of a physical table corresponding to the service model and the type of the general operation performed on the physical table; converting a pre-written universal script corresponding to the universal operation according to the type and the target table information to obtain a target script; and executing the target script to realize the general operation so as to construct the service model.
Optionally, the converting the universal script corresponding to the universal operation according to the type and the target table information to obtain a target script includes: loading a universal script corresponding to the universal operation according to the type; modifying the table information in the universal script according to the target table information; and determining the modified universal script as the target script.
Optionally, the determining, according to the implementation request, target table information of a physical table corresponding to the service model and the type of the general operation performed on the physical table includes: analyzing the realization request to obtain a name identifier corresponding to the physical table, a field identifier and/or a field value corresponding to the field identifier and a type corresponding to the general operation; and checking the name identifier, the field identifier and/or the field value, and determining the target table information according to a checking result.
Optionally, the verifying the name identifier, the field identifier and/or the field value, and determining the target table information according to a verification result includes: determining whether the field identifier and/or the field value exists in a physical table corresponding to the name identifier in a database according to the name identifier; and determining the name identifier and the field identifier and/or the field value as the target table information when the field identifier and/or the field value exist in the physical table.
Optionally, the modifying the table information in the universal script according to the target table information includes: determining placeholders included in the universal script statement; determining the corresponding relation between the placeholder and a name identifier, a field identifier and/or a field value in the target table information; and according to the corresponding relation, correspondingly replacing the placeholder with a name identifier, a field identifier and/or a field value in the target table information.
Optionally, the target type includes a new addition, a deletion, a query, and/or a modification; the executing the target script to implement the generic operation includes: determining a target executor corresponding to the target script according to the target type corresponding to the target script; and executing the target script by using the target executor.
Optionally, the universal script is managed by a lightweight container.
Optionally, the universal script is automatically loaded through an automatic assembly function of the scaffold.
In order to achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided a device for constructing a service model.
The device for constructing the service model comprises the following components: the request receiving module is used for receiving the realization request of the general operation; the general operation is used for constructing a service model; the analysis and verification module is used for determining target table information of a physical table corresponding to the service model and the type of the general operation performed on the physical table according to the realization request; the script conversion module is used for converting a pre-written universal script corresponding to the universal operation according to the type and the target table information to obtain a target script; and the script execution module is used for executing the target script to realize the general operation so as to construct the service model.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided a server.
The server of the embodiment of the invention comprises: one or more processors; and the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors realize the construction method of the business model.
To achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided a computer-readable storage medium.
A computer-readable storage medium of an embodiment of the present invention has stored thereon a computer program which, when executed by a processor, implements a method for constructing a business model of an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: receiving an implementation request of a general operation; the general operation is used for constructing a service model; according to the realization request, determining target table information of a physical table corresponding to the service model and the type of the general operation performed on the physical table; converting a pre-written universal script corresponding to the universal operation according to the type and the target table information to obtain a target script; and executing the target script to realize the general operation so as to construct the service model. Therefore, universal operation in the service model is realized by utilizing a pre-written universal script, a large number of repeated coding, testing and publishing works in model construction are avoided, the labor cost is saved, and the model development period is shortened.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of the main steps of a method for constructing a business model according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of the operational logic of a business model building system according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of the main steps of implementing request parsing and verification according to an embodiment of the invention;
FIG. 4 is a schematic diagram of the main steps of script conversion of a universal script according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of the main steps of a method for constructing a business model according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of the main modules of a business model building apparatus according to an embodiment of the present invention;
FIG. 7 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
fig. 8 is a schematic diagram of a computer system suitable for use in implementing an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that, in the technical solution of the present disclosure, the related aspects of collecting, updating, analyzing, processing, using, transmitting, storing, etc. of the personal information of the user all conform to the rules of the related laws and regulations, and are used for legal purposes without violating the public order colloquial. Necessary measures are taken for the personal information of the user, illegal access to the personal information data of the user is prevented, and the personal information security, network security and national security of the user are maintained.
It should be noted that the embodiments of the present invention and the technical features in the embodiments may be combined with each other without collision.
Fig. 1 is a schematic diagram of main steps of a method for constructing a business model according to an embodiment of the present invention.
As shown in fig. 1, the method for constructing a service model according to the embodiment of the present invention mainly includes the following steps:
step S101: receiving an implementation request of a general operation; the generic operation is used to build a business model.
The embodiment of the invention is used for constructing the service model corresponding to the newly added service scene aiming at the situation of the newly added service scene of the service system. For each service model, the unique service attribute thereof is realized in a hard coding mode, and for the general attribute of the service model, the service model can be realized by using a ready-made functional module, so that the workload of developing the service model is greatly reduced. The system operation logic for executing the construction method of the business model of the embodiment of the invention is shown in fig. 2. Wherein, the general operation refers to the operation that needs to be performed on the physical table corresponding to the service model to realize the general attribute of the service model, such as adding, deleting, inquiring, modifying, etc.; the universal script is a pre-written code block for realizing universal operation; the system intercepts a realization request of a general operation sent by a user and checks the realization request; under the condition that verification is successful, script conversion is carried out on the corresponding universal script according to the realization request to obtain a target script, and then the target script is executed through an executor appointed by the router to realize the universal operation, so that construction of a service model is realized.
Step S102: and determining target table information of a physical table corresponding to the service model and the type of the general operation performed on the physical table according to the realization request.
The system receives the realization request, analyzes and checks the realization request to determine whether the realization request is an illegal request. If the name identifier of the physical table indicated in the implementation request is inconsistent with the name identifier of the physical table in the database, the implementation request can be judged to be an illegal request; if so, determining that the realization request is a legal request. And under the condition that the realization request is determined to be legal, acquiring a universal script corresponding to the universal operation indicated by the realization request according to the realization request.
In order to determine whether an implementation request of a general operation is an illegal request, in some embodiments of the present invention, determining, according to the implementation request, target table information of a physical table corresponding to the service model and a type of the general operation performed on the physical table includes: analyzing the realization request to obtain a name identifier corresponding to the physical table, a field identifier and/or a field value corresponding to the field identifier and a type corresponding to the general operation; and checking the name identifier, the field identifier and/or the field value, and determining the target table information according to a checking result.
After the system receives the implementation request of the general operation, the type of the general operation corresponding to the implementation request, such as adding, deleting, inquiring, modifying and the like, and the object pointed by the general operation, namely the physical table corresponding to the service model, need to be determined, wherein the object is represented by a name identifier in the implementation request, and the physical table pointed by the general operation can be determined by the name identifier. In addition to this, it is also necessary to determine which columns or rows of the physical table are to be operated on, i.e. a field identification needs to be determined from the implementation request, from which columns or rows of the physical table are to be operated on. If a field value is also indicated in the implementation request, it may be determined to add the field value to the physical table, or to query or delete the field value from the physical table, or to modify the field value in the physical table to the field value, and so on. Specifically which operation is to be performed, is determined according to the type of the general operation.
After the type of the general operation, the name identifier of the physical table pointed by the general operation and the field identifier and/or the field value are determined by analyzing the implementation request, the name identifier, the field identifier and/or the field value need to be checked, namely whether the name identifier, the field identifier and/or the field value exist in a database storing the service model is determined, and if the name identifier, the field identifier and/or the field value exist, the implementation request of the general operation is determined to be a legal request; if not, it is determined that the implementation request of the general operation cannot be implemented, and thus is an illegal request. And under the condition that the realization request is legal, determining the name identifier and the field identifier and/or the field value which are obtained by analysis as target table information, and carrying out general operations, such as adding, deleting, inquiring, modifying and the like, on a physical table corresponding to the name identifier in the database according to the target table information.
In some embodiments of the present invention, the verifying the name identifier, the field identifier and/or the field value, and determining the target table information according to a verification result includes: determining whether the field identifier and/or the field value exists in a physical table corresponding to the name identifier in a database according to the name identifier; and determining the name identifier and the field identifier and/or the field value as the target table information when the field identifier and/or the field value exist in the physical table.
The verification process is divided into two parts, firstly, whether a physical table corresponding to the name identifier exists in a database is determined, and if the physical table does not exist, the realization request is determined to be an illegal request; if the corresponding physical table exists, determining whether field identification and/or field value in the physical table are consistent with the field identification and/or field value obtained by analysis, and if not, determining that the realization request is an illegal request; and if the name identification and the field identification and/or the field value obtained by analysis are consistent as target table information, so that script conversion is carried out on the universal script according to the target table information.
Further exemplary description of implementing request parsing and checking is provided below, as shown in fig. 3, where implementing request parsing and checking mainly includes the following steps:
step S301: and receiving and analyzing the realization request of the general operation.
Step S302: a name identifier, a field identifier and/or a field value of the corresponding physical table is determined.
Step S303: determining whether a physical table corresponding to the name identifier exists in the database, and if so, executing step S304; if not, step S306 is performed.
Step S304: determining whether the field identifier and/or the field value exists in the physical table, and if so, executing step S305; if not, step S306 is performed.
Step S305: the name identifier, field identifier and/or field value are determined to be target table information.
Step S306: the implementation request is determined to be an illegitimate request.
The above is the main process of resolving and checking the realization request of the general operation.
Step S103: and converting the pre-written universal script corresponding to the universal operation according to the type and the target table information to obtain a target script.
A generic script is a block of pre-written code whose type partitioning is also consistent with a generic operation, e.g., the type of generic script may be partitioned into add, delete, query, modify, etc. The corresponding universal script can be determined according to the type of the universal operation.
In order to instantiate the universal script, in some embodiments of the present invention, the converting, according to the type and the target table information, the universal script corresponding to the universal operation to obtain the target script includes: loading a universal script corresponding to the universal operation according to the type; modifying the table information in the universal script according to the target table information; and determining the modified universal script as the target script.
Because the universal script is consistent with the type of the universal operation, the corresponding universal script is determined according to the type of the universal operation, for example, the universal operation is the adding operation to the business model physical table, and then the corresponding universal script is the code block for realizing the adding operation to the physical table. And then, modifying the corresponding table information in the universal script according to the name identifier, the field identifier and/or the field value included in the target table information.
To prevent SQL (Structured Query Language ) injection risk, universal script is scripted using a placeholder strategy, and in some embodiments of the invention, modifying table information in the universal script according to the target table information includes: determining placeholders included in the universal script statement; determining the corresponding relation between the placeholder and a name identifier, a field identifier and/or a field value in the target table information; and according to the corresponding relation, correspondingly replacing the placeholder with a name identifier, a field identifier and/or a field value in the target table information.
The SQL injection risk refers to that when the script is called, the input parameters input from the outside are taken as SQL codes to be executed in the compiling process, so that the script is called wrongly. In order to prevent the entry from being wrongly executed as SQL code, the part of the universal script, which needs to be input to the entry, is replaced by a placeholder, so that the situation that the entry is executed as the code is avoided. Such as:
insert into tableName(column1,column2,……)values(?,?,……)
wherein, "? "is a placeholder, which is one of the placeholders, and includes" { } "," # { } ", and the like. It will be appreciated that in order to substantially prevent the injection risk of SQL, a suitable placeholder may be selected according to the actual situation and needs.
Further exemplary description of script conversion of the universal script follows, as shown in fig. 4, the script conversion of the universal script mainly includes the following steps:
step S401: the type of the generic operation is determined based on the implementation request.
Step S402: from this type, a corresponding universal script is determined.
Step S403: placeholders included in the universal script statement are determined.
Step S404: and determining the corresponding relation between the placeholder and the name identifier and the field identifier and/or the field value in the target table information.
Step S405: and according to the corresponding relation, correspondingly replacing the placeholder with a name identifier, a field identifier and/or a field value in the target table information.
Step S406: and obtaining the target script.
To reduce the complexity of parameter replacement in script conversion of a generic script, in some embodiments of the present invention, the generic script is managed by a lightweight container. The lightweight container can be a spring container, and the universal script is realized in an SDK integrated mode.
In order to reduce the complexity of the universal script loading, in some embodiments of the present invention, the universal script is automatically loaded through the automated assembly function of the scaffold. The scaffold can be a spring boot scaffold.
Step S104: and executing the target script to realize the general operation so as to construct the service model.
In order to improve the execution efficiency of the target script, before executing the target script, the router is required to perform route distribution, that is, different target scripts are allocated to different executors for execution, for example, the executors corresponding to the target script of the query type are:
jdbcTemplate.query(sql,RowMapper mappper);
the executors corresponding to the new or modified type target script are as follows:
jdbcTemplate.update(sql,Object[]obj)。
in some embodiments of the invention, the target types include add, delete, query, and/or modify; the executing the target script to implement the generic operation includes: determining a target executor corresponding to the target script according to the target type corresponding to the target script; and executing the target script by using the target executor.
The router determines a corresponding target executor according to the target type corresponding to the target script, then distributes the target script to the target executor, and finally executes the dynamic script by the target executor so as to perform the general operation on the corresponding physical table in the database, and finally completes the construction of the service model. Specific example code for executing the newly added type of object script is as follows:
String sql="insert into userInfo(name,age)values(?,?)";
int count=jdbctemplate. Update (sql, new Object [ ] { "Xiaoming", 3 })
The following describes a service construction method further by way of example, and as shown in fig. 5, the service construction method mainly includes the following steps:
step S501: an implementation request for a generic operation is received.
Step S502: the implementation request is parsed.
Step S503: and determining the type corresponding to the general operation and the target table information.
Step S504: and determining the corresponding universal script according to the type.
Step S505: and carrying out script conversion on the universal script according to the target table information to obtain a target script.
Step S506: and determining an actuator corresponding to the target script.
Step S507: the target script is executed with the executor.
According to the construction method of the business model, the implementation request of the general operation is received; the general operation is used for constructing a service model; according to the realization request, determining target table information of a physical table corresponding to the service model and the type of the general operation performed on the physical table; converting a pre-written universal script corresponding to the universal operation according to the type and the target table information to obtain a target script; and executing the target script to realize the general operation so as to construct the service model. Therefore, universal operation in the service model is realized by utilizing a pre-written universal script, a large number of repeated coding, testing and publishing works in model construction are avoided, the labor cost is saved, and the model development period is shortened.
Fig. 6 is a schematic diagram of main modules of a construction apparatus of a business model according to an embodiment of the present invention.
As shown in fig. 6, a device 600 for constructing a service model according to an embodiment of the present invention includes:
a request receiving module 601, configured to receive an implementation request of a general operation; the general operation is used for constructing a service model;
the parsing and checking module 602 is configured to determine, according to the implementation request, target table information of a physical table corresponding to the service model and a type of the general operation performed on the physical table;
a script conversion module 603, configured to convert a pre-written universal script corresponding to the universal operation according to the type and the target table information, so as to obtain a target script;
and a script execution module 604, configured to execute the target script to implement the generic operation, so as to construct the service model.
In some embodiments of the present invention, the script conversion module 603 is further configured to load a universal script corresponding to the universal operation according to the type; modifying the table information in the universal script according to the target table information; and determining the modified universal script as the target script.
In some embodiments of the present invention, the parsing and checking module 602 is further configured to parse the implementation request to obtain a name identifier corresponding to the physical table, a field identifier and/or a field value corresponding to the field identifier, and a type corresponding to the general operation; and checking the name identifier, the field identifier and/or the field value, and determining the target table information according to a checking result.
In some embodiments of the present invention, the parsing and checking module 602 is further configured to determine, according to the name identifier, whether the field identifier and/or the field value exist in a physical table corresponding to the name identifier in the database; and determining the name identifier and the field identifier and/or the field value as the target table information when the field identifier and/or the field value exist in the physical table.
In some embodiments of the present invention, the script conversion module 603 is further configured to determine placeholders included in the universal script statement; determining the corresponding relation between the placeholder and a name identifier, a field identifier and/or a field value in the target table information; and according to the corresponding relation, correspondingly replacing the placeholder with a name identifier, a field identifier and/or a field value in the target table information.
In some embodiments of the present invention, the script execution module 604 is further configured to determine, according to a target type corresponding to the target script, a target executor corresponding to the target script; and executing the target script by using the target executor.
In some embodiments of the invention, the universal script is managed by a lightweight container.
In some embodiments of the invention, the universal script is automatically loaded by an automatic assembly function of the scaffold.
The device for constructing the service model according to the embodiment of the invention can be seen by receiving the realization request of the general operation; the general operation is used for constructing a service model; according to the realization request, determining target table information of a physical table corresponding to the service model and the type of the general operation performed on the physical table; converting a pre-written universal script corresponding to the universal operation according to the type and the target table information to obtain a target script; and executing the target script to realize the general operation so as to construct the service model. Therefore, universal operation in the service model is realized by utilizing a pre-written universal script, a large number of repeated coding, testing and publishing works in model construction are avoided, the labor cost is saved, and the model development period is shortened.
Fig. 7 shows an exemplary system architecture 700 of a business model construction method or a business model construction apparatus to which embodiments of the present invention can be applied.
As shown in fig. 7, the system architecture 700 may include client devices 701, 702, 703, networks 704, 706, a model build server 705, and universal script servers 707, 708, 709. The networks 704, 706 are used as a medium to provide communication links between the client devices 701, 702, 703, the model build server 705 and the universal script servers 707, 708, 709. The networks 704, 706 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
Client devices 701, 702, 703, universal script servers 707, 708, 709 interact with model build server 705 over networks 704, 706 to receive or send messages, etc. The client devices 701, 702, 703 are electronic devices that initiate a request for implementing a general operation for a user, and after receiving the request for implementing the general operation sent by the client devices 701, 702, 703, the model building server 705 invokes a general script from the general script servers 707, 708, 709, performs script conversion on the general script according to the implementation request to obtain a target script, and executes the target script to implement building of a service model.
The model building server 705 may be a server providing various services, such as a background management server providing support for invoking a corresponding universal script for building a business model according to an implementation request of a universal operation after the implementation request of the universal operation is acquired from the client devices 701, 702, 703. The background management server may analyze the received implementation request of the general operation and the like, and call the general script from the general script servers 707, 708, 709 according to the processing result to construct a business model.
It should be noted that, the method for constructing a service model according to the embodiment of the present invention is generally executed by the model constructing server 705, and accordingly, the device for constructing a service model is generally disposed in the model constructing server 705.
It should be understood that the number of terminal devices, networks and servers in fig. 7 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 8, there is illustrated a schematic diagram of a computer system 800 suitable for use in implementing an embodiment of the present invention. The terminal device shown in fig. 8 is only an example, and should not impose any limitation on the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 8, the computer system 800 includes a Central Processing Unit (CPU) 801 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the system 800 are also stored. The CPU 801, ROM 802, and RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
The following components are connected to the I/O interface 805: an input portion 806 including a keyboard, mouse, etc.; an output portion 807 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage section 808 including a hard disk or the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. The drive 810 is also connected to the I/O interface 805 as needed. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as needed so that a computer program read out therefrom is mounted into the storage section 808 as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to 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 shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication section 809, and/or installed from the removable media 811. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 801.
The computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any 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 context of this document, 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 the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. 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: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts 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 invention. 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 or flowchart illustration, and combinations of blocks in the block diagrams 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 modules involved in the embodiments of the present invention may be implemented in software or in hardware. The described modules may also be provided in a processor, for example, as: a processor includes a request receiving module, an parsing verification module, a script conversion module, and a script execution module. The names of these modules do not constitute limitations on the module itself in some cases, and for example, a script execution module may also be described as "a module that executes the target script to implement the general operation".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to include: receiving an implementation request of a general operation; the general operation is used for constructing a service model; according to the realization request, determining target table information of a physical table corresponding to the service model and the type of the general operation performed on the physical table; converting a pre-written universal script corresponding to the universal operation according to the type and the target table information to obtain a target script; and executing the target script to realize the general operation so as to construct the service model.
According to the technical scheme of the embodiment of the invention, the realization request of the general operation is received; the general operation is used for constructing a service model; according to the realization request, determining target table information of a physical table corresponding to the service model and the type of the general operation performed on the physical table; converting a pre-written universal script corresponding to the universal operation according to the type and the target table information to obtain a target script; and executing the target script to realize the general operation so as to construct the service model. Therefore, universal operation in the service model is realized by utilizing a pre-written universal script, a large number of repeated coding, testing and publishing works in model construction are avoided, the labor cost is saved, and the model development period is shortened.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. The construction method of the business model is characterized by comprising the following steps:
receiving an implementation request of a general operation; the general operation is used for constructing a service model;
according to the realization request, determining target table information of a physical table corresponding to the service model and the type of the general operation performed on the physical table;
converting a pre-written universal script corresponding to the universal operation according to the type and the target table information to obtain a target script;
and executing the target script to realize the general operation so as to construct the service model.
2. The method according to claim 1, wherein the converting the universal script corresponding to the universal operation according to the type and the target table information to obtain a target script includes:
loading a universal script corresponding to the universal operation according to the type;
modifying the table information in the universal script according to the target table information;
and determining the modified universal script as the target script.
3. The method according to claim 2, wherein determining, according to the implementation request, target table information of a physical table corresponding to the service model and a type of the general operation performed on the physical table includes:
analyzing the realization request to obtain a name identifier corresponding to the physical table, a field identifier and/or a field value corresponding to the field identifier and a type corresponding to the general operation;
and checking the name identifier, the field identifier and/or the field value, and determining the target table information according to a checking result.
4. A method according to claim 3, wherein said verifying said name identifier, said field identifier and/or said field value, and determining said target table information based on the verification result, comprises:
determining whether the field identifier and/or the field value exists in a physical table corresponding to the name identifier in a database according to the name identifier;
and determining the name identifier and the field identifier and/or the field value as the target table information when the field identifier and/or the field value exist in the physical table.
5. A method according to claim 3, wherein said modifying table information in said universal script based on said target table information comprises:
determining placeholders included in the universal script statement;
determining the corresponding relation between the placeholder and a name identifier, a field identifier and/or a field value in the target table information;
and according to the corresponding relation, correspondingly replacing the placeholder with a name identifier, a field identifier and/or a field value in the target table information.
6. The method of claim 1, wherein the target types include add, delete, query, and/or modify; the executing the target script to implement the generic operation includes:
determining a target executor corresponding to the target script according to the target type corresponding to the target script;
and executing the target script by using the target executor.
7. The method of claim 1, wherein the step of determining the position of the substrate comprises,
the universal script is managed through a lightweight container;
and/or the number of the groups of groups,
the universal script realizes automatic loading through the automatic assembly function of the scaffold.
8. A device for constructing a service model, comprising:
the request receiving module is used for receiving the realization request of the general operation; the general operation is used for constructing a service model;
the analysis and verification module is used for determining target table information of a physical table corresponding to the service model and the type of the general operation performed on the physical table according to the realization request;
the script conversion module is used for converting a pre-written universal script corresponding to the universal operation according to the type and the target table information to obtain a target script;
and the script execution module is used for executing the target script to realize the general operation so as to construct the service model.
9. A server, comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-7.
10. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-7.
CN202311075639.1A 2023-08-24 2023-08-24 Construction method and device of business model Pending CN117111898A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311075639.1A CN117111898A (en) 2023-08-24 2023-08-24 Construction method and device of business model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311075639.1A CN117111898A (en) 2023-08-24 2023-08-24 Construction method and device of business model

Publications (1)

Publication Number Publication Date
CN117111898A true CN117111898A (en) 2023-11-24

Family

ID=88810562

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311075639.1A Pending CN117111898A (en) 2023-08-24 2023-08-24 Construction method and device of business model

Country Status (1)

Country Link
CN (1) CN117111898A (en)

Similar Documents

Publication Publication Date Title
CN109710236B (en) Service development and implementation method, device, platform and medium based on shared service
US9690822B2 (en) System and method for metadata level validation of custom setup objects
CN110324169B (en) Interface management method and device
JP2018530070A (en) System and method for building, optimizing and implementing a platform on a cloud-based computing environment
CN111324619B (en) Object updating method, device, equipment and storage medium in micro-service system
US20230092752A1 (en) System and method for development of gateway policies in an application programming interface environment
US11934287B2 (en) Method, electronic device and computer program product for processing data
CN111666293A (en) Database access method and device
CN113779004A (en) Data verification method and device
CN116204428A (en) Test case generation method and device
CN115794637A (en) Method, device, equipment and computer readable medium for automatic test
CN117111898A (en) Construction method and device of business model
CN115514632A (en) Resource template arranging method, device and equipment for cloud service and storage medium
CN113312900A (en) Data verification method and device
CN113419957A (en) Rule-based big data offline batch processing performance capacity scanning method and device
CN109471849B (en) Model processing method and device, storage medium and electronic equipment
CN109298831B (en) Information storage method and device
CN112711602A (en) Running method and device of storage process, database system and storage medium
US11514017B2 (en) Systems and methods for provisioning a new secondary IdentityIQ instance to an existing IdentityIQ instance
CN113495747B (en) Gray scale release method and device
US11086549B2 (en) Just-in-time data migration in a live system
CN111401825B (en) Instantiation method and device
CN117149633A (en) Script processing method, script processing device, electronic equipment and storage medium
CN116185441A (en) Management method, device, equipment and medium of function module
CN113419966A (en) Pressure measurement method and device based on Jmeter thread

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