CN117539946A - Service implementation method, device, computer equipment and storage medium - Google Patents
Service implementation method, device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN117539946A CN117539946A CN202311727999.5A CN202311727999A CN117539946A CN 117539946 A CN117539946 A CN 117539946A CN 202311727999 A CN202311727999 A CN 202311727999A CN 117539946 A CN117539946 A CN 117539946A
- Authority
- CN
- China
- Prior art keywords
- function
- service
- execution
- target
- configuration rule
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 72
- 238000013507 mapping Methods 0.000 claims abstract description 38
- 238000004590 computer program Methods 0.000 claims abstract description 33
- 230000008569 process Effects 0.000 claims abstract description 30
- 230000006870 function Effects 0.000 claims description 356
- 238000013515 script Methods 0.000 claims description 18
- 238000007639 printing Methods 0.000 claims description 7
- 238000010586 diagram Methods 0.000 description 8
- 238000012423 maintenance Methods 0.000 description 7
- 238000012986 modification Methods 0.000 description 7
- 230000004048 modification Effects 0.000 description 7
- 238000012545 processing Methods 0.000 description 7
- 230000008859 change Effects 0.000 description 4
- 230000004044 response Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 238000011161 development Methods 0.000 description 3
- 239000000284 extract Substances 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 230000008571 general function Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- OKTJSMMVPCPJKN-UHFFFAOYSA-N Carbon Chemical compound [C] OKTJSMMVPCPJKN-UHFFFAOYSA-N 0.000 description 1
- 238000007792 addition Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 229910021389 graphene Inorganic materials 0.000 description 1
- 239000003999 initiator Substances 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000007858 starting material Substances 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 238000010200 validation analysis Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2228—Indexing structures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/242—Query formulation
- G06F16/2433—Query languages
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/28—Databases characterised by their database models, e.g. relational or object models
- G06F16/284—Relational databases
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Mathematical Physics (AREA)
- Computational Linguistics (AREA)
- Stored Programmes (AREA)
Abstract
The present application relates to a service implementation method, apparatus, computer device, storage medium and computer program product. The method comprises the following steps: in the execution process of the target service scene, determining a service function to be executed; determining a target function execution template in the mapping relation between the function identifier and the function execution template based on the function identifier corresponding to the service function; determining target configuration rule information in a database based on the function identifier corresponding to the service function and the characteristic information of the service function; and executing the business function based on the target function execution template and the target configuration rule information. By adopting the method, the service realization efficiency can be improved.
Description
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a service implementation method, an apparatus, a computer device, a storage medium, and a computer program product.
Background
The current service scenes gradually tend to be complicated, and cross services possibly exist among different service scenes, namely repeated contents exist in more and more large service scenes. Then, when the specific application is adopted, the calling tool is used for calling each functional component.
In the traditional service implementation method, a developer usually compiles the conventional functions in a service scene to generate corresponding functional components, and in a specific service scene, a user calls the functional components through a scheduling system and calls the functional components according to a preset calling sequence to finish corresponding services.
However, in the conventional service implementation method, service scenes are complex and changeable, functional components are compiled aiming at each service scene, development difficulty is high, and complexity of component operation and maintenance is high, so that service implementation efficiency is low.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a service implementation method, apparatus, computer device, computer readable storage medium, and computer program product.
In a first aspect, the present application provides a service implementation method, including:
in the execution process of the target service scene, determining a service function to be executed;
determining a target function execution template in the mapping relation between the function identifier and the function execution template based on the function identifier corresponding to the service function;
determining target configuration rule information in a database based on the function identifier corresponding to the service function and the characteristic information of the service function;
and executing the business function based on the target function execution template and the target configuration rule information.
In one embodiment, the determining the service function to be performed during the execution of the target service scenario includes:
responding to an execution request of a target service scene, and determining each service function contained in the target service scene;
and determining the service function to be executed currently in the service functions based on the preset service function execution sequence.
In one embodiment, before determining the service function to be performed during the execution of the target service scenario, the method further includes:
acquiring historical execution codes of various service functions; the history execution code comprises service execution information;
extracting general information and configuration rule information in the history execution code aiming at each type of service function;
constructing a mapping relation between the general information and the configuration rule information;
and generating a function execution template based on the general information and the mapping relation, storing the function execution template into a dispatching system, and storing the configuration rule information into a database.
In one embodiment, the storing the configuration rule information in a database includes:
for each type of service function, constructing an index between the function execution template and the configuration information rule based on a mapping relation between general information and configuration rule information in a history execution code of the service function;
and constructing a database table by taking configuration rule information corresponding to the service function as rule table items, and storing the database table into a database.
In one embodiment, the configuration rule information includes a log printing rule, an execution sequence rule, an execution start-stop rule and an error capturing rule.
In one embodiment, the method further comprises:
responding to a target service function update request, and determining update configuration rule information corresponding to the target service function;
generating batch update scripts based on the update configuration rule information;
and executing the batch updating script, and updating the target configuration rule information corresponding to the target service function in the database.
In a second aspect, the present application further provides a service implementation apparatus, where the apparatus includes:
the first determining module is used for determining service functions to be executed in the execution process of the target service scene;
the second determining module is used for determining a target function execution template in the mapping relation between the function identifier and the function execution template based on the function identifier corresponding to the service function;
the third determining module is used for determining target configuration rule information in a database based on the function identifier corresponding to the service function and the characteristic information of the service function;
and the execution module is used for executing the business function based on the target function execution template and the target configuration rule information.
In a third aspect, the present application also provides a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
in the execution process of the target service scene, determining a service function to be executed;
determining a target function execution template in the mapping relation between the function identifier and the function execution template based on the function identifier corresponding to the service function;
determining target configuration rule information in a database based on the function identifier corresponding to the service function and the characteristic information of the service function;
and executing the business function based on the target function execution template and the target configuration rule information.
In a fourth aspect, the present application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
in the execution process of the target service scene, determining a service function to be executed;
determining a target function execution template in the mapping relation between the function identifier and the function execution template based on the function identifier corresponding to the service function;
determining target configuration rule information in a database based on the function identifier corresponding to the service function and the characteristic information of the service function;
and executing the business function based on the target function execution template and the target configuration rule information.
In a fifth aspect, the present application also provides a computer program product comprising a computer program which, when executed by a processor, performs the steps of:
in the execution process of the target service scene, determining a service function to be executed;
determining a target function execution template in the mapping relation between the function identifier and the function execution template based on the function identifier corresponding to the service function;
determining target configuration rule information in a database based on the function identifier corresponding to the service function and the characteristic information of the service function;
and executing the business function based on the target function execution template and the target configuration rule information.
The service implementation method, the device, the computer equipment, the storage medium and the computer program product determine the service function to be executed in the execution process of the target service scene; determining a target function execution template in the mapping relation between the function identifier and the function execution template based on the function identifier corresponding to the service function; determining target configuration rule information in a database based on the function identifier corresponding to the service function and the characteristic information of the service function; and executing the business function based on the target function execution template and the target configuration rule information. By adopting the method, in the process of realizing the business, the direct calling realization of the business function in the target business scene can be realized by creating the universal function execution template in advance, the specific configuration rule of the business function in the specific business scene is stored in the database in the form of data, and in the processes of operation and maintenance management and updating management, the batch modification of the specific configuration rule can be realized, thereby improving the realization efficiency of the whole business.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the related art, the drawings that are required to be used in the embodiments or the related technical descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to the drawings without inventive effort for a person having ordinary skill in the art.
FIG. 1 is a flow diagram of a method of implementing a service in one embodiment;
FIG. 2 is a flow diagram of a process for implementing a specific business function A in one embodiment;
FIG. 3 is a flow chart illustrating steps for determining a business function to be performed in one embodiment;
FIG. 4 is a flow diagram of the steps for generating a function execution template and configuration rule information in one embodiment;
FIG. 5 is a diagram of a general information and configuration rule information structure extracted from each history execution code in one embodiment;
FIG. 6 is a flow chart illustrating the steps of storing configuration rule information in the form of data to a database in one embodiment;
FIG. 7 is a flowchart of a batch update step for configuration rule information of a business function in a database according to an embodiment;
FIG. 8 is a block diagram of a business implementation apparatus in one embodiment;
fig. 9 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
In one embodiment, as shown in fig. 1, a service implementation method is provided, where this embodiment is applied to a terminal to illustrate the method, and it is understood that the method may also be applied to a server, and may also be applied to a system including a terminal and a server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the steps of:
step 102, determining a service function to be executed in the execution process of the target service scene.
In implementation, during execution of a target service scenario, a server determines a service function to be executed included in the target service scenario. Further, the server may execute each service function according to the execution order of each service to be executed.
Optionally, the target service scenario may include, but is not limited to, at least one service function to be executed, and the embodiment of the present application does not limit the type and the number of the service functions in the target service scenario.
Step 104, determining a target function execution template in the mapping relation between the function identifier and the function execution template based on the function identifier corresponding to the service function.
In implementation, the mapping relation between the function identifier and the function execution template of each service function is prestored in the scheduling system. I.e. each type of service function is characterized by a general function execution template which can be used as a basic execution framework for executing the type of service function. Therefore, in the execution process of the target service scene, the function identifier of the service function to be executed is used as a query basis for the service function to be executed, and the target function execution template is determined in the mapping relation between the function identifier and the function execution template contained in the scheduling system.
And 106, determining target configuration rule information in a database based on the function identification corresponding to the service function and the characteristic information of the service function.
In implementation, configuration rule information of various service functions is pre-stored in a database. Specifically, for each type of service function, a database table is set up in the database, and each piece of configuration rule information is taken as a specific service function implementation example of the type of service function in the database table. Therefore, after determining the target function execution template of the service function to be executed, the server also needs to determine target configuration rule information matched with the service function identifier and the feature information of the service function in the database based on the function identifier corresponding to the service function and the feature information of the service function.
And step 108, executing the business function based on the target function execution template and the target configuration rule information.
In implementation, the server adds the target configuration rule information to the target function execution template to generate a template component capable of calling operation, and further, the server calls and operates the template component through a call center to execute the service function. The service functions included in the target service scene are all implemented according to the calling execution mode, and the execution process of each service function is not repeated in the embodiment of the application. And determining the execution condition of the target service scene until all service functions in the target service scene are executed, and completing the service execution.
As shown in fig. 2, a flow diagram of a service implementation process taking a service function as an example is given, a function execution template of a function a type is called in a scheduling system, a variable (i.e., configuration rule information) of the function a is queried in a database, and the configuration rule information of the function a is added to the function execution template to execute the function a.
In the service implementation method, in the execution process of the target service scene, the service function to be executed is determined; determining a target function execution template in the mapping relation between the function identifier and the function execution template based on the function identifier corresponding to the service function; determining target configuration rule information in a database based on the function identifier corresponding to the service function and the characteristic information of the service function; and executing the business function based on the target function execution template and the target configuration rule information. By adopting the method, in the process of realizing the business, the direct calling realization of the business function in the target business scene can be realized by creating the universal function execution template in advance, the specific configuration rule of the business function in the specific business scene is stored in the database in the form of data, and in the processes of operation and maintenance management and updating management, the batch modification of the specific configuration rule can be realized, thereby improving the realization efficiency of the whole business.
In an exemplary embodiment, as shown in FIG. 3, the specific processing of step 102 includes the following steps 302 through 306. Wherein:
in step 302, each service function included in the target service scenario is determined in response to the execution request of the target service scenario.
In implementation, a user initiates an execution request for a target service scenario through a terminal, and a server responds to the execution request of the target service scenario to determine each service function contained in the target service scenario. Specifically, the scheduling system stores configuration information of each service scene in the development and configuration process of the service scene. Therefore, the server determines the service functions included in the target service scenario based on the configuration information of each service scenario in the scheduling system, for example, the server determines that three service functions including the service function A1, the service function A2 and the service function A3 are included in the target service scenario a.
Step 304, determining the service function to be executed currently in each service function based on the preset service function execution sequence.
In implementation, the configuration information of the service scenario further includes an execution sequence (may also be referred to as execution logic) of each service function, and in the execution process of the target service scenario, the server determines the currently to-be-executed service function based on the execution sequence of each service function and the execution progress of the target service scenario, so as to implement sequential execution of the currently to-be-executed service function.
In this embodiment, by responding to the execution request of the target service scenario and determining the service function to be executed currently according to the preset service function execution sequence, accurate, efficient and intelligent service processing can be realized, and accurate output of the service result is provided.
In an exemplary embodiment, to reduce development difficulty and operation complexity, a general function execution template is used to avoid compiling functional components for each business function in each business scenario, as shown in fig. 4, and before step 102, the method further includes steps 402 to 408. Wherein:
step 402, obtain the historical execution code of each type of business function.
Wherein, the history execution code contains business execution information.
In the implementation, in order to meet the service application requirement, the server acquires as many historical execution codes of various versions and different configuration rules of the service function as possible, so that various configuration rule information under different service scenes can be collected and obtained.
Alternatively, the history execution code of the business function may acquire the history function components of the business function of the type from various business scenes, and extract the history execution code (execution logic) contained in each history function component.
Step 404, for each type of service function, extracting general information and configuration rule information in the historical execution code data.
In an implementation, for each type of business function, a server extracts general information and configuration rule information in each history execution code of the type of business function. Specifically, as shown in fig. 5, the history code data of the same type of service function are compared, a common part in the history code data is determined, and the common part of the history code data is used as general information. Meanwhile, code execution details except for a common part in each historical code data are extracted, and the "AAA" part and the "AAAA" part shown in fig. 5, namely decisive rule information in code logic, are variables in the execution process of the same type of service function, and the decisive rule information is used as corresponding configuration rule information of the type of service function.
Alternatively, since the service functions of the same type may correspond to a plurality of different history execution codes, each history execution code correspondingly extracts one piece of configuration rule information, the service functions of the same type may correspond to a plurality of pieces of configuration rule information.
In step 406, a mapping relationship between the general information and the configuration rule information is constructed.
In the implementation, after extracting the general relation and the special configuration rule information in each history execution code, the server constructs the mapping relation between the general information and the configuration rule information. The mapping relation is used for realizing the association call between the function execution template and the configuration rule information.
Step 408, generating a function execution template based on the general information and the mapping relation, storing the function execution template to the scheduling system, and storing the configuration rule information to the database.
In implementation, the server generates a function execution template based on the general information and the mapping relation, stores the function execution template to the scheduling system, and stores a plurality of pieces of configuration rule information corresponding to the function execution template to the database. Specifically, a function identifier (or a function noun) of the service function can be used as a total classification standard of the configuration rule information in the database, and each piece of configuration rule information is used as an item in the database to store data under the function identifier.
The specific configuration rule information of the service function is stored in the database in a data form, so that the configuration rule information of the service function of the same type can be identified independently, but the service function has a common basic framework (function execution template), and the condition that the function components with different configurations need to be compiled and changed in the traditional technology is avoided.
In this embodiment, for each history execution code of a service function, by extracting general information between each history execution code, a function execution template is generated, so that the universality of the function execution template in the service implementation process is improved, and specific configuration rules in each history execution code are stored in a database in a data form, so that batch operation and maintenance processing of specific service functions is realized, and service implementation efficiency is improved.
In an exemplary embodiment, as shown in FIG. 6, the specific process of step 408 includes steps 602 through 606. Wherein:
step 602, for each type of service function, constructing an index between the function execution template and the configuration information rule based on the mapping relationship between the general information and the configuration rule information in the execution code of the service function.
In implementation, for each type of service function, an index between a function execution template and configuration information rules is constructed based on a mapping relationship between general information and configuration rule information in execution codes of the service function.
Step 604, the configuration rule information corresponding to the service function is used as a rule table item, a database table is constructed, and the database table is stored in a database.
In implementation, the server constructs a database table by taking configuration rule information corresponding to the service function as a rule table item of one strip, and stores the database table into the database. The specific configuration rule information of each type of service function is used as a rule table entry and stored in a database table. The multiple types of business functions correspond to multiple database tables in the database.
In this embodiment, each configuration rule information of the service function is stored in the database in the form of data, so that not only is the scheduling process of the service function simplified, but also when the specific decision information of the service function of the same type is modified, batch modification can be performed on each configuration rule information of the service function from the database level, so that the operation and maintenance difficulty is reduced, and the service implementation efficiency is improved.
In an exemplary embodiment, the configuration rule information includes a log printing rule, an execution sequence rule, an execution start-stop rule, and an error capturing rule.
In an implementation, in order to convert the scheduling system into an initiator rather than an operating platform (i.e. without program compiling) in the service implementation process, each configuration rule information may include control management rule information for controlling and managing a service function, for example, the configuration rule information further includes a log printing rule, an execution sequence rule, an execution start rule, an error capturing rule, and the like, so as to implement control and management on the execution process of the service function, which is not limited in the embodiment of the present application.
Optionally, the control management rule information for controlling and managing the service functions included in the configuration rule information may be set based on the user customization requirement, and one or more items may be set.
In this embodiment, control management rule information for controlling a service function implementation process is written in configuration rule information in a service function, so that a platform of an operation and maintenance function of a scheduling system is converted into a service implementation starter, scheduling complexity is reduced, and service implementation efficiency is improved.
In an exemplary embodiment, as shown in fig. 7, the method further comprises:
step 702, in response to the update request of the target service function, determining update configuration rule information corresponding to the target service function.
In implementation, the server responds to the target service function update request to determine update configuration rule information corresponding to the target service function. Specifically, the server determines which configuration rule information in the service functions of the type needs to be modified according to the change content, and distinguishes the target configuration rule information so as to carry out different processing on different configurations.
Optionally, modifications to the configuration rule information may be, but are not limited to, additions, deletions, modifications, and query validations to the configuration rule information.
Step 704, generating a batch update script based on the update configuration rule information.
In an implementation, the server generates a batch update script based on the update configuration rule information. Specifically, the server writes a batch of update scripts according to the change content and the update range, wherein the batch of update scripts comprises modification operation sentences, update condition sentences, inquiry sentences, backup sentences and the like, and the script writing is performed according to the grammar rules of the target database.
And step 706, executing batch updating scripts and updating the target configuration rule information corresponding to the target service function in the database.
In the implementation, the server executes the batch updating script to update the target configuration rule information corresponding to the target service function in the database. Optionally, after updating the target configuration rule information corresponding to the target service function, the server may verify the update result, that is, after executing the batch update script, the server needs to verify the updated data, so as to ensure that all configuration rule changes take effect, and no misoperation and other services are affected.
Optionally, after updating the target configuration rule information corresponding to the target service function in the database, the target service function can be tested and scheduled, so that sequential execution of the target service function is ensured, and after the target service function is successfully executed, the test and scheduling are completed.
In the embodiment, the configuration rule information of the service function is stored in the database in the form of data, and when the configuration rule information of the service function is updated, the configuration rule information is updated in batches from the level of the database, so that the operation and maintenance complexity of the service function is reduced, and the service realization efficiency is improved.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a service implementation device for implementing the service implementation method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of one or more service implementation devices provided below may refer to the limitation of the service implementation method hereinabove, and will not be repeated herein.
In an exemplary embodiment, as shown in fig. 8, there is provided a service implementation apparatus 800, including: a first determination module 801, a second determination module 802, a third determination module 803, and an execution module 804, wherein:
a first determining module 801, configured to determine a service function to be executed during execution of a target service scenario;
a second determining module 802, configured to determine, based on a function identifier corresponding to the service function, a target function execution template in a mapping relationship between the function identifier and the function execution template;
a third determining module 803, configured to determine target configuration rule information in the database based on the function identifier corresponding to the service function and the feature information of the service function;
an execution module 804, configured to execute the service function based on the target function execution template and the target configuration rule information.
In an exemplary embodiment, the first determining module 801 is specifically configured to determine, in response to an execution request of the target service scenario, each service function included in the target service scenario;
and determining the service function to be executed currently in each service function based on the preset service function execution sequence.
In one exemplary embodiment, the apparatus 800 further comprises:
the acquisition module is used for acquiring historical execution codes of various service functions; the history execution code contains service execution information;
the extraction module is used for extracting general information and configuration rule information in the history execution code aiming at each type of service function;
the construction module is used for constructing the mapping relation between the general information and the configuration rule information;
and the storage module is used for generating a function execution template based on the general information and the mapping relation, storing the function execution template into the scheduling system and storing the configuration rule information into the database.
In an exemplary embodiment, the storage module is specifically configured to construct, for each type of service function, an index between a function execution template and a configuration information rule based on a mapping relationship between general information and configuration rule information in a history execution code of the service function;
and constructing a database table by taking configuration rule information corresponding to the service function as rule table items, and storing the database table into a database.
In one exemplary embodiment, the configuration rule information includes a log printing rule, an execution sequence rule, an execution start-stop rule, and an error capturing rule.
In one exemplary embodiment, the apparatus 800 further comprises:
a fourth determining module, configured to determine update configuration rule information corresponding to the target service function in response to the target service function update request;
the generation module is used for generating batch update scripts based on the update configuration rule information;
and the updating module is used for executing batch updating scripts and updating the target configuration rule information corresponding to the target service function in the database.
The modules in the service implementation apparatus may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one exemplary embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 9. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing data such as configuration rule information. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a service implementation method.
It will be appreciated by those skilled in the art that the structure shown in fig. 9 is merely a block diagram of a portion of the structure associated with the present application and is not limiting of the computer device to which the present application applies, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one exemplary embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
in the execution process of the target service scene, determining a service function to be executed;
determining a target function execution template in the mapping relation between the function identifier and the function execution template based on the function identifier corresponding to the service function;
determining target configuration rule information in a database based on the function identifier corresponding to the service function and the characteristic information of the service function;
and executing the business function based on the target function execution template and the target configuration rule information.
In one embodiment, the processor when executing the computer program further performs the steps of:
responding to an execution request of a target service scene, and determining each service function contained in the target service scene;
and determining the service function to be executed currently in each service function based on the preset service function execution sequence.
In one embodiment, the processor when executing the computer program further performs the steps of:
acquiring historical execution codes of various service functions; the history execution code contains service execution information;
extracting general information and configuration rule information in the history execution code aiming at each type of service function;
constructing a mapping relation between the general information and the configuration rule information;
and generating a function execution template based on the general information and the mapping relation, storing the function execution template into a dispatching system, and storing configuration rule information into a database.
In one embodiment, the processor when executing the computer program further performs the steps of:
for each type of service function, constructing an index between a function execution template and a configuration information rule based on the mapping relation between general information and configuration rule information in a history execution code of the service function;
and constructing a database table by taking configuration rule information corresponding to the service function as rule table items, and storing the database table into a database.
In one embodiment, the configuration rule information includes a log printing rule, an execution sequence rule, an execution start-stop rule, and an error capturing rule.
In one embodiment, the processor when executing the computer program further performs the steps of:
responding to the target service function update request, and determining update configuration rule information corresponding to the target service function;
generating batch update scripts based on the update configuration rule information;
and executing batch updating scripts and updating target configuration rule information corresponding to the target service function in the database.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
in the execution process of the target service scene, determining a service function to be executed;
determining a target function execution template in the mapping relation between the function identifier and the function execution template based on the function identifier corresponding to the service function;
determining target configuration rule information in a database based on the function identifier corresponding to the service function and the characteristic information of the service function;
and executing the business function based on the target function execution template and the target configuration rule information.
In one embodiment, the computer program when executed by the processor further performs the steps of:
responding to an execution request of a target service scene, and determining each service function contained in the target service scene;
and determining the service function to be executed currently in each service function based on the preset service function execution sequence.
In one embodiment, the computer program when executed by the processor further performs the steps of:
acquiring historical execution codes of various service functions; the history execution code contains service execution information;
extracting general information and configuration rule information in the history execution code aiming at each type of service function;
constructing a mapping relation between the general information and the configuration rule information;
and generating a function execution template based on the general information and the mapping relation, storing the function execution template into a dispatching system, and storing configuration rule information into a database.
In one embodiment, the computer program when executed by the processor further performs the steps of:
for each type of service function, constructing an index between a function execution template and a configuration information rule based on the mapping relation between general information and configuration rule information in a history execution code of the service function;
and constructing a database table by taking configuration rule information corresponding to the service function as rule table items, and storing the database table into a database.
In one embodiment, the configuration rule information includes a log printing rule, an execution sequence rule, an execution start-stop rule, and an error capturing rule.
In one embodiment, the computer program when executed by the processor further performs the steps of:
responding to the target service function update request, and determining update configuration rule information corresponding to the target service function;
generating batch update scripts based on the update configuration rule information;
and executing batch updating scripts and updating target configuration rule information corresponding to the target service function in the database.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.
Claims (10)
1. A method for implementing a service, the method comprising:
in the execution process of the target service scene, determining a service function to be executed;
determining a target function execution template in the mapping relation between the function identifier and the function execution template based on the function identifier corresponding to the service function;
determining target configuration rule information in a database based on the function identifier corresponding to the service function and the characteristic information of the service function;
and executing the business function based on the target function execution template and the target configuration rule information.
2. The method according to claim 1, wherein the determining the service function to be performed during the execution of the target service scenario comprises:
responding to an execution request of a target service scene, and determining each service function contained in the target service scene;
and determining the service function to be executed currently in the service functions based on the preset service function execution sequence.
3. The method of claim 1, wherein prior to determining the business function to be performed during the execution of the target business scenario, the method further comprises:
acquiring historical execution codes of various service functions; the history execution code comprises service execution information;
extracting general information and configuration rule information in the history execution code aiming at each type of service function;
constructing a mapping relation between the general information and the configuration rule information;
and generating a function execution template based on the general information and the mapping relation, storing the function execution template into a dispatching system, and storing the configuration rule information into a database.
4. A method according to claim 3, wherein said storing said configuration rule information to a database comprises:
for each type of service function, constructing an index between the function execution template and the configuration information rule based on a mapping relation between general information and configuration rule information in a history execution code of the service function;
and constructing a database table by taking configuration rule information corresponding to the service function as rule table items, and storing the database table into a database.
5. A method according to claim 3, wherein the configuration rule information includes a log printing rule, an execution sequence rule, an execution start-stop rule, and an error capturing rule.
6. The method according to claim 1, wherein the method further comprises:
responding to a target service function update request, and determining update configuration rule information corresponding to the target service function;
generating batch update scripts based on the update configuration rule information;
and executing the batch updating script, and updating the target configuration rule information corresponding to the target service function in the database.
7. A service implementation apparatus, the apparatus comprising:
the first determining module is used for determining service functions to be executed in the execution process of the target service scene;
the second determining module is used for determining a target function execution template in the mapping relation between the function identifier and the function execution template based on the function identifier corresponding to the service function;
the third determining module is used for determining target configuration rule information in a database based on the function identifier corresponding to the service function and the characteristic information of the service function;
and the execution module is used for executing the business function based on the target function execution template and the target configuration rule information.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311727999.5A CN117539946A (en) | 2023-12-15 | 2023-12-15 | Service implementation method, device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311727999.5A CN117539946A (en) | 2023-12-15 | 2023-12-15 | Service implementation method, device, computer equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117539946A true CN117539946A (en) | 2024-02-09 |
Family
ID=89786210
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311727999.5A Pending CN117539946A (en) | 2023-12-15 | 2023-12-15 | Service implementation method, device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117539946A (en) |
-
2023
- 2023-12-15 CN CN202311727999.5A patent/CN117539946A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111249736B (en) | Code processing method and device | |
CN107330014B (en) | Data table creating method and device | |
CN111881042B (en) | Automatic test script generation method and device and electronic equipment | |
CA3142770A1 (en) | Component linkage configuration method, device, computer equipment and storage medium | |
CN110263104A (en) | JSON character string processing method and device | |
CN113535141A (en) | Database operation code generation method and device | |
CN112395339B (en) | Intersystem data admission verification method, device, computer equipment and storage medium | |
CN116466953B (en) | Modularized front-end development method, device, computer equipment and storage medium | |
CN114816170A (en) | Rule scheme generation method, device, medium and electronic equipment | |
CN117539946A (en) | Service implementation method, device, computer equipment and storage medium | |
CN116167882A (en) | Conditional expression dynamic configuration method, accounting condition calculation method and accounting condition calculation device | |
CN115757172A (en) | Test execution method and device, storage medium and computer equipment | |
CN110221952B (en) | Service data processing method and device and service data processing system | |
CN114564621A (en) | Method, device and equipment for associating data and readable storage medium | |
CN114218261A (en) | Data query method and device, storage medium and electronic equipment | |
CN114493493A (en) | Decision engine and decision engine implementation method | |
CN115705297A (en) | Code call detection method, device, computer equipment and storage medium | |
CN118193032B (en) | Method, apparatus, device, medium and program product for eliminating invalid dependency library | |
CN110990475B (en) | Batch task inserting method and device, computer equipment and storage medium | |
CN116339717B (en) | Data execution method, device, equipment and medium | |
CN117492952A (en) | Workflow method, system and device based on big data | |
CN116993287A (en) | Method and device for creating flow business file, computer equipment and storage medium | |
CN118245532A (en) | Service operation processing method, device, computer equipment and storage medium | |
CN116401035A (en) | Execution sequence determining method, device, computer equipment and storage medium | |
CN114357065A (en) | Function-based data association method and device |
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 |