Service generation method, apparatus, device and computer-readable storage medium

Through the combination of abstract service model and service generation framework, dynamic service generation is generated, and the problems of low service generation efficiency and poor flexibility are solved, and an efficient and flexible service generation process is realized.

CN111338604BActive Publication Date: 2025-06-20WEBANK (CHINA)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010129299.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-02-28
Publication Date
2025-06-20
Estimated Expiration
2040-02-28

AI Technical Summary

Technical Problem

The current service generation efficiency is low, resulting in serious waste of human and material resources, and the service generation is poor in flexibility.

Method used

Through the preset abstract service model, analyze the initial business files, obtain basic components and configuration information, call the service generation framework to determine standard components, combine to form a sequence of standard components, and realize dynamic generation of services.

Benefits of technology

Reduces tedious operations for developers, reduces human resource waste, improves efficiency and flexibility in service generation, and reduces the amount of code through high reuse of standard components.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111338604B_ABST
    Figure CN111338604B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of fintech, and discloses a service generation method, device, equipment and computer-readable storage medium. The method includes the following steps: when receiving a service access request, obtaining an initial service file corresponding to the service access request; parsing the initial service file through a preset abstract service model to obtain basic components and configuration information in the initial service file; calling a service generation framework to determine standard components corresponding to the basic components, combining the standard components according to the configuration information to form a standard component sequence, and providing a service corresponding to the service access request by calling the standard component sequence. The present invention improves the efficiency of service generation and reduces the waste of human resources in the service generation process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of financial technology (Fintech), and particularly to a service generation method, apparatus, device, and computer-readable storage medium. Background Art

[0002] In recent years, with the rapid development of Internet financial technology (Fintech), more and more technologies (big data, distributed, blockchain, artificial intelligence, etc.) have been applied in the financial field.

[0003] There are more and more types of financial services, and the services corresponding to the services are different. In order to integrate various types of services and the services corresponding to the services, a service generation platform is set up to provide different types of services to different users through the service generation platform. In order to provide corresponding services to each user, the service generation platform needs to develop different services. There are currently two ways of service development. One is manual development. This service development method requires a large amount of repeated development, resulting in a waste of human and material resources and low service development efficiency; the other is to develop a set of fixed process steps and customize the steps. This service development process is very rigid, and the degree of service personalization is very limited. Summary of the Invention

[0004] The main purpose of the present invention is to propose a service generation method, apparatus, device, and computer-readable storage medium, aiming to solve the technical problems of low efficiency of current service generation, serious waste of human and material resources, and poor flexibility of the generated services.

[0005] To achieve the above object, the present invention provides a service generation method, and the service generation method includes the following steps:

[0006] When a service access request is received, obtain an initial service file corresponding to the service access request;

[0007] Parse the initial service file through a preset abstract service model to obtain basic components and configuration information in the initial service file;

[0008] Call a service generation framework to determine standard components corresponding to the basic components, combine the standard components according to the configuration information to form a standard component sequence, and use the standard component sequence as the service corresponding to the service access request;

[0009] When an operation request is received, obtain service data in the operation request, and load the standard components to process the service data to provide a service.

[0010] Optionally, before the step of parsing the initial service file through a preset abstract service model to obtain basic components and configuration information in the initial service file, the method includes:

[0011] When receiving a model construction request, obtain a sample service file, where basic components are marked in the sample service file;

[0012] Extract a preset proportion of the sample service files to construct a component recognition model for recognizing the basic components, iteratively extract a preset proportion of the sample service files to train the component recognition model, and obtain the recognition accuracy of the trained component recognition model;

[0013] When the recognition accuracy is greater than a preset accuracy, obtain the trained component recognition model as the preset abstract service model.

[0014] Optionally, before the step of calling a service generation framework to determine standard components corresponding to the basic components and combining the standard components according to the configuration information to form a standard component sequence, the method further includes:

[0015] When receiving a framework construction request, obtain predefined standard components, and associate the standard components with a component call interface to form a core layer;

[0016] Obtain predefined configuration rules, and associate the configuration rules with a component configuration interface to form a configuration layer;

[0017] Obtain predefined adaptation rules, and associate the adaptation rules with a component adaptation interface to form an adaptation layer, and integrate the core layer, the configuration layer, and the adaptation layer to form a service generation framework.

[0018] Optionally, the step of calling a service generation framework to determine standard components corresponding to the basic components and combining the standard components according to the configuration information to form a standard component sequence includes:

[0019] Call the service generation framework to obtain the standard components corresponding to the basic components in the core layer of the service generation framework;

[0020] Input the configuration information into the configuration layer of the service generation framework to obtain the connection relationship of the standard components;

[0021] Package the standard components according to the connection relationship through the adaptation layer in the service generation framework to form a standard component sequence.

[0022] Optionally, the step of, when receiving an operation request, obtaining service data in the operation request and loading the standard components to process the service data to provide a service includes:

[0023] When receiving an operation request, obtain the service identifier and service data corresponding to the operation request;

[0024] Load the standard component sequence corresponding to the service identifier, and process the service data by running the standard component sequence to provide a service, so as to obtain the execution result of the operation request.

[0025] Optionally, after the step of invoking the service generation framework to determine the standard components corresponding to the basic components and combining the standard components according to the configuration information to form a standard component sequence, the method further includes:

[0026] When receiving a service decommissioning request, obtain the service identifier corresponding to the service decommissioning request;

[0027] Obtain the configuration information and the standard component sequence corresponding to the service identifier, delete the configuration information and split the standard component sequence to complete the decommissioning of the service corresponding to the service identifier.

[0028] Optionally, after the step of invoking the service generation framework to determine the standard components corresponding to the basic components and combining the standard components according to the configuration information to form a standard component sequence, the method further includes:

[0029] When receiving a service update request, obtain a service update file;

[0030] Parse the service update file through a preset abstract service model to obtain the basic components and configuration information in the service update file;

[0031] Compare the basic components and configuration information in the service update file with the basic components and configuration information corresponding to the standard component sequence;

[0032] If the basic components and configuration information in the service update file are different from the basic components and configuration information corresponding to the standard component sequence, update the standard component sequence according to the basic components and configuration information in the service update file, and use the updated standard component sequence as the updated service corresponding to the service update request.

[0033] In addition, to achieve the above object, the present invention further provides a service generation device, and the service generation device includes:

[0034] An information acquisition module, configured to obtain an initial service file corresponding to the service access request when receiving a service access request;

[0035] A component abstraction module, configured to parse the initial service file through a preset abstract service model to obtain the basic components and configuration information in the initial service file;

[0036] A service generation module, configured to call a service generation framework to determine standard components corresponding to the basic components;

[0037] The service generation module is configured to combine the standard components according to the configuration information to form a standard component sequence, and provide a service corresponding to the service access request by calling the standard component sequence.

[0038] In addition, to achieve the above object, the present invention further provides a service generation device, where the service generation device includes: a memory, a processor, and a computer program corresponding to service generation stored on the memory and executable on the processor. When the computer program corresponding to service generation is executed by the processor, the steps of the service generation method described above are implemented.

[0039] In addition, to achieve the above object, the present invention further provides a computer-readable storage medium, where a computer program corresponding to service generation is stored on the computer-readable storage medium. When the computer program corresponding to service generation is executed by a processor, the steps of the service generation method described above are implemented.

[0040] The present invention provides a service generation method, device, device, and computer-readable storage medium. The service generation method in the embodiments of the present invention reduces the cumbersome configuration operations, analysis operations, and code development operations of developers, reduces the waste of human resources in the service generation process, realizes the dynamic generation of services, improves the efficiency of service generation, and can effectively ensure the flexibility of service generation. In addition, through the highly reusable standard components, the code amount is greatly reduced, the workload of developers is reduced, and the service access speed is further improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment solution of the present invention;

[0042] Figure 2 is a schematic flowchart of the first embodiment of the service generation method of the present invention;

[0043] Figure 3 is a schematic diagram of a specific scenario of the second embodiment of the service generation method of the present invention;

[0044] Figure 4 is a schematic flowchart of the fourth embodiment of the service generation method of the present invention;

[0045] Figure 5 is a schematic diagram of the functional modules of an embodiment of the service generation device of the present invention.

[0046] The realization, functional features, and advantages of the object of the present invention will be further described with reference to the embodiments and the accompanying drawings. Detailed implementation mode

[0047] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0048] As shown in Figure 1 the figure Figure 1 is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment solution of the present invention.

[0049] The service generation device in the embodiment of the present invention can be a PC or a server device. As shown in Figure 1 the figure, the service generation device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard). Optionally, the user interface 1003 may further include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0050] Those skilled in the art can understand that Figure 1 the device structure shown in

[0051] does not constitute a limitation on the device, and may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements. Figure 1 As shown in

[0052] In Figure 1 the device shown in the figure, the network interface 1004 is mainly used to connect to the background server and communicate with the background server for data; the user interface 1003 is mainly used to connect to the client (user side) and communicate with the client for data; and the processor 1001 can be used to call the computer program corresponding to service generation stored in the memory 1005 and perform the operations in the following service generation method.

[0053] Based on the above hardware structure, an embodiment of the service generation method of the present invention is proposed.

[0054] Referring to Figure 2 , Figure 2Schematic flowchart of the first embodiment of the service generation method of the present invention. In this embodiment, the service generation method includes:

[0055] When a service access request is received, obtain the initial service file corresponding to the service access request;

[0056] Parse the initial service file through a preset abstract service model to obtain the basic components and configuration information in the initial service file;

[0057] Call the service generation framework, determine the standard components corresponding to the basic components, combine the standard components according to the configuration information to form a standard component sequence, and use the standard component sequence as the service corresponding to the service access request;

[0058] When an operation request is received, obtain the service data in the operation request, and load the standard components to process the service data to provide services.

[0059] In this embodiment, the service generation method is applied to a service generation device in a financial institution (such as a bank institution, an insurance institution, a securities institution, etc.) in the financial industry. The service generation device refers to a hardware platform equipped with a service generation computer program. A JVM (Java Virtual Machine) runs on the service generation device, and the service generation device is used to implement dynamic service generation.

[0060] For example, a financial institution integrates different third-party financial services. The current service integration method is as follows: The third party provides an initial service file. Since the initial service file does not conform to the code writing rules of the financial institution, the developers of the financial institution write code based on the initial service file to provide the third-party service on the financial institution. Such a service integration method results in a large workload for the developers of the financial institution and serious waste of human and material resources.

[0061] In this embodiment, an abstract service model is pre-established in the service generation device. The abstract service model refers to an algorithm that abstracts the third-party initial service file into components, that is, the abstract service model can obtain the business logic of the third party by analyzing the initial service file; the abstract service model is obtained through machine learning, and the construction steps of the abstract service model include:

[0062] Step a1, when a model construction request is received, obtain a sample service file, where the basic components are marked in the sample service file;

[0063] Step a2, extract a preset proportion of the sample service files to construct a component recognition model for recognizing the basic components, iteratively extract a preset proportion of the sample service files to train the component recognition model, and obtain the recognition accuracy of the trained component recognition model;

[0064] Step a3, when the recognition accuracy rate is greater than the preset accuracy rate, obtain the trained component recognition model as the preset abstract service model.

[0065] The service generation device receives a model construction request. The triggering method of the model construction request is not specifically limited. The service generation device obtains the historical business files provided by a third party, and the service generation device constructs an abstract service model according to the historical business files. Specifically, the service generation device uses the historical business files as sample business files. The user constructing the model marks the basic components in the sample business files. The service generation device extracts a preset proportion (the preset proportion can be flexibly set according to specific scenarios, for example, the preset proportion is set to 5%) of the sample business files to construct a component recognition model for recognizing basic components. Then, the service generation device iteratively extracts a preset proportion of the sample business files to train the component recognition model, and the service generation device obtains the recognition accuracy rate of the trained component recognition model; the service generation device compares the recognition accuracy rate with the preset accuracy rate (the preset accuracy rate refers to the accuracy rate when the component recognition model converges that is preset in advance, for example, the preset accuracy rate is set to 98%). If the recognition accuracy rate is less than or equal to the preset accuracy rate, continue to extract sample business files for iterative training. When the recognition accuracy rate is greater than the preset accuracy rate, the service generation device obtains the trained component recognition model as the preset abstract service model.

[0066] For example, the user marks the basic components in the historical business files provided by a third party. The service generation device obtains the marking information of the user. The service generation device obtains the historical business files of a preset time period (the preset time period is flexibly set according to specific scenarios. For example, the preset time period can be set to 1 month or 1 week). The service generation device extracts some sample business files from these historical business files. The service generation device performs initialization modeling according to the sample business files and the marking information of the user through the Lambda algorithm. After obtaining the initial model, the service generation device performs iterative training to generate an abstract service model for recognizing basic components.

[0067] In this embodiment, the service generation device constructs an abstract service model according to the historical business files, so as to automatically construct the abstract service model based on machine learning, thereby using the abstract service model to identify and analyze the initial business files provided by a third party, determine the business logic of the initial business files, reduce the analysis operations of developers, and thus reduce the waste of human resources in the service generation process.

[0068] In this embodiment, after the abstract service model is constructed, it is also necessary to build a service generation framework. The identified basic components are transformed through the service generation framework, and the standard components corresponding to the basic components (which can be understood as business logics) are spliced. Then, the service generation device splices the standard components to form the corresponding service. In this embodiment, a general service generation framework is pre-built in the service generation device. The service generation framework is divided into a core layer, a configuration layer, and an adaptation layer. The service generation framework can adapt to ever-changing business requirements and achieve high generality and customizability. The steps for building the service generation framework in this embodiment include:

[0069] Step b1, when receiving a framework construction request, obtain predefined standard components, and associate the standard components with a component call interface to form a core layer;

[0070] Step b2, obtain predefined configuration rules, and associate the configuration rules with a component configuration interface to form a configuration layer;

[0071] Step b3, obtain predefined adaptation rules, associate the adaptation rules with a component adaptation interface to form an adaptation layer, and integrate the core layer, the configuration layer, and the adaptation layer to form a service generation framework.

[0072] When the service generation device receives a framework construction request, the service generation device obtains predefined standard components, and the service generation device associates the standard components with a component call interface to form a core layer; the core layer provides the basic implementation of the predefined standard components. The standard components can be Action (execution component), Filter (filter component), and Processor (processing component). The core layer is a refined and perfect kernel with strong expressive ability. The setting of the core layer can meet various requirements; in addition, the core layer can provide two modes for the execution of standard components, namely asynchronous and synchronous modes, and provide two modes for multiple standard components, namely parallel execution and serial execution modes. The upper layer only needs to modify the mode type parameter to switch between different running modes; at the same time, these features of the core layer are transparent to the upper layer without any intrusion.

[0073] The service generation device obtains predefined configuration rules (the configuration rules can be component call rules, data source query rules, etc.), and the service generation device associates the configuration rules with a component configuration interface to form a configuration layer; the configuration layer is the place where services are defined. In this embodiment, the service generation device makes the configuration content isomorphic to the service content, and the structure and processing flow of the service can be formed through configuration; in addition, the configuration layer also provides support for multiple configuration data sources, such as a basic database and local files.

[0074] The service generation device obtains predefined adaptation rules (the adaptation rules can be understood as framework access rules). The service generation device associates the adaptation rules with the component adaptation interfaces to form an adaptation layer. The adaptation layer is used to support various types of services and interface with other frameworks. The adaptation layer includes extensions to the core layer and support for the Akka framework and Spring framework. For example, the adaptation layer encapsulates components for recommendation services and advertising services, extends Filter to support Abtest, and extends Processor to support performance monitoring and logging. The adaptation layer can be extended according to the requirements of business scenarios, making the framework more friendly and easier to use for specific services.

[0075] The service generation device integrates the core layer, configuration layer, and adaptation layer to form a service generation framework. In this embodiment, the service generation framework solves the pain point of inconvenient access to third-party services. The service generation framework has strong flexibility and generality, realizes high reuse of components, greatly reduces the amount of code, improves development efficiency and saves manpower. At the same time, the service generation framework can quickly access third-party services, greatly improving the speed of the platform-based system to access new customers.

[0076] In addition, in this embodiment, the business code is decoupled from the framework code, enabling algorithm personnel to focus on algorithm components and business developers to focus on business logic, improving code quality and maintainability. The framework processes underlying details and optimizes them uniformly to ensure service performance and stability.

[0077] After the abstract service model is constructed and the service generation framework is set up, the service generation device uses the abstract service model and the service generation framework to quickly access services. Specifically:

[0078] Step S10, when receiving a service access request, obtain the initial service file corresponding to the service access request.

[0079] The service generation device receives a service access request. The triggering method of the service access request is not specifically limited. That is, the service access request can be actively triggered by a user. For example, the user clicks the "Service Generation" button on the service generation device to trigger the service access request. Or the service access request can also be automatically triggered by the service generation device. For example, when a preset service file in the service generation device is updated, the service access request is automatically triggered. When the service generation device detects that the preset service generation conditions are met, the service access request is automatically triggered.

[0080] When the service generation device receives a service access request, the service generation device obtains an initial service file corresponding to the service access request. The initial service file refers to a service file provided by a third party. Usually, the encoding of the service file provided by the third party does not match that of the service generation device. The service generation device needs to identify the initial service file to provide access to the third-party service on the service generation device and provide services for users. Specifically:

[0081] Step S20, parse the initial service file through a preset abstract service model to obtain the basic components and configuration information in the initial service file.

[0082] The service generation device inputs the initial service file into a preset abstract service model, parses the initial service file through the preset abstract service model, and obtains the basic components in the initial service file and the configuration information related to the basic components. Specifically:

[0083] Implementation method 1: The service generation device inputs the initial service file into the abstract service model. The abstract service model cleans the initial service file to remove invalid service information, and then the abstract service model extracts features from the remaining service information to obtain the description information of the components. The abstract service model uses the description information of the components as the basic components. Further, the abstract service model obtains the configuration information corresponding to the basic components.

[0084] Implementation method 2: The service generation device inputs the initial service file into the abstract service model. The abstract service model selects an abstract service sub-model according to the file type of the initial service file; the service generation device extracts features from the initial service file through the abstract service sub-model to obtain the description information of the components. The abstract service model uses the description information of the components as the basic components. Further, the abstract service model obtains the configuration information corresponding to the basic components. In this embodiment, the abstract service model includes multiple abstract service sub-models, which can not only ensure the minimum training volume of the abstract service model but also ensure the accuracy of component recognition.

[0085] After the service generation device obtains the standard components and configuration information, the service generation device calls the service generation framework to generate services. Specifically:

[0086] Step S30, call the service generation framework, determine the standard components corresponding to the basic components, combine the standard components according to the configuration information to form a standard component sequence, and provide the service corresponding to the service access request by calling the standard component sequence.

[0087] The service generation device calls the service generation framework, determines the standard components corresponding to the basic components, combines the standard components according to the configuration information to form a standard component sequence, and the service generation device uses the standard component sequence as the service corresponding to the service access request. Specifically:

[0088] Step c1: Call the service generation framework to obtain the standard components corresponding to the basic components in the core layer of the service generation framework;

[0089] Step c2: Input the configuration information into the configuration layer of the service generation framework to obtain the connection relationships of the standard components;

[0090] Step c3: Through the adaptation layer in the service generation framework, encapsulate the standard components according to the connection relationships to form a standard component sequence.

[0091] That is, the service generation device calls the service generation framework to obtain the standard components corresponding to the basic components in the core layer of the service generation framework. That is, the core layer determines the functions of the basic components, the core layer obtains the predefined standard components with the same functions as the basic components, and uses this standard component as the standard component corresponding to the basic component; the service generation device inputs the configuration information into the configuration layer of the service generation framework to obtain the connection relationships of the standard components; the service generation device encapsulates the standard components according to the connection relationships through the adaptation layer in the service generation framework to form a standard component sequence.

[0092] For example, the service generation framework is implemented using Scala and Java languages, supports languages based on JVM such as Java, Scala, and Kotlin. The service generation framework is used by introducing jar packages, supports package management tools such as maven, gradle, and sbt, and is deeply integrated with frameworks such as Spring and Akka. It is convenient and easy to use. For a new third-party service to be accessed, it can be used through the following three steps: 1. Introduce the framework jar package in the service generation device. 2. Define the service according to the configuration information recognized by the jar package. 3. Load the service in the project.

[0093] The service generation method in this embodiment reduces the cumbersome configuration operations, analysis operations, and code development operations of developers, reduces the waste of human resources in the service generation process, realizes the dynamic generation of services, improves the efficiency of service generation, and can effectively ensure the flexibility of service generation. In addition, through the highly reusable standard components, the amount of code is greatly reduced, the workload of developers is reduced, and the service access speed is further improved.

[0094] Furthermore, based on the first embodiment of the service generation method of the present invention, a second embodiment of the service generation method of the present invention is proposed.

[0095] This embodiment is the step after step S30 in the first embodiment. The difference between this embodiment and the above embodiments is as follows:

[0096] When receiving an operation request, obtain the service identifier and service data corresponding to the operation request;

[0097] Load the standard component sequence corresponding to the service identifier, and process the service data by running the standard component sequence to provide services, so as to obtain the execution result of the operation request.

[0098] Specifically, in this embodiment, when the service generation device receives an operation request, the service generation device obtains the service identifier and service data corresponding to the operation request; the service generation device queries a preset data table, where the preset data table refers to a mapping relationship table between service identifiers and services; the service generation device obtains the standard components and configuration information corresponding to the service identifier; the service generation device loads the standard component sequence corresponding to the service identifier according to the standard components and configuration information, and the service generation device processes the service data by running the standard component sequence to obtain the execution result of the operation request.

[0099] For example, referring to Figure 3 , the service generation device can pay for the service response, that is, when the application layer receives a user operation request, the service generation device makes a service call to the service generation framework, and the service generation framework assembles standard data according to the configuration information to generate a corresponding service.

[0100] In this embodiment, the service generation device provides corresponding services through the standard component sequence. When receiving an operation request, the service generation device obtains the service data in the operation request, loads the standard components to process the service data to provide services. The service generation method in the embodiment reduces the cumbersome configuration operations, analysis operations, and code development operations of developers, reduces the waste of human resources in the service generation process, realizes the dynamic generation of services, improves the efficiency of service generation, and can effectively ensure the flexibility of service generation. In addition, through the high reuse of standard components, the code amount is greatly reduced, the workload of developers is reduced, and the service access speed is further improved.

[0101] When the above service generation method is adopted in financial institutions such as banking institutions, service access can be carried out more efficiently when financial services change frequently.

[0102] Furthermore, based on the above embodiments of the service generation method of the present invention, a third embodiment of the service generation method of the present invention is proposed.

[0103] This embodiment is the step after step S30 in the first embodiment. The difference between this embodiment and the above embodiments is as follows:

[0104] When receiving a service decommissioning request, obtain the service identifier corresponding to the service decommissioning request;

[0105] Obtain the configuration information and the standard component sequence corresponding to the service identifier, delete the configuration information, and split the standard component sequence to complete the decommissioning of the service corresponding to the service identifier.

[0106] In this embodiment, when the service generation device receives a service decommissioning request, the service generation device obtains the service identifier corresponding to the service decommissioning request; the service generation device obtains the configuration information and the standard component sequence corresponding to the service identifier, and the service generation device deletes the configuration information and splits the standard component sequence to complete the decommissioning of the service corresponding to the service identifier. In this embodiment, when performing service decommissioning, the operation is relatively convenient, reducing the workload of developers.

[0107] Further, referring to Figure 4 , based on the above embodiments of the service generation method of the present invention, a fourth embodiment of the service generation method of the present invention is proposed.

[0108] This embodiment is the step after step S30 in the first embodiment. The difference between this embodiment and the above embodiments is as follows:

[0109] Step S40, when receiving a service update request, obtain a service update file.

[0110] The service generation device receives a service update request. The triggering method of the service update request is not specifically limited. When the service generation device receives the service update request, the service generation device obtains the service update file.

[0111] Step S50, parse the service update file through a preset abstract service model to obtain the basic components and configuration information in the service update file.

[0112] The service generation device parses the service update file through a preset abstract service model to obtain the basic components and configuration information in the service update file. Among them, the implementation method of the service generation device parsing the service update file through the preset abstract service model refers to the first embodiment and will not be elaborated in this embodiment.

[0113] Step S60, compare the basic components and configuration information in the service update file with the basic components and configuration information corresponding to the standard component sequence;

[0114] The service generation device compares the basic components and configuration information in the service update file with the basic components and configuration information corresponding to the existing standard component sequence. If the basic components and configuration information in the service update file are the same as the basic components and configuration information corresponding to the standard component sequence, no processing is performed.

[0115] Step S70: If the basic components and configuration information in the service update file are different from those of the basic component sequence corresponding to the standard component sequence, update the standard component sequence according to the basic components and configuration information in the service update file, and use the updated standard component sequence as the updated service corresponding to the service update request.

[0116] If the basic components and configuration information in the service update file are different from those of the basic component sequence corresponding to the standard component sequence, the service generation device updates the standard component sequence according to the basic components and configuration information in the service update file. That is, the service generation device parses the service update file through a preset abstract service model to obtain the basic components and configuration information in the service update file; the service generation device calls the service generation framework to determine the standard components corresponding to the basic components, and the service generation device combines the standard components according to the configuration information to form a standard component sequence, and the service generation device uses the standard component sequence as the service corresponding to the service update. When receiving an operation request, the service generation device obtains the service data in the operation request and loads the updated standard components to process the service data to provide services.

[0117] In this embodiment, automatic service updates can be achieved by simply modifying the configuration to create new services and modify existing services, without restarting, let alone releasing a new version, making service update operations more convenient.

[0118] Refer to Figure 5 , the present invention further provides a service generation device, and the service generation device includes:

[0119] An information acquisition module 10, configured to obtain an initial service file corresponding to the service access request when receiving a service access request;

[0120] A component abstraction module 20, configured to parse the initial service file through a preset abstract service model to obtain the basic components and configuration information in the initial service file;

[0121] A service generation module 30, configured to call a service generation framework to determine the standard components corresponding to the basic components, combine the standard components according to the configuration information to form a standard component sequence, and provide the service corresponding to the service access request by calling the standard component sequence.

[0122] Optionally, the service generation device includes:

[0123] A sample acquisition module, configured to obtain a sample service file when receiving a model construction request, where the basic components are marked in the sample service file;

[0124] Build a training module for extracting a preset proportion of sample business documents to build a component recognition model for recognizing the basic components, iteratively extracting a preset proportion of sample business documents to train the component recognition model, and obtaining the recognition accuracy of the trained component recognition model;

[0125] A model acquisition module for obtaining the trained component recognition model as a preset abstract service model when the recognition accuracy is greater than the preset accuracy.

[0126] Optionally, the service generation device includes:

[0127] A framework construction module for obtaining predefined standard components when receiving a framework construction request, and associating the standard components with a component call interface to form a core layer;

[0128] An association generation module for obtaining predefined configuration rules and associating the configuration rules with a component configuration interface to form a configuration layer;

[0129] A framework generation module for obtaining predefined adaptation rules, associating the adaptation rules with a component adaptation interface to form an adaptation layer, and integrating the core layer, the configuration layer, and the adaptation layer to form a service generation framework.

[0130] Optionally, the service generation module 30 includes:

[0131] Call the service generation framework to obtain the standard components corresponding to the basic components in the core layer of the service generation framework;

[0132] Input the configuration information into the configuration layer of the service generation framework to obtain the connection relationship of the standard components;

[0133] Package the standard components into a standard component sequence according to the connection relationship through the adaptation layer in the service generation framework.

[0134] Optionally, the service generation device includes:

[0135] An operation acquisition module for obtaining the service identifier and service data corresponding to the operation request when receiving an operation request;

[0136] A service loading module for loading the standard component sequence corresponding to the service identifier, providing services by running the standard component sequence to process the service data, and obtaining the execution result of the operation request.

[0137] Optionally, the service generation device includes:

[0138] A request receiving module for obtaining the service identifier corresponding to the service withdrawal request when receiving a service withdrawal request;

[0139] Service off - shelf module. The user obtains the configuration information and the standard component sequence corresponding to the service identifier, deletes the configuration information, and splits the standard component sequence to complete the off - shelf of the service corresponding to the service identifier.

[0140] Optionally, the service generation device includes:

[0141] An acquisition and update module, configured to obtain a service update file when receiving a service update request;

[0142] An information parsing module, configured to parse the service update file through a preset abstract service model to obtain the basic components and configuration information in the service update file;

[0143] An information comparison module, configured to compare the basic components and configuration information in the service update file with the basic components and configuration information corresponding to the standard component sequence;

[0144] A service update module, configured to, if the basic components and configuration information in the service update file are different from the basic components and configuration information corresponding to the standard component sequence, update the standard component sequence according to the basic components and configuration information in the service update file, and use the updated standard component sequence as the updated service corresponding to the service update request.

[0145] Wherein, the method implemented when the service generation device is executed can refer to the embodiments of the service generation method of the present invention, and will not be elaborated here.

[0146] The service generation device in the embodiment realizes dynamic service generation by executing the above steps, reducing the cumbersome configuration operations, analysis operations, and code development operations of developers, reducing the waste of human resources in the service generation process, realizing the dynamic generation of services, improving the efficiency of service generation, effectively ensuring the flexibility of service generation, and in addition, through the highly reusable standard components, greatly reducing the amount of code, reducing the workload of developers, and further improving the service access speed.

[0147] The present invention also provides a computer - readable storage medium.

[0148] The computer - readable storage medium of the present invention stores a computer program corresponding to service generation. When the computer program corresponding to service generation is executed by a processor, the steps of the service generation method described above are implemented.

[0149] Wherein, the method implemented when the computer program corresponding to service generation running on the processor is executed can refer to the embodiments of the service generation method of the present invention, and will not be elaborated here.

[0150] It should be noted that in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, such that a process, method, article or system comprising a series of elements not only includes those elements but also includes other elements not expressly listed, or elements inherent to such process, method, article or system. Without further limitation, an element defined by the phrase "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or system comprising such element.

[0151] The serial numbers of the above embodiments of the present invention are only for description and do not represent the superiority or inferiority of the embodiments.

[0152] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product is stored in a storage medium as described above (such as ROM / RAM, magnetic disk, optical disc), and includes several instructions to enable a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in various embodiments of the present invention.

[0153] The above are only the preferred embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent structural or equivalent process transformation made by using the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.

Claims

1. A service generation method, characterized in that, The service generation method includes the following steps: When receiving a service access request, obtain the initial service file corresponding to the service access request; Parse the initial service file through a preset abstract service model to obtain the basic components and configuration information in the initial service file; Call the service generation framework to obtain the standard components corresponding to the basic components in the core layer of the service generation framework, where the standard components have the same functions as the standard components; Input the configuration information into the configuration layer of the service generation framework to obtain the connection relationship of the standard components; Encapsulate the standard components according to the connection relationship through the adaptation layer in the service generation framework to form a standard component sequence; Provide the service corresponding to the service access request by calling the standard component sequence; The step of parsing the initial service file through a preset abstract service model to obtain the basic components and configuration information in the initial service file includes: Clean the initial service file through a preset abstract service model to obtain the remaining service information after removing invalid service information, and perform feature extraction on the remaining service information to obtain the basic components and configuration information in the initial service file, where the abstract service model refers to an algorithm for abstracting the initial service file into components; or Select an abstract service sub-model according to the file type of the initial service file through a preset abstract service model, and perform feature extraction on the initial service file through the abstract service sub-model to obtain the basic components and configuration information in the initial service file; Before the step of calling the service generation framework to obtain the standard components corresponding to the basic components in the core layer of the service generation framework, the method further includes: When receiving a framework construction request, obtain predefined standard components, and associate the standard components with a component call interface to form a core layer; Obtain predefined configuration rules, and associate the configuration rules with a component configuration interface to form a configuration layer; Obtain predefined adaptation rules, associate the adaptation rules with a component adaptation interface to form an adaptation layer, and integrate the core layer, the configuration layer, and the adaptation layer to form a service generation framework.

2. The service generation method according to claim 1, characterized in that, Before the step of parsing the initial service file through a preset abstract service model to obtain the basic components and configuration information in the initial service file, the method further includes: When receiving a model construction request, obtain a sample service file, where the basic components are marked in the sample service file; Extract a preset proportion of the sample service files to construct a component recognition model for recognizing the basic components, iteratively extract a preset proportion of the sample service files to train the component recognition model, and obtain the recognition accuracy of the trained component recognition model; When the recognition accuracy is greater than a preset accuracy, obtain the trained component recognition model as the preset abstract service model.

3. The service generation method according to claim 1, characterized in that, After the step of providing the service corresponding to the service access request by calling the standard component sequence, the method includes: When receiving an operation request, obtain the service identifier and service data corresponding to the operation request; Load the standard component sequence corresponding to the service identifier, and process the service data by running the standard component sequence to provide services, so as to obtain the execution result of the operation request.

4. The service generation method according to claim 1, characterized in that, After the step of encapsulating the standard components into a standard component sequence according to the connection relationship through the adaptation layer in the service generation framework, the method further includes: When receiving a service off-shelf request, obtain the service identifier corresponding to the service off-shelf request; Obtain the configuration information and the standard component sequence corresponding to the service identifier, delete the configuration information and split the standard component sequence, and complete the off-shelf of the service corresponding to the service identifier.

5. The service generation method according to any one of claims 1 to 4, characterized in that, After the step of encapsulating the standard components into a standard component sequence according to the connection relationship through the adaptation layer in the service generation framework, the method further includes: When receiving a service update request, obtain a service update file; Parse the service update file through a preset abstract service model to obtain the basic components and configuration information in the service update file; Compare the basic components and configuration information in the service update file with the basic components and configuration information corresponding to the standard component sequence; If the basic components and configuration information in the service update file are different from the basic components and configuration information corresponding to the standard component sequence, update the standard component sequence according to the basic components and configuration information in the service update file, and use the updated standard component sequence as the updated service corresponding to the service update request.

6. A service generation device, characterized in that, The service generation device includes: An information acquisition module, configured to obtain an initial service file corresponding to the service access request when receiving a service access request; A component abstraction module, configured to parse the initial service file through a preset abstract service model to obtain the basic components and configuration information in the initial service file; clean the initial service file through a preset abstract service model to obtain the remaining service information after removing invalid service information, and perform feature extraction on the remaining service information to obtain the basic components and configuration information in the initial service file, where the abstract service model refers to an algorithm for abstracting the initial service file into components; or, select an abstract service sub-model according to the file type of the initial service file through a preset abstract service model, and perform feature extraction on the initial service file through the abstract service sub-model to obtain the basic components and configuration information in the initial service file; A service generation module, configured to call a service generation framework, obtain standard components corresponding to the basic components in the core layer of the service generation framework, where the standard components have the same functions as the standard components; input the configuration information into the configuration layer of the service generation framework to obtain the connection relationships of the standard components; encapsulate the standard components into a standard component sequence according to the connection relationships through an adaptation layer in the service generation framework; provide a service corresponding to the service access request by calling the standard component sequence; call the service generation framework, obtain the standard components corresponding to the basic components in the core layer of the service generation framework; input the configuration information into the configuration layer of the service generation framework to obtain the connection relationships of the standard components; encapsulate the standard components into a standard component sequence according to the connection relationships through an adaptation layer in the service generation framework; The service generation device includes: A framework construction module, configured to obtain predefined standard components when receiving a framework construction request, and associate the standard components with a component call interface to form a core layer; An association generation module, configured to obtain predefined configuration rules, and associate the configuration rules with a component configuration interface to form a configuration layer; A framework generation module, configured to obtain predefined adaptation rules, associate the adaptation rules with a component adaptation interface to form an adaptation layer, and integrate the core layer, the configuration layer, and the adaptation layer to form a service generation framework.

7. A service generation device, characterized in that, The service generation device includes: a memory, a processor, and a computer program corresponding to service generation stored on the memory and executable on the processor. When the computer program corresponding to service generation is executed by the processor, the steps of the service generation method according to any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium, characterized in that, A computer-readable storage medium stores a computer program corresponding to service generation. When the computer program corresponding to service generation is executed by a processor, the steps of the service generation method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Service processing and data processing methods and apparatuses and electronic device

    CN107506181A

  • Method and apparatus for generating artificial intelligence service component, and related device and system

    CN108737324A